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

Bugfix: gcode coordinates in IModelaMill driver were too big

parent b9cafcbd
No related branches found
No related tags found
No related merge requests found
...@@ -230,7 +230,7 @@ public class IModelaMill extends LaserCutter ...@@ -230,7 +230,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;
...@@ -244,7 +244,7 @@ public class IModelaMill extends LaserCutter ...@@ -244,7 +244,7 @@ public class IModelaMill extends LaserCutter
{ {
x+= leftToRight ? 1 : -1; x+= leftToRight ? 1 : -1;
} }
move(out, Util.mm2px(offset.x+x, dpi), Util.mm2px(offset.y+y, dpi)); move(out, Util.px2mm(offset.x+x, dpi), Util.px2mm(offset.y+y, dpi));
} }
else else
{ {
...@@ -253,7 +253,7 @@ public class IModelaMill extends LaserCutter ...@@ -253,7 +253,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
......
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