Please or Register to create posts and topics.

unusual code output

Hello all,

So i have downloaded/installed the gerbil inkscape plugins, and I am getting a weird result whenever I run the raster plugin, I get gcode output that does not match the location of my drawing.


For example, I set a simple .jpg as 1.5 inches by 1.5 inches in inkscape, set my document properties to inches, and made sure it was in the bottom left of the document. When I run the inkscape raster plugin it outputs this code:

(just a sample, I stopped copying a few lines down)

; Generated with:

; "Grbl compatible Raster2LaserGcode generator"

; by 305 Engineering and Awesome.tech

; Modified for K40Controller







G92 X0.0 Y0.0


G0X30.4Y11.8 F3000 S0

G1X30.13Y11.8 F700 S45

G0X20.53Y11.8 F3000 S0

G1X20.27Y11.8 F700 S45

G0 X20.0 Y11.87 F3000 S0

G1X20.8Y11.87 F700 S45

G0 X29.87 Y11.87 F3000 S0

G1X30.67Y11.87 F700 S45

G0X30.87Y11.93 F3000 S0

G1X29.73Y11.93 F700 S45

G0X20.93Y11.93 F3000 S0

G1X19.8Y11.93 F700 S45

G0 X19.67 Y12.0 F3000 S0

G1X20.93Y12.0 F700 S45

G0 X29.73 Y12.0 F3000 S0

G1X31.0Y12.0 F700 S45

G0X31.13Y12.07 F3000 S0

G1X30.27Y12.07 F700 S45

G0X20.4Y12.07 F3000 S0

G1X19.53Y12.07 F700 S45

G0 X19.47 Y12.13 F3000 S0

G1X20.2Y12.13 F700 S45

G0 X30.47 Y12.13 F3000 S0

G1X31.27Y12.13 F700 S45

G0X31.33Y12.2 F3000 S0

G1X30.6Y12.2 F700 S45

G0X20.13Y12.2 F3000 S0

G1X19.33Y12.2 F700 S45

G0 X19.2 Y12.27 F3000 S0

G1X20.0Y12.27 F700 S45

G0 X30.67 Y12.27 F3000 S0

G1X31.47Y12.27 F700 S45

G0X31.53Y12.33 F3000 S0

G1X30.73Y12.33 F700 S45

G0X19.93Y12.33 F3000 S0

G1X19.13Y12.33 F700 S45

G0 X19.0 Y12.4 F3000 S0

G1X19.87Y12.4 F700 S45

G0 X30.8 Y12.4 F3000 S0

G1X31.67Y12.4 F700 S45

G0X31.73Y12.47 F3000 S0

G1X30.87Y12.47 F700 S45

G0X19.8Y12.47 F3000 S0

G1X18.93Y12.47 F700 S45

G0 X18.87 Y12.53 F3000 S0

G1X19.73Y12.53 F700 S45

G0 X30.93 Y12.53 F3000 S0

G1X31.8Y12.53 F700 S45

G0X31.93Y12.6 F3000 S0

G1X31.0Y12.6 F700 S45

G0X19.67Y12.6 F3000 S0

G1X18.8Y12.6 F700 S45

G0 X18.67 Y12.67 F3000 S0

G1X19.67Y12.67 F700 S45

G0 X31.0 Y12.67 F3000 S0

G1X32.0Y12.67 F700 S45

G0X32.07Y12.73 F3000 S0

G1X31.07Y12.73 F700 S45

G0X19.6Y12.73 F3000 S0

G1X18.6Y12.73 F700 S45

G0 X18.53 Y12.8 F3000 S0

G1X19.6Y12.8 F700 S45

G0 X31.07 Y12.8 F3000 S0

G1X32.13Y12.8 F700 S45

G0X32.27Y12.87 F3000 S0

G1X31.13Y12.87 F700 S45

G0X19.53Y12.87 F3000 S0

G1X18.47Y12.87 F700 S45

G0 X18.33 Y12.93 F3000 S0

G1X19.07Y12.93 F700 S45

G0 X19.2 Y12.93 F3000 S0

G1X19.53Y12.93 F700 S45

G0 X31.13 Y12.93 F3000 S0

G1X32.33Y12.93 F700 S45

G0X32.4Y13.0 F3000 S0

G1X31.2Y13.0 F700 S45

G0X19.47Y13.0 F3000 S0

G1X19.13Y13.0 F700 S45

G0X19.0Y13.0 F3000 S0

G1X18.27Y13.0 F700 S45

G0 X18.2 Y13.07 F3000 S0

G1X18.93Y13.07 F700 S45

G0 X19.07 Y13.07 F3000 S0



It is making my raster go waaaaay off the zero mark in both axis. I'm not sure what i can do different, I did try closing/restarting inkscape.


Thanks for any help!

Uploaded files:
  • inkscape-screenshot.png

Did you set the gerbil controller in inch settings? Setting is $13=1 to have it report in inches. Otherwise run it in mm settings.

Cheers, Paul awesome.tech

I have not tried the code, but I set the option for inch on cncjs. If that isn't the same thing, I'll definitely try that next time I get the chance to go try it out.

I went ahead and loaded that code, and it was sending my raster code to the bottom left edge of my laser instead of the top left machine XY Zero that I would expect.  Also, that was in both inch and mm modes.

I mean its to scale correctly, everything works well otherwise. I even did some code edits to see what I could change. Just my inkscape output is positionally challenged haha.


That's very strange but try everything in mm and see if that works correctly. If not then we need to dig deeper into that direction.

Cheers, Paul awesome.tech

Thanks Paul,

So I tried that code, stuck everything in mm and tried again and got the same result repeatedly.

I started messing around with it and I found something that could help diagnose the issue I think.  So, I set the Inkscape document to 200x300 mm to imitate the machine, and started placing the photo to engrave in different locations and posting the code out. It actually does work very well when placed in the top left corner of the document if it's that size.

The bottom left corner seems to not be the set zero for the program post. It seems like it sets the program zero to roughly 200mm off in Y when I post. That's my best guess haha.

Looking forward to getting it fixed!

Hi, it is very strange and hard to replicate at my end. What would you like to do? Return it so I can see what it is doing here and replace it? Best to email me for the details so I can get you going asap. pauljacobdegroot at gmail dot com

Thanks, Paul

Cheers, Paul awesome.tech

Hey Paul,

Do you think it would be a board issue? If anything I would assume it's a problem in the aoftware add-ons. I can't see a reason for return of the boards unless you think it's absolutely necessary, and I would hate to waste your time.

If that becomes the case I may just ry to reinstall the add ons again or just try to find some workaround.

Thanks for your time! I sincerely appreciate it. 🙂

Seriously, I have no idea why it exhibits that offset unless you have issued an offset command via cncjs (click on the axis x or y with numbers and you can set offsets (working and machine area). It's confusing but play around with it. See this link for explanation https://dynomotion.com/Help/KMotionCNC/GCodeOffsets.htm

Cheers, Paul awesome.tech

Forum Registration