gotcha

Author Topic: Gcode brackets []  (Read 1928 times)

October 31, 2017, 03:43:27 PM
Read 1928 times

marcos82pl

  • Sr. Newbie

  • Offline
  • **

  • 3
My Inkscape 0.92 generates gcode with square brackets:

G01 X[2.703160*#10+#6] Y[5.440494*#10+#7] Z[-0.125000*#11+#8] F [#21]

but UniversalGcoderSende doesn't recognize special characers: [,],*#10,*#6, etc so to make it work under arduino CNC I need to clear it manually to this form:

G01 X2.703160 Y5.440494 Z-0.125000 F10

Can I setup Inkscape somehow to make this clean Gcode witout special characters?
« Last Edit: October 31, 2017, 11:32:18 PM by marcos82pl »
  • 0.92

October 31, 2017, 04:48:38 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

I don't actually have any kind of cutter, but I've been trying to keep up a little bit, so I can help new users.  When I use gcode tools to generate cuttings paths, my gcode doesn't have any brackets in it.

Can you share exactly which extensions you're using, the steps you're taking, the various (or at lease relevant) settings, and maybe even the SVG and NGC files.  Mine are attached for comparison.

Since we've seen this problem since version 0.92, I'm suspecting you might not have your Display Units and Scale settings configured properly.  (I'm guessing maybe the info in the brackets is attempting to convert the scale??)  So if you could also share that info - both of those are on Document Properties > Page tab.  (note the Display Units is at the very top, but unfortunately often confused with the page size units about halfway down the page, which might need to be fixed as well, but probably wouldn't affect the output)

Let's see, you already mentioned Inkscape version, so if you could also tell us your operating system, then we should have just about everything we need :)
  • 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                       

October 31, 2017, 11:49:58 PM
Reply #2

marcos82pl

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi.
I've saved your sample as flgcode2.svg and generated gcode (Effects/Gcodetools/path to Gcode).
Result you can see below.

My Inkscape adds at the beggining:

#8  = 0 (Z axis offset)
#6  = 0 (X axis offset)
#7  = 0 (Y axis offset)
#10 = 1 (XY Scale factor)
#11 = 1 (Z Scale factor)
#21 = 400.000000 (Feed definition)
#20 = 100.000000 (Feed definition)


And changes simple:
G00 Z5.000000
G00 X107.403583 Y199.236074


 to this:
G00 Z[5.000000*#11+#8]
G00 X[163.312713*#10+#6] Y[60.483573*#10+#7]


-------------------------------------------------
I work on Windows 7 Proffesionall 64 bits (Virtual Machine)
Inkscape 0.92
  • 0.92

November 02, 2017, 03:03:33 AM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
My Inkscape adds at the beggining:

#8  = 0 (Z axis offset)
#6  = 0 (X axis offset)
#7  = 0 (Y axis offset)
#10 = 1 (XY Scale factor)
#11 = 1 (Z Scale factor)
#21 = 400.000000 (Feed definition)
#20 = 100.000000 (Feed definition)

Did you notice my comment about thinking you might have an incorrect scale and/or units settings?  I notice in your example, that it includes some kind of scale factors.  That makes me even more curious about that.

Please tell us what you have for Document Properties > Page tab > Display Units (at the very top).

And also please tell us what you have for Document Properties > Page tab > Scale (around the middle of the page)

If my suspicion is correct, this should fix the problem:  https://inkscape.org/en/learn/faq/#inkscape-092-my-drawings-are-just-quarter-their-original-size-when-i-open-them-program-xyz

Edit
Oops, I missed the files you attached.  I'll check them out and post again.

Edit #2
Oh ok.  I thought it might be your SVG file, but you just attached mine.  If the link I gave you above doesn't fix the problem, please share your SVG file with us.
  • 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 02, 2017, 05:14:22 AM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
As the OP gets the weird result with your file, too, brynn, I suspect it might be a setting thing. I'd try setting transforms to optimized in Edit > Preferences > Behaviour > Transforms . Or share the preferences.xml file.

November 02, 2017, 05:59:54 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Could be.  I don't have a very good understanding of the scale setting.
  • 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 02, 2017, 07:50:01 AM
Reply #6

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Moini, since I've seen this coming up as often as the scale issue (path data I mean), I wonder it needs an FAQ item as well?
  • 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 02, 2017, 09:55:59 AM
Reply #7

marcos82pl

  • Sr. Newbie

  • Offline
  • **

  • 3
Problem solved  :yay:

It was all about Extensions\Gcodetools\Path to Gcode: "Post Processor settings"
As default I had: "Parametrize GCode"

When I changed it to: "Round all values to 4 digits" everything became clear.

  • 0.92

November 02, 2017, 11:59:19 AM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Good news!

Not sure if it matters, but just in case, mine's set to None.
  • 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