Author Topic: Inkscape > Extensions > Gcodetools > Path to Gcode  (Read 12124 times)

November 02, 2018, 06:43:16 AM
Read 12124 times

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Hello
I am new here. My name is Ron and I live in France.
This is my first post in this forum. I hope this is the most appropriate section to post my request.
I bought a CNC 2417 engraving machine kit from China, which I assembled & have got working.
My OS is Linux Kubuntu 18.04 and I am using Inkscape 0.92 with Grbl Controller 3.6.1
[Note - I use a Linux Kubuntu laptop to run Inkscape 0.92 and I use a Windows 7 laptop to run Grbl controller
which drip-feeds Grbl to the Arduino Nano board to run the CNC 2417 machine.]
Also, I use CAMotics 1.1.1 to check the G-code that is created by the Gcodetools extension in Inkscape.

Inkscape > Extensions > Gcodetools > displays a drop-down menu containing 11 options beginning with About and ending with Tools library ...
When I click on Check for updates in that drop-down menu, a pop-up window displays:
There is a newer version of Gcodetools you can get it at:
http://www.cnc-club.ru/gcodetools (English version).
So, I downloaded extensions.tar.gz
When I unpacked it I got gcode_tools.inx & gcode_tools.py
I copied gcode_tools.inx & gcode_tools.py to .config > inkscape > extensions
Then I re-started Inkscape
Then I still saw Extensions > Gcodetools with its sub-menu containing 11 options,
but Extensions now also included another option below Gcodetools which was GCODE tools without a submenu.
Notice different names Gcodetools and GCODE tools
When I went to Extensions > Gcodetools > Check for updates, it still said there is a newer version available.
Duh!

So, I uninstalled & reinstalled Inkscape v0.92
Now I see that Gcodetools v1.7 is included with Inkscape v0.92
Whenever I click on Extensions > Gcodetools > Check for updates > Apply
it still says there is a newer version available.
This is misleading because according to the Russian website, v1.7 is the latest stable version.
So, in future, I shall ignore the Check for updates.
However, I now have a serious problem.
After using Gcodetools > Tools library, then Gcodetools > Orientation points, whenever I use Gcodetools > Path to Gcode
it creates a file which only contains a header and footer, no G-code for the object.
So v1.7 just creates a file containing a header and footer only.
No G-code for the object itself is generated, just the header and footer.

I would be most grateful if someone could help me, please.
Is this a known problem with v1.7 or am I doing something wrong?
I am sure that I am following the same sequence as I did before, as I am following my own written instructions.
Essentially this is a 3-stage process: (1) choose a virtual tool (2) create orientation points (3) generate G-code.
Perhaps Gcodetools now works differently.
I know that everything must be in one layer.
I understand the difference between bitmap and vector images and the need to set the path correctly.
I have tried repeatedly to create G-code, but each time I get the same result, just a header and footer.
I have tried everything that I can think of, that I know about.
I don't know what else to do, except as for help.
I posted a request for help in the English section of the Russian website.
Judging by the date, I get the impression the forum is no longer used much.
Hence, my request for help here.
Has anyone else found the same thing happens, just a header and footer?
Is there a known solution for this problem?

  • 0.92
  • Linux Kubuntu 18.04

November 02, 2018, 01:45:45 PM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Can you share a source file, and a resulting gcode file? And also the options that you selected in the extension? (i.e. a full step-by-step, so we can reproduce)

November 03, 2018, 02:54:57 AM
Reply #2

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Many thanks for your prompt reply. Yes, certainly. I am putting it together now, so I should be able to post it shortly.

Here you are are:

Attached file : example_1.svg (image created with Inkscape)
Attached file : example_2.svg (with tool)
Attached file : example_3.svg (with orientation)
Attached file : example_4.svg (with path)
Attached file : example_4.ngc (G-code)
Attached file : instructions_inkscape2gcode.odt
Attached file : butterfly_test_1.ngc (created with previous Inkscape installation)

Files created with Linux Ubuntu 18.04 , Inkscape 0.92 , LibreOffice Writer 6.0.6.2

Please let me know if you require anything else.
« Last Edit: November 03, 2018, 05:53:57 AM by boxcorner »
  • 0.92
  • Linux Kubuntu 18.04

November 03, 2018, 02:43:27 PM
Reply #3

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Yes, I can confirm this. And I think I found the problem - it looks like it was a typical Python beginner error with the 'range' function.

Can you please check if it works if you:

- open the file /usr/share/inkscape/extensions/gcodetools.py as root (this will only work if you have installed the .deb package of Inkscape, not with a snap or flatpak installation - if you have that, uninstall and install the version from the ppa)
- replace the two occurrances of
Code: [Select]
for step in range( 0,  int

by

Code: [Select]
for step in range( 0,  1+int

November 03, 2018, 02:45:44 PM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
(I don't know anything about the gcode format, but the result looked similar to your example - I added a path, so it's not going to look identical to yours)

November 03, 2018, 02:47:41 PM
Reply #5

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
If this works, I should make sure the fix lands in the official version.

November 04, 2018, 03:37:56 AM
Reply #6

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Yes! That did the trick. It seems to work fine now. Many thanks indeed.

As you seem to know Python rather well, I wonder whether you could possibly fix something else, please.
Inkscape > Extensions > Orientation points
The problem is that the height of the Orientation points window is too great and it seems that it can't be resized,
consequently, the buttons at the bottom of the window (Close & Apply) are hidden below the toolbar at the bottom of the screen.
The only way that I can use it is to make the window full size, then I can just reach the top of the Apply button with the mouse pointer.
That's with Inkscape running in Linux Kubuntu. With Inkscape running in Windows 7, on a different laptop, the buttons aren't visible at all.
« Last Edit: November 04, 2018, 05:40:54 AM by boxcorner »
  • 0.92
  • Linux Kubuntu 18.04

November 04, 2018, 04:08:47 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I find it unfortunate that the original developers of these gcodetools extensions, shortly after creating them, stopped providing support for them.  So it's not surprising to me AT ALL, that they aren't keeping them updated.  I suspect they will have to be dropped from Inkscape in the future (perhaps near future), unless someone else "adopts" them for development.

I've learned a little bit about using them, by using trial and error, the rudimentary tutorial which you can find on the Drobchenko forum (if you're diligent) and a simulator, since I have no actual cutter hardware.  In my experience, when you use the Path to Gcode extension, you have to have the Path to Gcode tab open when you click the Apply button.  Otherwise, you don't actually get any gcode.  If I have the Preferences tab open when I click Apply, I get an empty file.

Regarding the "check for updates" issue.  The way I interpret that, is that it's the user's responsibility to compare the version numbers, to find out if there actually is an update or not.  But as I stated earlier, I doubt there will ever be any updates - not from the Drobchenko forum site anyway.  Probably that Check for Updates dialog should be removed, since it doesn't even give a link where to check for updates!
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 04, 2018, 05:31:13 AM
Reply #8

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
I concur, it's unfortunate that the original developers no longer seem to support the G-code extensions. However, I think it would be extremely unfortunate if their gcodetools extensions were dropped from future versions Inkscape, as Inkscape is the only free app that I know of which is capable of producing G-code from vector drawings, or bitmapped (raster) images.

True, you don't need cutter hardware. I use the CAMotics simulator, which works fine in Linux and Windows, to test the G-code before machining.

Correct, when using the Path to Gcode extension, the Path to Gcode extension tab must be selected before clicking on the Apply button. Furthermore, I believe the object itself must be selected, before using the Path to Gcode extension. I think I mentioned that in my basic instructions. If not, then I meant to. I wrote the instructions for myself, as I'm becoming increasingly forgetful.

I agree too about the 'Check for updates' issue. It is misleading and unhelpful.

Thanks for your help.
  • 0.92
  • Linux Kubuntu 18.04

November 04, 2018, 08:10:16 AM
Reply #9

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Ron, you must have quite a small screen... I could stack 1.5 of the kind on mine. Here's a file that you can use to replace the original one on your computer (but it's not Python ;-)):

(remove the .txt from the file name before you use it)

November 04, 2018, 09:13:26 AM
Reply #10

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
The thing with my first fix above is that I'm not sure what its complications may be - I would like to see some more people test it, before I ask for merging it into Inkscape. Especially with different tools. The problem seems to have to do with the depth step parameter, and I have no idea what that does, or if the fix causes problems for other values.

Can someone else please test and let me know if this is all correct? (Note to self: my branch is here: https://gitlab.com/Moini/extensions/commits/patch-1)

November 04, 2018, 11:23:46 AM
Reply #11

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Well, I certainly do hope that someone, Moini or anyone, decides to keep them up to date.  That certainly would be ideal, whether or not there are other free software which produce gcode.  I mean for simple convenience, if nothing else.  So far, only Moini has stepped up when issues are found.  But I hope they don't have to be dropped.

I suspect there must be other free programs that produce gcode.  I heard someone mention a program that they use for gcode, instead of Inkscape, but I can't remember what they said, or if it was free.  (Yes, memory issues of my own, unfortunately.)  I don't have time to search right now, but I suspect there must be at least one, somewhere.

I don't know if I'm capable to test your fix, Moini.  I'm not clear exactly what you fixed.  But if it's something where you can either give steps, or steps plus a test file, I'll be glad to  :)

Unless you think otherwise, Moini, I'll be glad to post a formal request to remove the Check for Updates dialog (at LP, or gitlab?).  Glad to do whatever little part I can.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 05, 2018, 03:16:46 AM
Reply #12

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Many thanks for the XML.
Now I see and can use the buttons easily  :~)
I still have a desktop PC that I built, which has a 17" screen, but no longer use it.
Rather, I use a laptop which has a 15.6" screen, resolution 1366x768 (OS Linux only).
Also, I use a smaller netbook which has a 10.1" screen, resolution 1024x600 (OS Linux/Windows dual-boot, Windows needed to run Grbl Controller).
Grbl Controller takes G-code and drip-feeds Grbl to the Arduino Nano controller for my CNC2417 3D engraving machine.
However, nowadays I probably spend more time using a tablet than a laptop :~\
  • 0.92
  • Linux Kubuntu 18.04

November 05, 2018, 03:23:03 AM
Reply #13

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
  • 0.92
  • Linux Kubuntu 18.04

November 05, 2018, 03:20:37 PM
Reply #14

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Ah, yes, those screen heights are really not very much. I'm still on a 4:3 screen :)
boxcorner, what kind of things do you make? (just curious)

Brynn, if it's really abandoned, then the update checking really doesn't make any sense. As for testing, I think it would help if you could ask on the cutting forum for people to make the modification on the file (add the 1+ into the lines), and try it out if it still works correctly for their different tools. I'm not really sure what the part of the code I 'fixed' does, actually. It has to do with the depth step (or step depth?), but I have no idea what that is...

November 05, 2018, 04:05:50 PM
Reply #15

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I'll go ahead and make the request to remove the update check, but I'll also make clear that I'm surmising that they don't intend to make updates anymore.  Then the devs will have all the facts.

I don't think it would get any response to post this on Inkscape for Cutting Design.  It's been pretty dead lately.  Whenever we finally start the new official forum, I'm planning to put it into read-only mode.  I made a post to that effect last week, with no response so far....  So, pretty dead  :(

What about a "bug" report?  That way, developer-types can do the testing, who likely already know what to look for.  Or if extension issues are being reported on gitlab now, I guess gitlab would be better?

Or else....maybe there's a development section of the cnc-club.ru forum, for the gcodetools?  Maybe they would answer a development question about updating the extensions?  If that kind of question is not answered, it would solve the uncertainty about the Check for Updates dialog, too.  Hhmm....although I'm not sure if such a development section would be in English....  I guess you'd just have to look around that forum to find out, if you consider posting there.

There's always the Cutters/Plotters board on InkscapeForum.  I seem to recall TD knows something about certain cutters.  Not sure if it includes gcode though.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 06, 2018, 03:33:44 AM
Reply #16

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
boxcorner, what kind of things do you make? (just curious)
I make 'jewellery', (or 'jewelry'). There is a link to my Etsy shop in my profile. So, I intend to use the engraving machine to engrave jewellery. I bought the machine as a kit. I thought building it might be difficult, but the biggest challenge has been learning the process of using Inkscape to generate G-code, testing it with a simulator app, passing the G-code to the controller, to output Grbl to the Arduino Nano controller for the 3 stepper motors (x,y & z). So, I'm learning G-code, too :~)  Calibrating the machine has been tricky, but I'm ready now. I have made some test pieces. See attached photos. I was about to start engraving for 'real' when I made the mistake of trying to update the Gcodetools extension. Imagine my frustration! Thanks again for all your help :~)
« Last Edit: November 06, 2018, 04:58:23 AM by boxcorner »
  • 0.92
  • Linux Kubuntu 18.04

November 06, 2018, 07:15:42 AM
Reply #17

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Yes, software is hard :) Especially if it doesn't seem to want to work together with other software.

Thank you for sharing some photos, boxcorner, I find this kind of thing super interesting. How will you cut out those metal plates? (I know these are test pieces, but I assume that the real ones will also be engraved first, then cut out).

Just had a look at your etsy shop - it's so varied! Not just one type of thing or style, but so many different ones. That's really cool!

November 06, 2018, 11:10:24 AM
Reply #18

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Thank you for sharing some photos, boxcorner,
Thank you for your interest :~)

How will you cut out those metal plates? (I know these are test pieces, but I assume that the real ones will also be engraved first, then cut out).
I have two choices, either by hand with a jeweler's saw. I'm fortunate as I have a Knew Concepts saw which make it easier. Or, with the aid of a die and press (which could be a heavy-duty bench vise). See photo attached. Yes, I will engrave pieces first.

Just had a look at your etsy shop - it's so varied! Not just one type of thing or style, but so many different ones. That's really cool!
Thank you for your kind words! I like learning/trying new techniques. I get bored easily, so I tend to move on to something different. Greatest satisfaction comes from using both hemispheres of our brains. So, I like to mix my attempts at creative art with processes that are demanding of cognitive skills. Does that make sense to you?
  • 0.92
  • Linux Kubuntu 18.04

November 07, 2018, 02:16:21 PM
Reply #19

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Quote (selected)
So, I like to mix my attempts at creative art with processes that are demanding of cognitive skills. Does that make sense to you?

Oh yes, it does :) Playing, trying out new challenging things, making beautiful things in the process, is something I enjoy, too.

Seems you have the full set of tools available to you. Is this a hobby, or also a profession?

November 08, 2018, 02:13:05 AM
Reply #20

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Is this a hobby, or also a profession?
Just a retirement hobby. I like to think my best pieces are the ones that I've sold. So, do you make things too, apart from developing software?
  • 0.92
  • Linux Kubuntu 18.04

November 08, 2018, 06:30:17 AM
Reply #21

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
I like to work with paper. It's not very frequent that I do make things with it, but I find origamic architecture absolutely intriguing.

Some of the things I made are linked from here: https://vektorrascheln.de/pages/about.html (mostly not OA, but larger things - most of those dozens of cards I just gave to someone else without taking a picture (also, there are very few designs that I really made myself, but I would like to).

November 09, 2018, 03:20:23 AM
Reply #22

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Wow! Thank you for sharing your wonderful instructive website (which I have bookmarked) and your artwork - you are so talented. Actually, all categories in your website interest me. I need more time to explore it fully, so I will have to visit it again ... and again. Bookart ah, I am currently following a course on bookbinding. One of my nieces runs a little art business, she does papercutting, Now you have got me interested in other aspects of Inkscape. Things that I didn't know about.
  • 0.92
  • Linux Kubuntu 18.04

November 09, 2018, 01:15:17 PM
Reply #23

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
It's mostly in German, I fear... On the archive page (linked from the bottom) small flags indicate the language of the articles. There are only 9 or so in English currently, aside from the book art stuff. I like to link to the beginner guides, but I think your level of experience is already above that.
As for the bookart - I've only ever made that one thing from the photo, lol. It's really tedious. I preferred to write and improve the programs :) (and I like it when people send me their photos, some really make so cool things!)

November 10, 2018, 07:18:18 AM
Reply #24

boxcorner

  • Jr. Member

  • Offline
  • ***

  • 12
  • Gender
    Male

    Male
Thanks but Google Translate works fairly well.
  • 0.92
  • Linux Kubuntu 18.04