gcodeplot icon indicating copy to clipboard operation
gcodeplot copied to clipboard

"Drawing out of range" with negative coordinates

Open TheNitek opened this issue 6 years ago • 7 comments

My plotter has (0, 0) at the center, so I want to be able to use negative X and Y values. So I set Left and Buttom to negative values. Unfortunately this gives my a "Drawing out of range" showing coordinates that are NOT. I had a look at the code, but I couldn't find a obvious reason.

TheNitek avatar Sep 03 '19 17:09 TheNitek

I found the problem: scale.offset = (plotter.xyMin[0],plotter.xyMin[1]) breaks scale.scalePoint(point) for negative values.

TheNitek avatar Sep 03 '19 17:09 TheNitek

Does your svg file have negative coordinates?

arpruss avatar Sep 04 '19 02:09 arpruss

Yes, because my plottable area is -40 to 40 in both directions

TheNitek avatar Sep 04 '19 04:09 TheNitek

Have you tried using positive coordinates and letting gcodeplot offset it to the negative area?

arpruss avatar Sep 04 '19 12:09 arpruss

No I didn't yet, because that doesn't seem to be available within the UI. Also I find it to be more intuitive to have the same coordinates in Inkscape as on my plotter.

TheNitek avatar Sep 04 '19 12:09 TheNitek

That's I think the source of the problem: the plugin automatically adjust the drawing location so that the drawing's 0,0 corresponds to the minX,minY on the plotter.

arpruss avatar Sep 04 '19 13:09 arpruss

That's I think the source of the problem: the plugin automatically adjust the drawing location so that the drawing's 0,0 corresponds to the minX,minY on the plotter.

I think this is a bug. This program should be looking at the min and max coordinates of the SVG, not assuming they are 0,0.

nylen avatar Oct 14 '19 18:10 nylen