Skip to content
Snippets Groups Projects
Commit cee6cc8e authored by Axel's avatar Axel
Browse files

Bugfix: gcode coordinates in IModelaMill driver were too big. Also in raster3d

parent 089e807e
No related branches found
No related tags found
No related merge requests found
...@@ -269,7 +269,7 @@ public class IModelaMill extends LaserCutter ...@@ -269,7 +269,7 @@ public class IModelaMill extends LaserCutter
applyProperty(out, prop); applyProperty(out, prop);
boolean leftToRight = true; boolean leftToRight = true;
Point offset = p.getRasterStart(); Point offset = p.getRasterStart();
move(out, Util.mm2px(offset.x, dpi), Util.mm2px(offset.y, dpi)); move(out, Util.px2mm(offset.x, dpi), Util.px2mm(offset.y, dpi));
for (int y = 0; y < p.getRasterHeight(); y+= toolDiameterInPx/2) for (int y = 0; y < p.getRasterHeight(); y+= toolDiameterInPx/2)
{ {
for (int x = leftToRight ? 0 : p.getRasterWidth() - 1; for (int x = leftToRight ? 0 : p.getRasterWidth() - 1;
...@@ -283,7 +283,7 @@ public class IModelaMill extends LaserCutter ...@@ -283,7 +283,7 @@ public class IModelaMill extends LaserCutter
{ {
x+= leftToRight ? 1 : -1; x+= leftToRight ? 1 : -1;
} }
line(out, Util.mm2px(offset.x+x, dpi), Util.mm2px(offset.y+y, dpi)); line(out, Util.px2mm(offset.x+x, dpi), Util.px2mm(offset.y+y, dpi));
} }
//invert direction //invert direction
leftToRight = !leftToRight; leftToRight = !leftToRight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment