fix first XY / Z moves to take into account Z over or under currenet position

This commit is contained in:
Stewart Allen 2023-01-10 23:07:00 -05:00
commit 69d2d4766b

View file

@ -211,6 +211,14 @@ CAM.export = function(print, online) {
if (points === 0) {
pos.x = pos.y = pos.z = 0;
points++;
if (newpos.z > pos.z)
moveTo({
// speed: Infinity,
tool: out.tool,
point: { x: newpos.x, y: newpos.y, z: newpos.z, a: newpos.a }
}, {
dx: 0, dy: 0, dz: 1, time: 0
});
moveTo({
// speed: Infinity,
tool: out.tool,
@ -218,6 +226,7 @@ CAM.export = function(print, online) {
}, {
dx: 1, dy: 1, dz: 0, time: 0
});
if (newpos.z < pos.z)
moveTo({
// speed: Infinity,
tool: out.tool,