Skip to content

Commit 7e6c5bb

Browse files
committed
fix a small bug in recenter
1 parent ebd623b commit 7e6c5bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

OpenbuildsFusion360PostGrbl.cps

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,19 +1425,19 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed)
14251425
xOutput.reset(); // must always have X and Y
14261426
yOutput.reset();
14271427
if (!isLaser && !isPlasma)
1428-
writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
1428+
writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(center.x - start.x, 0), jOutput.format(center.y - start.y, 0), feedOutput.format(feed));
14291429
else
14301430
{
14311431
zo = properties.UseZ ? zOutput.format(z) : "";
1432-
writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zo, iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
1432+
writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zo, iOutput.format(center.x - start.x, 0), jOutput.format(center.y - start.y, 0), feedOutput.format(feed));
14331433
}
14341434
break;
14351435
case PLANE_ZX:
14361436
if (!isLaser)
14371437
{
14381438
xOutput.reset(); // always have X and Z
14391439
zOutput.reset();
1440-
writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
1440+
writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(center.x - start.x, 0), kOutput.format(center.z - start.z, 0), feedOutput.format(feed));
14411441
}
14421442
else
14431443
linearize(tolerance);
@@ -1447,7 +1447,7 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed)
14471447
{
14481448
yOutput.reset(); // always have Y and Z
14491449
zOutput.reset();
1450-
writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
1450+
writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(center.y - start.y, 0), kOutput.format(center.z - start.z, 0), feedOutput.format(feed));
14511451
}
14521452
else
14531453
linearize(tolerance);

0 commit comments

Comments
 (0)