mbastl/bastl-laser-tool

Cannot generate output with sensible units

Opened this issue · 1 comments

Aypac commented

Hi,
I love this plugin! Unfortunately I can't get any output with sensible scaling. Let me give an example:
In Inkscape 0.91, I draw a rectangle 100x100mm, set "File->Document Properties->Default units->mm" and "File->Document Properties->Resize page to content->0 margin->Resize page to drawing or selection". Then I select the rectangle, "Path->Object to path". Lastly, "Extensions->BASTL Tools...->BASTL Laser Tool", settings:
image

And I get this gcode:

G90
;--- end of default header
G21
G28
G91
G1 Z59.000
G90
G1 F3000
G1 X5.6272 Y358.7035
G4 P0
M106 S255
M106 S255
G4 P0
G1 F80.000000
G1 X358.7036 Y358.7035
G1 X358.7036 Y5.6272
G1 X5.6272 Y5.6272
G1 X5.6272 Y358.7035
G4 P0
M106 S0
G1 F3000
;--- start of default footer
G1 X0 Y0
M18

where I would expect the rectangle coordinates to be

G1 X100 Y0
G1 X0 Y0
G1 X0 Y100

since one of the first commands is G21, which means, that everything is in mm.

Is this a bug or am I doing something wrong? I also tried using Repetier Code and changing the steps per mm, or changing everything to inches.

Aypac commented

I found a work-around to make it work: I manually edited the SVG to enforce the internal units and mm to be the same.

However, I would not know how to obtain this behavior strictly in Inkscape and therefore I still believe this is a bug (probably related to a fundamental change in Inkscape from an older version to a newer one).

If you happen to have this problem as well, you can open this file and edit it / copy over your drawings from other SVGs and it should work (until this might get more permanently fixed).