I like
SheetCam for generating
G-code for a
CNC plasma cutter from
DXF or
SVG drawings, but I prefer free and/or open source programs that students can use on their own computers.
Inkscape and the
Gcodetools plug-in achieve that.
Version 0.49 of
Inkscape will include
Gcodetools, but until then we have to extract the contents of
the Gcodetools download (using a program such as
7-zip) and put them in the appropriate Inkscape directory (probably c:\Program Files\Inkscape\share\extensions\ on Windows).
Once you have this set up, start up Inkscape and check under the
Extensions menu for
Gcodetools.
If it's not there, close Inkscape, make sure the files are copied to the correct directory, and restart Inkscape.
The process for creating G-code from a drawing follows:
Open (or create) a drawing in Inkscape. Make sure the bottom left corner of your drawing is at the bottom left of the document. As an example, I'll be making an
arcade controller top for mounting buttons and a joystick.
Convert all objects to paths. Keyboard shortcuts to do this are
<Ctrl><a> (to select everything) then
<Shift><Ctrl><c> to convert objects to paths.
You should now have only "objects of type
Path".
Now we need to set some orientation points. Click on the
Extensions menu and select
Gcodetools then
Orientation points....
Change the
Units to inches (
in) and click
Apply then
Close.
To specify that you're going to use a plasma cutter, click on the
Extensions menu and select
Gcodetools then
Tools library...
Select
plasma and click
Apply.
This will create a green text box with your tool definition in it.
You will be able to edit the text to edit it and change things like your feed rate. For now all we want to do is remove some of the "
gcode before path" lines. Double-click that text box and delete everything but the line "
M03 (turn on plasma)" so that it looks like this:
Next you will need to select all of your objects again (press F1 to use the arrow tool again instead of the text tool) and choose
Prepare path for plasma...
This will bring up a window allowing you to create lead-in and lead-out paths, as
explained in this article on torchmate.com. You'll probably want a short in-out path to make a cleaner cut and to show you which direction the torch will be cutting. Remember that the units for the length are inches. Click
Apply create the paths and click
Close to close that tool once it has finished.
If you don't like how the in-out paths look, you can undo it and try again until you get something that looks like this:
You can now select and delete the objects in your original drawing so you will just see the cut paths.
Now select Path to Gcode....
Click on the Preferences tab to make sure you will be saving the file onto your flash drive (e.g. drive e:\).
Select the Path to Gcode tab and click Apply. Read through any warnings that pop up, but you should get some usable G-code.
Open the file in Notepad or a similar text editor, and it should look like this:
The one thing you'll want to change is to delete the M3 on the fourth line of the file. M3 is the Gcode for turning on the torch, and we don't want it to turn on until the torch has moved into position. You can eliminate this step by having an empty file in your output directory (e:\ or wherever you specified earlier) that is called header.txt (edit: the empty file should just be named header with no extension).Your output file will then look like this:
Open that output.ngc file in Mach3, make sure everything looks as you expect, set up the torch (talk to your Instructor about the torch settings), and click Cycle Start (or press <Alt><r>). You may need to click (or press) this again every time the torch fires if it's set to pause before cutting.
Hopefully everything will work for you and you'll have a nicely cut metal project.