cnc-club / gcodetools Goto Github PK
View Code? Open in Web Editor NEWCAM extension for Inkscape to export paths to Gcode
CAM extension for Inkscape to export paths to Gcode
Generated G-code contains commands to lift cutting tool to save Z position even if it does not actually move to new location but just continues at the same position.
This is especially annoying when clearing area. Tool lifts up frequently, just wasting time.
Please check line 433 in dxf-input.py line 433
There is a division / 0 hard coded at the end. It has to be something else. 100.0 instead of 00.0 works but I'm not sure that was your intention.
Traceback (most recent call last):
File "gcodetools-dev.py", line 7870, in
gcodetools.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
self.effect()
File "gcodetools-dev.py", line 7786, in effect
self.path_to_gcode()
File "gcodetools-dev.py", line 5480, in path_to_gcode
b.from_old_style(c)
File "/usr/share/inkscape/extensions/biarc.py", line 785, in from_old_style
self.clean()
File "/usr/share/inkscape/extensions/biarc.py", line 620, in clean
closed = self.items[i][0].st.near(self.items[i][-1].end)
IndexError: list index out of range
ween i am clicking on apply this is the error i getting.
File "gcodetools.py", line 94
def bezierslopeatt(((bx0,by0),(bx1,by1),(bx2,by2),(bx3,by3)),t):
^
SyntaxError: invalid syntax
inkscape 1.2
I got following when I try to engrave simple triangle:
Traceback (most recent call last):
File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5930, in <module>
Gcodetools().run()
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 231, in run
self.save_raw(self.effect())
File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5881, in effect
self.options.active_tab()
File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 4936, in tab_engraving
jjmin, iimin, w = get_biggest((x1, y1), (nx, ny))
File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 4580, in get_biggest
if abs(ii - i) == 2 and nlLT[j][(ii + i) / 2 - 1][3] <= 0:
TypeError: list indices must be integers or slices, not float
Commenting out lines 4580 and 4581 helps to get g-code.
time to time I see that:
Traceback (most recent call last):
File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5930, in <module>
Gcodetools().run()
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 231, in run
self.save_raw(self.effect())
File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5881, in effect
self.options.active_tab()
File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 4771, in tab_engraving
gcode_3Dleft = self.my3Dlayer.add(Group(gcodetools="Gcode 3D L"))
AttributeError: 'NoneType' object has no attribute 'add'
While designing drawing for exporting to gcode, it is necessarz to save some objects within document but not to convert them to gcode.
Logical way is to put objects on layer and then hide layer. That is how it is done for printing.
Geocodetools does not follow this logic. It treats all paths in document regardless if they are visible or not. It should ignore paths that are not visible and not export them to gcode.
Typical gcode generated by gcodetools looks like:
%
(Header)
(Generated by gcodetools from Inkscape.)
(Using default header. To add your own header create file "header" in the output dir.)
M3
(Header end.)
G21 (All units in mm)
(Start cutting path id: path11917)
(Change tool to Default tool)
G00 Z3.000000
G00 X8.351943 Y249.047186
My CNC machine has Repetier FW so I'm using Octoprint for remote control.
But each time I have to remove strings with comments (like(Start cutting path id: path11917)
). Otherwise Octoprint doesn't work and showing Unhandled communication error
I think it's a good idea to add "comments removal" option to Preferences
or Options
tab of Path to gcode
mode
When generating gcode by using the engraving method it gives it a weird 260mm offset in the negative Y direction.
it doesnt do that when i select path to gcode.
any ideas?
Also the gcode generation is very slow.
Issue first reported in the Inkscape bug tracker (https://bugs.launchpad.net/gcodetools/+bug/1685740).
For your information Inkscape 0.92 uses Gcodetools v1.7.
when i generate a gcode from a svg or a shape, i have always a dimensions problem, 10cm (in inkscape) = 28.222mm (in gcode), i tried with "gcode tools" and other 3 extensions, maybe it's swapped "mm" with "pt"
ex: (10cm square)
G00 Z5.000000
G00 X28.222222 Y0.000000
G01 Z-0.125000 F100.0(Penetrate)
G01 X28.222222 Y28.222222 Z-0.125000 F400.000000
G01 X0.000000 Y28.222222 Z-0.125000
G01 X0.000000 Y0.000000 Z-0.125000
G01 X28.222222
I would like to be able to input a config file for gcodetools and and svg and then generate a gcode file by running inkscape as a cli. Is something like that possible?
gcodetools/stable/gcodetools.py
Line 3712 in ce38e8f
... I'm being too lazy to make a pr
Sometimes the GCode generator crashes with an "index out of range" exception from cubicsuperpath.py.
I traced the problem to a bug in cubicsuperpath.py. The simple fix is described in the following inkscape bug report:
When path is treated as area, path outline is converted to too much paths which are places one on top of another (meaning tool unnecessairly cuts the same path number of times).
It seems like number of paths for area outline is related to number of paths within area.
In one occasion I ended up with abuot 100 paths for outline route making cutting tool circling around 100 times following the same path (and cutting nothing as the first circle cut all what was needed) and wasting time.
Issue first reported in the Inkscape bug tracker (https://bugs.launchpad.net/gcodetools/+bug/1666824).
For your information Inkscape 0.92 uses Gcodetools v1.7.
Trying to work with INKSCAPE 0.92 drawings and conversion to Gcode having problems
While drawing in node mode in outline mode the display goes IN and OUT if you nug page up/down or to the side display comes back temporarily.
Extensions/gcodetools/orientation points menu is so big the apply button is not visible and you can not get to it. Move hits top of page minimize grayed out
Also after you path to Gcode your drawing changes to arrows and you get default tool page in green and you can edit text but after you change tool diameter what do you do next? discovered how to take the green out but not how to get just drawing back. or how to save default tool page.
Gcode add on message to say "file generated" plus your good notes. operating system just calls it a file. windows 10 does not show extensions.
Load 3D clover "org to path""path trace bitmap" edit line drawing then "Extensions/Gcodetools/path to Gcode" file generated but there is NO Image or TOOL PATH in UCCNC just Gcode and when program M2 is reached everything stops. HOW DO I GENERATE A TOOL PATH?
Shouldn't e.affect()
be e.effect()
? Seems to be a longstanding issue that has propagated to several other plugins for GCode, including JTech Photonics laser plugin and Slacker's Delight laser plugin. None of them work.
Issue first reported in the Inkscape bug tracker (https://bugs.launchpad.net/gcodetools/+bug/1680760).
For your information Inkscape 0.92 uses Gcodetools v1.7.
Hi, I have been using inkscape for a long time to generate G code for home milling, and it has always been great, but I installed the new version of Inkscape, and when I generate the code, it comes out much smaller than I originally drew it, This is because the second targeting point, which should dial 100mm, does it in a very different position, attached screenshot with the error, I have tried to reinstall both the 32-bit version and the 64-bit version, both fail, I have tested it on two different PC's in case there was any failure in old files.
I'm a little desperate because I can not generate any code or find the workaround. I've tried moving the orientation point by hand, but generating the code tells me that it does not exist and re-creates it in the same wrong place.
file:gcodetools/stable/gcodetools.py
The line 5864 doc_height = inkex.unittouu(self.document.getroot().get('height'))
give me error
"AttributeError: 'module' object has no attribute 'unittouu'"
change with code
doc_height = self.unittouu(self.document.getroot().xpath('@height', namespaces=inkex.NSS)[0])
http://www.tylerforsythe.com/2015/02/inkscape-laser-engraver-bug/
I know this project seems dead, but giving it a shot... For some reason, gcodetools will close open paths (say, hershey text) by itself, resulting in an unwanted cut from the end point to the starting point of the path. Any help or pointers on where to look for fixing it are appreciated.
Hello,
As far as I can see, short project stats:
Please excuse me for asking this question: is this project still alive, i.e. actively maintained?
Is it possible to merge pull requests from other forks into mine, to get a more current version?
Thanks.
Background: My wife uses a vector drawing program called Garment Designer. Unfortunately it doesn’t support export of vector files so we “print” a pdf using the native Apple print dialog. This is opened in Inkscape in order to use the gcodetools extension.
Problem: The generated gcode gives rise to a pattern nearly 4 times larger than the original.
Workaround: Inspection of the Orientation Points reveals that instead of being spaced 100mm apart the distance is 26.458mm. This seems to indicate that although I have correctly set page units to mm, somewhere in the pdf (and subsequent svg) there is a setting indicating px. The workaround is to select the Orientation Points group and apply a scale of 377.955% (the inverse of the 26.458 distance).
I did try to modify the code but although I successfully added an option to the inx file I’m not well enough versed in Python to make use of the option! Could you consider adding that option for those who are working from pdf source and have the same issue. Thanks.
Just look at line 93 of plotter.inx
:
<effect needs-live-preview="false" needs-document="true">
With needs-live-preview
set to false
in every gcodetools*.inx file you are able to get rid of unnecessary "Preview".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.