Step 7Getting the software ready.
Inkscape - this is open source vector editing software. (download )
Laser engraver extension - This generates the g-code needed to control the laser. (download )
G-code sender - A small windows program I wrote to communicate with Grbl. (download )(source )
Install Inkscape by following their instructions. This should be a pretty painless process. And any help on the subject should be easy to find in the documentation on their web page. Next up is the extension; this is a little harder but not much. Open the .zip file in your favorite unpacker and copy all the files to "c:\Program Files\Inkscape\share\extensions". You have to restart Inkscape for the extension to show up. The extension is a heavily modified version of "Gcodetools ". That is it for setting up Inkscape. You can leave the "G-code sender" on your desktop or any other place where you will find it later. It does not need to be installed.
One important word about the extension, I am not a python programmer and there might be some kinks in the code.
I assume you have everything installed and ready to use by now. Here is a quick screencast of the work flow.
I hope this was not too quick. There are loads of guides on how to use Inkscape out there. I will not go into any details on how to use it.
The G-code sender is another story; there is no documentation as I just made the program. All the documentation is in this instructable, but feel free to ask if you have any questions. When you open the program it should be pretty self explanatory. The only strange thing is the radio buttons "\n\r" and "\r\n". Depending on what version of Grbl you are using the line ending are different. If the one doesn't work try the other one. Choose your serial port, and if you do forget to plug in your laser engraver, plug it in and hit the refresh button and your serial port should show up. Hit the "open" button to open hailing frequencies. Once the port is open you can type in commands like any terminal software in the text box above the open button. To start engraving a file you can ether type in the file path or click on the browse button and select a file.
When you click on "print" your file transfer will begin. The file will be transferred until the buffer on the Arduino is full, about 20 rows or so. When the buffer is ready for more data another row will be transferred. When you hit stop the transfer will end but the Arduino will not stop until the buffer is empty. When you hit the "close" button or exit the program the serial port will be closed and any transfer will be stopped.
Sometimes there will be a G-code that Grbl can’t interpret and will return an error. Most of the times these errors can be ignored but they will show up in the sender. This can be comments or the start and end "%" sign. If there is a comment after a command there will be an error but the command will still be executed. For example "G21 (All units in mm)" the G21 command will be executed but the comment will give an error.
| « Previous Step | Download PDFView All Steps | Next Step » |
















































I was trying out a simple square with the laser engraver extension in Inkscape 0.48 and encountered the following error:
Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected.
Select the active tab - Laser.
And no output file is being generated. Is the laser engraver specific to any particular version of inkscape? Please guide.
Thanks & regards
In Inkscape, when you select Extensions>Laserengraver>Laser the pop-up window has two tabs "Laser" and "Preferences". Make sure the "Laser" tab is selected before clicking the "Apply" button. If the "Preferences" tab is active you will get the error.
(Am a newbie with Inkscape :D )
You wrote the front end that grbl is missing.
I did want to point out that it seems to require Microsoft .net 3.5, So if anyone is having issues try installing it first.
Good job, and awesome project you deserve the epilog laser.
We really enjoy your instructable ! But experience some bad events.
Everything is ready now. Unfortunately, we would like to translate it to organize workshop for some students with a cool project.
While we run print with GcodeSender on the right COM only one motor is turning and we need to throw 6V to make them move. This is not due to the motors themselves. After, we can't use the circuit anymore.after a Bad error format.
Do have any clue ? Can we send you some pictures ?
I will do what I can to help you out.
Thanks a lot for your help !!
It doesn't work like broken pieces, the ON LED are lighting and there are current going. It's just that we can't communicate with the microcontroller. If we write in the serial terminal $ we should see the list of the parameters, but after the bug nothing happens anymore.
The photos are there:
http://img831.imageshack.us/i/photo4ev.jpg/
http://img862.imageshack.us/i/photo3rz.jpg/
http://img651.imageshack.us/i/photo2xhw.jpg/
http://img19.imageshack.us/i/photo1wcz.jpg/
If you need any details or different pictures, we will do them. We will let you know about our next experiments in a few days.
Enjoy your day !
Pleased to hear that Gcodetools now has a fork :)!
( http://en.wikipedia.org/wiki/Fork_(software_development) )
If you got any questions, I'll be glad to answer!
PS I'm not sure but possible Gcodetools can fit your needs with out modification. For example you can add arbitrary code to turn on/off the laser just before/after cutting each path. Just modify Gcode before path and Gcode after path in the tool's definition.
I think you can use the original Gcodetools without to much of a hassle. I just stripped it down to make it easier and more "to the point" when generating output for laser engravers. And also removing the Z axis save a little time when engraving.
Just in case, according removing Z moves in new dev version we have postprocessor function which allows to remove it automatically using regular expressions. ( regex("G0\d\s*Z.*","(z motion removed)"); ).
Hello Nick, nice of you to stop by. There is one feature that's very important for cutting yet not in GCodetools (as far as I can tell). I'm wondering what may be involved in implementing it.
I'm talking about sequencing of enclosed shapes. Meaning, if there is a shape within a shape, you really want to cut the smaller one, the one that's inside, first. Otherwise the larger shape gets separated from the sheet and can move around and then the position of the smaller shape is wrong (or it wouldn't cut at all).
I'm new to GCodetools (only used it after visiting Groover's project) and was trying to make something like that in DXF2GCODE but failed to make anything reliable (also made difficult for me because the comments in DXF2GCODE are in German). I tried to sort the shapes based on the number of lines of G-Code each consists of (outer shapes are often rather complex) but that backfires spectacularly when you have a complex shape, like a gear, inside a simple shape like a square. I contemplated a more complex sorting based on the length of the perimeter of the shape but the gear inside a square would still fail to sort properly.
In any case, do you have any idea about approaching this issue and would you be interested in solving it ? It would make any GCodetools user that cuts with laser, plasma or water jet (and that includes Groover's pocket engraver) happy.
One of them could fill your needs. It changes ordering behavior.
So you can choose between cutting:
Path by path - will reorder all paths in the layer and cut them in the order they appear (subpaths are not reordered)
Subpath by subpath - will break all paths appart so cutting goes subpath by subpath
And pass by pass - for multi pass cutting cuts first pass for all paths, then next pass ...
Also there's an option to cancel reordering, so the paths will be cut in the order they appear in the drawing.
Thanks, I'll take a closer look. Do you mean some changes in the code have to be done or those are options available through the tool settings?
Also, I forgot to mention one feature that would be extremely useful as well: is it possible to take the object's name from the properties and add it as a G-Code comment before the code for this shape begins? I would like to experiment with cutting different shapes at different speeds and it would be really handy if the shapes are marked in the resulting GCode.
Thanks!
And you'll got to run python create_inx.py to create all the .inx files.
These options will appear at the Path to gcode tab.
----
I'll try to add naming feature soon. How do you think that path id will be anought or not?
I personally think ID from the Object Properties would be enough BUT I don't know where other people prefer to enter the additional info about the object: we also have Label, Title and Description in that Object Properties window.
I think, since access to the object properties has to be figured out first anyway, it may be prudent to collect all four properties and add them just above the GCode lines for the object, in parentheses, like
(ID: rect123yyy )
(Label: Outer_Shape_1 )
(Title: Body Left )
(Description: cut this from yellow foam )
M3 F75
G0 X2.75 Y3.25
G1 X2.75 Y3.00
.....
M5
(ID: rect124yyy )
(Label: Outer_Shape_2 )
(Title: Body Right )
(Description: cut this from black foam )
M3 F100
G0 X3.75 Y2.25
G1 X3.75 Y2.00
.....
M5
So, whatever your preference about where to enter it, you can still see the additional info about the shape you need.
Hope it makes sense to you, I've still not looked at the code yet.
options tab now has an comment string each [name] will be replaced by tag named "name" if the path has this tag and with "none" if it has not.
:newline: is replaced by new line
So you can use for example you can use such comment string:
Name: [name] :newline: Title: [title]
But you'll have to add name and title values to each path maually using Inkscape's XML Editor (Ctrl+Shift+x)
Thanks, I'll play with that.
Would it be safe to assume that hand-editing these properties in the Inkscape's XML Editor has the same effect as selecting the path, right-clicking on it, selecting "Object Properties" and editing the titles there? I've never used the manual editing of XML before because there was really no need - all the changes you make in "Object Properties" are reflected in the SVG's XML right away AND you don't have to manually keep track of the path IDs - can be very tedious to do that by hand, especially on a complex drawing.
Could you please clarify that distinction between using XML Editor and changing "Object Properties"
Hey I've not seen opject properties before :).
I think it's a better way to use then instad.
I'll got to change the code...
This is awesome, Nick! Thank you for quick response. Work got me pinned down last several days, I hope to try your new version on the weekend.
Post me back if you'll got any interesting results.
bzr branch lp:gcodetools
to install bazaar on Ubuntu or other Debian based Linux distros just run
sudo apt-get install bzr
any idea what that means?
If you open the G-code in a text editor you can see the rows.
I tried a simple output from the Inkscape extension and got a couple of errors. First there are a % in the beginning that can be ignored. The next error are G49 "Tool length offset compensation cancel" this would not mater much to a laser anyway. Third error comes from a comment, G21 (All units in mm). The G21 command will be executed but the comment will give an error. Then everything runs smooth until the final % sign.
I will make some changes in the Inkscape extension during the day to minimize the errors.
All you need to do it is create "header" and "footer" files in the output directory.
Is there anyway to get the source codes of the:
Laser engraver extension
G-code sender
I would like to see it work on OS X or Ubuntu...