My application is to convert vector line art to a gcode file, to then open and plot in a large scale custom XY pen plotter I'm building. Question about the gcodetools extension native in Inkscape. - How do you reset the extension to redo the parameters? Take the following as an example. Draw a single vector shape and convert it to gcode. That works. I get what looks looks like a proper gcode file - (although I must say this extension seems woefully primitive) . Now add another shape on the same layer and go back thru the process again to generate a revised gcode file to reflect the change. When I attempt to recovert the image, the extension does not capture the new shape data in its gcode parameter set. The extension seems to be stuck on the original parameter settings with the original object. I've looked and looked but cannot find a way to clear out the existing settings of this extension and start over again. No "clear" or "reset" or anything of that nature. Even when I try copying and pasting the graphic elements to a new layer and go thru the conversion steps again, the extension still will not give up on the origional settings. So far my only fix is to trash the image and start all over again to get rid of the old extension parameters. Obviously this is no solution. Is there a way to completely clear out the gcodetools extension completely and/or reset it's parameters?
The gcode extension is under-maintained. i.e. it doesn't have a developer actively working on it, and because of it's size and complexity, it's having a very rough time being ported to the new 1.0 API. So as well as the dificulties you might be having, be aware that the code has some serious maintainability issues which confound fixing issues such as this.
If you know python, I'm looking for people who can meddle with the code and I'm willing to mentor you if you'd like to get into it on chat.inkscape.org this would be so you can figure out your issue and fix what needs to be fixed.
Do make sure you're using the latest 1.0 beta with the latest gcode tools extension.
I tried 1.0beta first but had to go back to .92 due to crazy stuff happening - like the extension locking up and locking up Inkscape as well - and a host of other problems I encountered with 1.0beta.. I'm on MacOS 10.14. I can build a large scale plotter with a grbl controller hardware interface, but I'm not a programmer so can't do the conversion part. I wish I was. I think I have a good idea of what is required. I'd even consider hiring someone to write the code, but that would open up another can of worms, not to mention the cost. Unfortunately the needs of a cnc app are unnecessarily complicating the much simpler requirements of a plotter app IMO. The task of generating gcode for CNC requires parameters like tool size, multi-pass and other machine control tasks. Gcode for pen plotting needs none of these paramters. For that matter gcode for laser engraving is not that far off from pen plotting. Not to trivialize it, it seems to me, at its core, a plotter app task is simply to convert one text file form in to another. The xml text of an svg file in to a text file of another sort. A task I would assume much less complex if you remove the CNC part from the equation. Either way, what surprises me is with all the popularity of cnc machines these days, how primitive the aolutions are for two of the most popular vector apps - Illustrator and Inkscape - I use both. There is of course dedicated apps for specific cnc machines that I assume work, at hundreds of dollars or more, but I question how suitable they may be for the straight forward pen plot app. BTW - as a side bar - what could be equally valuable and applicable a feature for inkscape is a direct to plotter driver vs the extension path. So to sum up your answer - right now I'm out of luck trying to use gcodetools - at least on a Mac - and there is no solution that is foreseeable for the moment. Is that where I'm at?
Without volunteers or investment we are where we are. This is pretty much how all open source works, it's driven by not just demand, but by the ability of users to have the courage to take control of the situation and do something to fix it. As the extensions leader, I'm trying my best to wrangle the code, but I am but only one volunteer. I'm also not working on 0.92 (and no one is) so that code isn't going to change at all.
I will say that gcode extensions are overly complicated with way too much bit rot. But they do a LOT of things.
Functions that are useful are things like converting arcs to curves, dealign with different styles and formulating the constrains of the dxf outputs correctly. So I can see they do useful things more than just text conversions.
As for internal vs extensions. There really isn't much of a difference, good code is good code and bad code is bad code, it doesn't matter much if it's written in C++ or in python. There's no magic pool of volunteers who would look after gcode conversion if it was inside Inkscape and would probably be ejected for being under maintained after a time.
So far gcode/dxf users have been just technical enough to have high requirements and high standards but not technical enough to help 😉 but then I look at the code and wilt too, so there's no shame in running away from that beast of a thing. Maybe what's needed is a fresh write from the ground up. Would be an interesting google summer of code if we could find a student worker to do it.
You bring up an interesting idea. I'm located in the Raleigh Triangle area, not far from NC State. A renown engineering school. Perhaps there is a CS grad student there looking for a course project. I'll try making some calls. That would be a win-win if so. In the meantime, judging your response to this app, sounds like 1.0 Mac final are not imminent forcing me to consider running Inkscape via simulated Windows to get more stable results. If so, does that mean I will be given the ability to reset or clear out the paramaters of the gcodetools extension unlike the current issue I have with the .92 Mac version?
You could edit the svg in a text editor to manually clear out any attributes, or save as plain svg (which should strip anything out).
The 0.92 release of Inkscape for Mac is considered dire compared to the 1.0, but I understand you've had some bad experenes with the beta. I know René is working hard on the Mac release, so any help you can give to testing that release would be very welcome and useful for other Mac users. As a Linux user myself I feel omewht agrieved about our non Free Desktop users because there's lots that gets in the way of a smooth release for those platforms which we don't have the same control over as we do on Linux.
Thx for the suggestion, but that's not a practical solution. I do very unique vector artwork (I'd post a link to my work but not sure that's allowed in this forum) that is composed of hundreds, in some cases thousands, of open and closed vector shapes. The large scale pen plotter I'm building is to advance my exclusive technique to the next level. As such it requires plotting hundreds, if not thousands of vector line segments and shapes. I have a feeling even a bug free gcodetools is not up to the task so I continue searching for a workable svg to gcode solution - unsuccessfully so far. That said, seems to me the appraoch of using gcode as the vehicle to plotting is overkill. I own a Graphtec commericial vinyl cutter - wihich is essentially a glorified plotter on belts and rollers with a cutting blade in place of a pen - which is driven directly in realtime from a Graphtec plugin in Illustrator called Cutting Master 4. It works like a charm and is rocket fast - all in realtime on a USB cable. No mucking about in svg and gcode. Instread of slogging thru CNC conversion math to convert one coordinate ste to another coordinate set, has anyone attempted to add a realtime plotter driver to Inkscape instead? That to me would be the proper solution - just like my vinyl cutter. Clearly there is a lot more to driving a laser or spindle tools so these conversion steps are necessary for cnc apps. Tool choice, tool size, multipass, etc are parameters that must be defined by the CNC conversion software. Plotting however, is basically a one pass process, with perhaps a little finesse to account for filled in shapes. Instead I have to wade thru parameter settings that are not applicable in an attempt to fake the software interface in to thinking the tool (pen) has no width and the media has no depth.
I do very unique vector artwork (I'd post a link to my work but not sure that's allowed in this forum)
You are totally welcome to link to your work! In fact, please, please, please do! I think we still hope to create a feature on the main website, for users to share their projects for which they use Inkscape. It's not quite there yet, but I hope before too long.
In the meantime, you're welcome to share your whole Inkscape story, if you like. You could use either Share Finished Artwork board or How Do You Use Inkscape? board.
I can't help much regarding google summer of code. But if that could result in fixing gcodetools extensions, I'd be all for it. I've been quite frustrated trying to help users with them. (The original creators stopped supporting them shortly after getting them packaged with Inkscape. Very frustrating....)
Additionally, resetting the extension can be done by opening the file listed in Edit > Preferences > System: User preferences and deleting all the lines that start with "ru.cnc-club.", taking care that any closing or opening angle brackets are kept.
Hey sorry to chime in to this old thread, but I wanted to say I have completely overhauled big parts of the gcodetools script back when I was working with inkscape 0.92 and am interested in seeing how it would work to 'port' the script to the new alpha version.
I'm not very skilled with programming, but I did manage to hack the script in such a way that I can use it for my custom pen plotter. Sadly the original developers never replied to any of my questions and I am not sure if it is allowed to port a script without their confirmation but I would like to try out if I can at least make my own version work. From there I might be able to see if I can adjust the original script to InkScape 1.0
What I need to know is what's different in how Inkscape 0.92 and 1.0 alpha in terms of communicating with scripts. I am not able to work fulltime on this but it would only seem fair to share my advancements because both the script and the software are open source and I'm willing to contribute.
Thx for the update. Glad to hear that some effort still exists to come up with a working solution. That said, I can report I have made a lot of progress towards this solution since my last post. I now have a working 40" x 40" pen plotter driven by a GRBL/gcode controller that I built using parts from OpenBuilds.com and my own custom built 3D printed pen holder. I'm able to take a complex .svg file of any size (thousands of open and closed vectors if I wish) and flawlessly plot it as an overlay on to my artwork. My original goal when I set out to do this. I've learned many things in the process. Foremost, not all gcode generators are equal. Way more thought goes in to generating the code than I thought - meaning - things like the choice of tool path and feed rate matters, to name a couple of parameters. Further, other than a web app called CAM from OpenBuilds, surprisingly there is no gcode generator (that I could find) that specially addresses pen plotting. Code that specifically targets the up and down move of a pen holder servo. Gcode generators of all kind address 3D printing, laser and spindle engraving and other plotting functions, but not pen plotting. It takes a backdoor method to address that app, as I discovered. That said, I think it is necessary and proper, and very valuable to add a functional gcode extension to Inkscape to address simple straight forward engraving and such applications at the very least. In my case my workflow is as follows: I import an svg file in to Lightburn laser software. A relatively inexpensive app for engraving. Then with only a few minor settings in place I rehearse and optimize the tool path and have the app generate gcode. Then using a text editor I "find and replace" certain parameters in the code intended for laser control in to up and down gcode values for the pen holder servo - with one very important addition. I add a gcode "dwell time" parameter ( in my case .1- .2 sec) to each servo move to give it time to move the pen up and down before moving the plotter transport - very important. It may sound clunky but in practice it is not that difficult to execute, and more important the plot is 100% reliable no matter how complex the svg. I think it would be an enormous effort to create an Inkscape extension that covered all the bases like this in detail, so a wiser course might be to limit it to well executed gcode basics IMO. BTW - if you want to see some excellent gcode generation in action, check out Lightburn.com
@BearWithMe you need to come to https://chat.inkscape.org we can have a chat about the gcodetools. We're looking for developers who can give that code some love for the 1.0 and up releases. It's such a large extension and it's so poorly tested that it's in danger of being removed from Inkscape if we can't find more people to spend some time improving it.
But to get it up to speed, any new developer will need an introduction to the interface in 1.0 and I can spend time with anyone to get them acquainted, answer questions, etc.
My application is to convert vector line art to a gcode file, to then open and plot in a large scale custom XY pen plotter I'm building. Question about the gcodetools extension native in Inkscape. - How do you reset the extension to redo the parameters? Take the following as an example. Draw a single vector shape and convert it to gcode. That works. I get what looks looks like a proper gcode file - (although I must say this extension seems woefully primitive) . Now add another shape on the same layer and go back thru the process again to generate a revised gcode file to reflect the change. When I attempt to recovert the image, the extension does not capture the new shape data in its gcode parameter set. The extension seems to be stuck on the original parameter settings with the original object. I've looked and looked but cannot find a way to clear out the existing settings of this extension and start over again. No "clear" or "reset" or anything of that nature. Even when I try copying and pasting the graphic elements to a new layer and go thru the conversion steps again, the extension still will not give up on the origional settings. So far my only fix is to trash the image and start all over again to get rid of the old extension parameters. Obviously this is no solution. Is there a way to completely clear out the gcodetools extension completely and/or reset it's parameters?
Hi Allan,
The gcode extension is under-maintained. i.e. it doesn't have a developer actively working on it, and because of it's size and complexity, it's having a very rough time being ported to the new 1.0 API. So as well as the dificulties you might be having, be aware that the code has some serious maintainability issues which confound fixing issues such as this.
If you know python, I'm looking for people who can meddle with the code and I'm willing to mentor you if you'd like to get into it on chat.inkscape.org this would be so you can figure out your issue and fix what needs to be fixed.
Do make sure you're using the latest 1.0 beta with the latest gcode tools extension.
I tried 1.0beta first but had to go back to .92 due to crazy stuff happening - like the extension locking up and locking up Inkscape as well - and a host of other problems I encountered with 1.0beta.. I'm on MacOS 10.14. I can build a large scale plotter with a grbl controller hardware interface, but I'm not a programmer so can't do the conversion part. I wish I was. I think I have a good idea of what is required. I'd even consider hiring someone to write the code, but that would open up another can of worms, not to mention the cost. Unfortunately the needs of a cnc app are unnecessarily complicating the much simpler requirements of a plotter app IMO. The task of generating gcode for CNC requires parameters like tool size, multi-pass and other machine control tasks. Gcode for pen plotting needs none of these paramters. For that matter gcode for laser engraving is not that far off from pen plotting. Not to trivialize it, it seems to me, at its core, a plotter app task is simply to convert one text file form in to another. The xml text of an svg file in to a text file of another sort. A task I would assume much less complex if you remove the CNC part from the equation. Either way, what surprises me is with all the popularity of cnc machines these days, how primitive the aolutions are for two of the most popular vector apps - Illustrator and Inkscape - I use both. There is of course dedicated apps for specific cnc machines that I assume work, at hundreds of dollars or more, but I question how suitable they may be for the straight forward pen plot app. BTW - as a side bar - what could be equally valuable and applicable a feature for inkscape is a direct to plotter driver vs the extension path. So to sum up your answer - right now I'm out of luck trying to use gcodetools - at least on a Mac - and there is no solution that is foreseeable for the moment. Is that where I'm at?
Without volunteers or investment we are where we are. This is pretty much how all open source works, it's driven by not just demand, but by the ability of users to have the courage to take control of the situation and do something to fix it. As the extensions leader, I'm trying my best to wrangle the code, but I am but only one volunteer. I'm also not working on 0.92 (and no one is) so that code isn't going to change at all.
I will say that gcode extensions are overly complicated with way too much bit rot. But they do a LOT of things.
Functions that are useful are things like converting arcs to curves, dealign with different styles and formulating the constrains of the dxf outputs correctly. So I can see they do useful things more than just text conversions.
As for internal vs extensions. There really isn't much of a difference, good code is good code and bad code is bad code, it doesn't matter much if it's written in C++ or in python. There's no magic pool of volunteers who would look after gcode conversion if it was inside Inkscape and would probably be ejected for being under maintained after a time.
So far gcode/dxf users have been just technical enough to have high requirements and high standards but not technical enough to help 😉 but then I look at the code and wilt too, so there's no shame in running away from that beast of a thing. Maybe what's needed is a fresh write from the ground up. Would be an interesting google summer of code if we could find a student worker to do it.
You bring up an interesting idea. I'm located in the Raleigh Triangle area, not far from NC State. A renown engineering school. Perhaps there is a CS grad student there looking for a course project. I'll try making some calls. That would be a win-win if so. In the meantime, judging your response to this app, sounds like 1.0 Mac final are not imminent forcing me to consider running Inkscape via simulated Windows to get more stable results. If so, does that mean I will be given the ability to reset or clear out the paramaters of the gcodetools extension unlike the current issue I have with the .92 Mac version?
You could edit the svg in a text editor to manually clear out any attributes, or save as plain svg (which should strip anything out).
The 0.92 release of Inkscape for Mac is considered dire compared to the 1.0, but I understand you've had some bad experenes with the beta. I know René is working hard on the Mac release, so any help you can give to testing that release would be very welcome and useful for other Mac users. As a Linux user myself I feel omewht agrieved about our non Free Desktop users because there's lots that gets in the way of a smooth release for those platforms which we don't have the same control over as we do on Linux.
Thx for the suggestion, but that's not a practical solution. I do very unique vector artwork (I'd post a link to my work but not sure that's allowed in this forum) that is composed of hundreds, in some cases thousands, of open and closed vector shapes. The large scale pen plotter I'm building is to advance my exclusive technique to the next level. As such it requires plotting hundreds, if not thousands of vector line segments and shapes. I have a feeling even a bug free gcodetools is not up to the task so I continue searching for a workable svg to gcode solution - unsuccessfully so far. That said, seems to me the appraoch of using gcode as the vehicle to plotting is overkill. I own a Graphtec commericial vinyl cutter - wihich is essentially a glorified plotter on belts and rollers with a cutting blade in place of a pen - which is driven directly in realtime from a Graphtec plugin in Illustrator called Cutting Master 4. It works like a charm and is rocket fast - all in realtime on a USB cable. No mucking about in svg and gcode. Instread of slogging thru CNC conversion math to convert one coordinate ste to another coordinate set, has anyone attempted to add a realtime plotter driver to Inkscape instead? That to me would be the proper solution - just like my vinyl cutter. Clearly there is a lot more to driving a laser or spindle tools so these conversion steps are necessary for cnc apps. Tool choice, tool size, multipass, etc are parameters that must be defined by the CNC conversion software. Plotting however, is basically a one pass process, with perhaps a little finesse to account for filled in shapes. Instead I have to wade thru parameter settings that are not applicable in an attempt to fake the software interface in to thinking the tool (pen) has no width and the media has no depth.
No one has attempted to fork inkscape to make a direct driver for plotters.
You are totally welcome to link to your work! In fact, please, please, please do! I think we still hope to create a feature on the main website, for users to share their projects for which they use Inkscape. It's not quite there yet, but I hope before too long.
In the meantime, you're welcome to share your whole Inkscape story, if you like. You could use either Share Finished Artwork board or How Do You Use Inkscape? board.
I can't help much regarding google summer of code. But if that could result in fixing gcodetools extensions, I'd be all for it. I've been quite frustrated trying to help users with them. (The original creators stopped supporting them shortly after getting them packaged with Inkscape. Very frustrating....)
Additionally, resetting the extension can be done by opening the file listed in Edit > Preferences > System: User preferences and deleting all the lines that start with "ru.cnc-club.", taking care that any closing or opening angle brackets are kept.
Hey sorry to chime in to this old thread, but I wanted to say I have completely overhauled big parts of the gcodetools script back when I was working with inkscape 0.92 and am interested in seeing how it would work to 'port' the script to the new alpha version.
I'm not very skilled with programming, but I did manage to hack the script in such a way that I can use it for my custom pen plotter. Sadly the original developers never replied to any of my questions and I am not sure if it is allowed to port a script without their confirmation but I would like to try out if I can at least make my own version work. From there I might be able to see if I can adjust the original script to InkScape 1.0
What I need to know is what's different in how Inkscape 0.92 and 1.0 alpha in terms of communicating with scripts. I am not able to work fulltime on this but it would only seem fair to share my advancements because both the script and the software are open source and I'm willing to contribute.
Where do I get started? :)
Thx for the update. Glad to hear that some effort still exists to come up with a working solution. That said, I can report I have made a lot of progress towards this solution since my last post. I now have a working 40" x 40" pen plotter driven by a GRBL/gcode controller that I built using parts from OpenBuilds.com and my own custom built 3D printed pen holder. I'm able to take a complex .svg file of any size (thousands of open and closed vectors if I wish) and flawlessly plot it as an overlay on to my artwork. My original goal when I set out to do this. I've learned many things in the process. Foremost, not all gcode generators are equal. Way more thought goes in to generating the code than I thought - meaning - things like the choice of tool path and feed rate matters, to name a couple of parameters. Further, other than a web app called CAM from OpenBuilds, surprisingly there is no gcode generator (that I could find) that specially addresses pen plotting. Code that specifically targets the up and down move of a pen holder servo. Gcode generators of all kind address 3D printing, laser and spindle engraving and other plotting functions, but not pen plotting. It takes a backdoor method to address that app, as I discovered. That said, I think it is necessary and proper, and very valuable to add a functional gcode extension to Inkscape to address simple straight forward engraving and such applications at the very least. In my case my workflow is as follows: I import an svg file in to Lightburn laser software. A relatively inexpensive app for engraving. Then with only a few minor settings in place I rehearse and optimize the tool path and have the app generate gcode. Then using a text editor I "find and replace" certain parameters in the code intended for laser control in to up and down gcode values for the pen holder servo - with one very important addition. I add a gcode "dwell time" parameter ( in my case .1- .2 sec) to each servo move to give it time to move the pen up and down before moving the plotter transport - very important. It may sound clunky but in practice it is not that difficult to execute, and more important the plot is 100% reliable no matter how complex the svg. I think it would be an enormous effort to create an Inkscape extension that covered all the bases like this in detail, so a wiser course might be to limit it to well executed gcode basics IMO. BTW - if you want to see some excellent gcode generation in action, check out Lightburn.com
@BearWithMe you need to come to https://chat.inkscape.org we can have a chat about the gcodetools. We're looking for developers who can give that code some love for the 1.0 and up releases. It's such a large extension and it's so poorly tested that it's in danger of being removed from Inkscape if we can't find more people to spend some time improving it.
But to get it up to speed, any new developer will need an introduction to the interface in 1.0 and I can spend time with anyone to get them acquainted, answer questions, etc.