This is a walk-through of how to generate gcode using Inkscape. There is simplicity in being able to design and svg file and generate GCODE in the same package. Freecad, Blender and Inkscape can all apparently do it.
- Open Inkscape.
- Open svg file or new file. NOTE: If importing from Corel Draw exporting as SVG version 1.0 with units in mm works, but you may need to ungroup the imported item and then assign it to a layer before proceeding. it is important that the object you are manipulating is a path for this to work.
- Click Extensions on the menu and see if the gcodetools menu item is included. It should be included in inkscape more recent than version 0.90 or 0.91. This was written using 0.92.4.
If gcodetools is not included in your inkscape installation, you will need to install it (click arrow at left to see instructions
Unpack and copy all the files to the following directory Program Files\Inkscape\share\extensions\ and restart inkscape.
Execute python create_inx.py to create all inx-files. (will work without doing this)
Unpack and copy all the files to the following directory /usr/share/inkscape/extensions/ and restart inkscape.
Execute python create_inx.py to create all inx-files.
- Set document to mm and size of cutout in mm (12" =~ 300 mm). Please make the display units match the custom size units (match your maslow units) and the scale x is set to 1.
- Create your cutout shape
After some editing, the shape is an outline only with the thickness of the line the same size as the cutting bit so it is easier to see what it will look like in real life.
For any object if you just want to do an outline cutout, change fill to none, set stroke paint to black and stroke style to 3 mm (3.175 mm if you want to be precise) for 1/8" bit or 6 mm (6.35 mm) for 1/4" bit. This only matters because it helps you see the cuts that will overlap and where to put in tabs later.
Move the letters together so they overlap, convert object to path, cut path, then ungroup and then union it so it removes the extra lines.
- Create a new layer
-in the right side bar, select layers if you can’t see the current layer in use or use the shortcut shown in the image below.
-Right click on the layer currently in the drawing and select add new layer
-rename it “tabs” by using the right click menu. Move the tab layer below the first layer as a matter of convention because it is intuitive that the top layer gets cut first, then the tabs at the bottom get cut last. In the layer viewer on the right, you can select which layer is visible by clicking on the eye. If the eye is black with eyelashes this is viewable, if greyed and looks closed, then it is hidden. Don’t mess with the lock or you won’t be able to edit or select anything in that layer. If you can’t select anything on the layer, you can right click on the layer and select unlock all and then unhide all to see everything.
- Copy Artwork to New Layer.
-Select the top layer
-Select all (CTRL+A) or draw a box around everything
- CTRL+C will copy everything that is selected
-Select the tab layer and paste it. With both layers visible, you should not be able to tell them apart, but you can toggle which one you see hiding or viewing it in the layer viewer. If you paste it in and it isn’t lined up, you can move it and it will snap to the other layer so it will be lined up perfectly.
after pasting, they may not line up, so move it if you need to.
- GCODE setup of “CUT” layer:
A. Create a tool for each layer: select each layer and do this step for each layer. It is sometimes easiest to hide all layers, unhide only the layer to set up, and then proceed. When finished, hide it, unhide the next one and do it again until complete.
select your cutting bit (cylinder or cone both work depending on the bit you are using) click apply. You will see a dialog box pop up while it works and then you can close the box. A new green box will be visible and associated with the layer you have selected. The second layer you do will have a blue box, the third will be red.
-Within that green box, change the settings for your cut:
-You will need to edit the numbers. Do this by double clicking on them and then when you get the text cursor you can edit them. If your attempts to edit add numbers over the top, then undo and retry. or just click to select the text and then click on the text tool bar on the left or the right side of the page.
-change diameter to 6.35 if you are using a 1/4" bit or 3.175 if you are using a 1/8th inch bit.
-Set your feed rate based on your material in mm/min (between 300 and 800). You can cut at 750, but it may not be good quality and your tool will dull faster if it gets hot. This picture for this example was cut at 550 with a 1/4" bit.
-Penetration angle is always 90 for maslow because the router on the sled is flat on the work surface.
-Penetration feed is 800 for the z insertion for a first gen z axis.
-Depth step is the depth your tool will cut in 1 pass in mm. Maslow should 3 mm step pretty easily. Cutting successfully at 4 mm can be done and even 5 mm, but there is a proportional speed drop that must accompany it to generate fine dust and the bit cool so it doesn’t overheat.
-Leave tool change as none.
B. Set up origin points with the same layer selected
orientation points tell your maslow where to cut with respect to home. Wherever you place the first orientation point on the left, that will be the home point from which the drawing is referenced in webcontrol or groundcontrol. The second set of numbers represents your workpiece total cut depth that maslow will cut (in x passes of step depth defined in the colored box previously made). With 3/4" ply, the total depth will be 19.1 mm. If you chose a step of 4 mm, Maslow will cut 4 passes at a z plunge depth of -4, -8, -12, -16 from the top layer that is labeled “cut” in this example and the “tab” layer will cut at 19.1 mm. If you want to cut on the left side of home, you would select the orientation point group and move them to the right. The points should always move as a pair and do not try to change them with respect to each other. You can edit the right group of numbers if your material thickness changes if you are reusing this design and regenerating the gcode. To be precise in moving the orientation point group, use the X and Y location boxes up near the help menu to place the orientation points and make it easier to know the distance from maslow home to your cutout.
You can also do more than 2 layers if you want:
The critical thing is to get the orientation points exactly on top of each other so there is no offset one layer to the next. Use the “hide layer” function and click on the orientation points for each layer and manually adjust them in the position boxes at the top of the screen so they are exactly the same.
9. Edit the tabs.
-First Hide the cut layer, make the tabs layer visible. Your green box and orientation points should disappear when you hide the cut layer.
- Select the cutout, then choose the node tool (second one down below the select arrow.
-NOTE ON TABS: put a tab in on any completely cut out part. such as the center of the O, the piece between the M and E, and the little pieces between the O-H and O-M and of course between the larger cutout and the sheet it is cut from. I don’t have a good feel yet for how large the tabs should be. These ones will be 3 mm thick because the last cut will be from 16-19.1 mm. Simply edit the drawing and cut pieces out of the outline that maslow will skip over. Start with the little one between H and O and and try to make it about 5 mm, so it needs to be 11 mm for a 1/4" bit or 8 mm for a 1/8" bit.
TIP: The center of your cutting tool will go the spot of the node. If you are using a 1/4" bit and have a 5 mm gap, the 6.35 mm bit will overlap 3.175 mm when it stops, then when it moves over, it will overlap another 3.175 mm, so you MUST make your breaks your bit diameter + your desired tab size.
to cut the tabs,
a. zoom in and select the cutout where you want to insert
b. select the two nodes where you want to remove the segment
c. click the break node button above on the toolbar. If the nodes are spaced too far apart, double click to add a new node where you want to make your tab. If you are on a curve you might need to break the path first and then delete the segment. Path break is 2 buttons to the left of the segment delete button
Do this at all places where tabs are desired.
TIP: TABS placement
Tabs in the example are shown below
- Add GCODE to “TAB” layer
- keeping the tab layer visible, add a tool and orientation points as in step 8. It should look like this.
the Orientation point start depth will be -16 because that is where the last layer cut stopped and where this will begin, so the tabs will be 3 mm thick and 5 mm wide.
with both layers visible, it will look like this with the orientation points on top of each other
- GCODE Header file required for webcontrol
Make a header file in folder where you will save the gcode (only need to do this once)
text file name is “header”
Must have this one line and any others you desire
G90 (absolute positioning)
G21 (All units in mm)
- Generate Gcode:
-First make both layers visible and select everything.
Extensions -> gcodetools ->path to gcode
-click on preferences:
Enter the file name with extension
enter the file path (only need to do this the first time as all these values are persistent)
Enter the height your Z axis is safe to move over a blank (5 mm works)
units are in mm.
UPDATE: To avoid grbl crashing R codes in your gcode output file, put Post-processor setting to NONE.
-click on path to gcode tab
- depth function is d, (don’t change this)
- cutting order is pass by pass (cuts entire job at each depth), if you do path by path, it cuts each path segment layer by layer, so it will cut part of the H 4 times and then move to the next piece completing all of the “cut” layer first, then go back and do the tab layer.
-If the preferences tab is selected, it will not generate gcode, so make sure the path to gcode tab is selected then click “apply”
Early versions always had an error/warning that would pop up, that didn’t really mean anything, but the latest version works very quickly compared to the old and doesn’t have the error popup.
click ok then you will see this if it is working:
It may take a while depending on how complicated the cut is and how many segments there are.
when the working dialog closes, it is finished. Close the “path to gcode” window and go upload the gcode file to webcontrol or use it in groundcontrol.
This was generated in inkscape, gcode came from inkscape, and it was cut today to show this actually works.
That’s it. If no gcode is generated, then there is a problem. Double check the numbers and try again.
One last point of frustration: between each segment, the generated gcode raises and lowers the z axis. Extra z-axis movement can be manually edited out of the file if desired. CTRL+L will simplify and remove unneeded nodes, but it may also oversimplify and mess up your design: CTRL+Z for undo.