SonarSonic / DrawingBotV3

DrawingBotV3 is a software for converting images into vector art
https://docs.drawingbotv3.com
GNU General Public License v3.0
331 stars 43 forks source link

GCode placement issue: offsets and negative margins #4

Closed reven closed 3 years ago

reven commented 3 years ago

Ollie, the extra options for GCode are awesome! It's nice to set axis rotation and have personalized start, end, etc.

But unless I'm missing something, I still can't place files effectively; I can get there in the end by trial and error just using arbitrary offsets. Here is a default GCode for an XY printer with origin in the lower left corner:

gcode(pos)(pos)

It mirrors Y but respects the offsets (in this case 45 for X and 30 for Y). Changing the Y axis to negative generates this GCode:

gcode(pos)(neg)

So now the image is right side up, but it's out of the bed. To get it back in I have to set an arbitrary Y offset of -330:

gcode(pos)(neg_neg_offset)

Arbitrary because it depends on the height of the image, not the print bed, so it'll be different each time. And also for some reason this causes the X offset to change (I think?)

I don't know of any printers that take negative values for their axis, independently of their origin, so wouldn't it be possible to instead of making the values negative or positive, just mark the origin corner and generate positive values?

I don't know on what other machines people use DrawingBot, so the way it is right now may be useful for them.

SonarSonic commented 3 years ago

Additional ones to fix when re-visiting g-code export.

SonarSonic commented 3 years ago

@reven What slicer are you using to preview the gcode?

reven commented 3 years ago

@reven What slicer are you using to preview the gcode?

Repetier host, though you have to mark the option to see movements.

SonarSonic commented 3 years ago

@reven Let me know how you get on with the new version I've just released, hopefully it should fix all the issues mentioned above :)

reven commented 3 years ago

Thanks @SonarSonic !!

Sorry I didn't get back to you sooner. I just did some export tests and the generated gcode seems perfect. Offsets are spot on, and everything looks good.