Giter VIP home page Giter VIP logo

gcodetools's Introduction

gcodetools

CAM extension for Inkscape to export paths to Gcode

More info at http://www.cnc-club.ru/forum/viewtopic.php?t=35

License

Inkscape and Gcodetools are licensed under GNU GPL.

Install

Windows

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.

Linux

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.

gcodetools's People

Contributors

cnc-club avatar furanshishouco avatar pyvirus avatar tomate44 avatar voxelcam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gcodetools's Issues

Division by 0 in dxf_input.py line 433

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.

Main function call misspelled?

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.

Generator does not ignore hidden layers

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.

Inkscape 1.2 "TypeError: list indices must be integers or slices, not float"

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'

Project actively maintained?

Hello,

As far as I can see, short project stats:

  • last commit Jan 2016
  • 14 open issues since 2016
  • 5 pull requests since 2017

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.

gcode generation issue

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

Extentions/gcodetools/orientation points

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

  1. 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.

  2. 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

  3. 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.

  4. 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.

  5. 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?

Orientation points error

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

Scaling problem and workaround

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.

Problem with using gcode in Octoprint (comments removal)

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

A way to hide "Preview" checkbox

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".

Area outline converts to too many paths in gcode

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.

Engraving open paths

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.

crash while generating g-code with dev version

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

Incorrect orientation points

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.