Skip to content

Commit 7fd4037

Browse files
committed
V.27 - fix for arcs missing Z values
1 parent 5463047 commit 7fd4037

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

OpenbuildsFusion360PostGrbl.cps

+7-13
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ Changelog
3838
25 Jan 2021 - V1.0.24 : Improve coolant codes
3939
26 Jan 2021 - V1.0.25 : Plasma pierce height, and probe
4040
29 Aug 2021 - V1.0.26 : Regroup properties for display, Z height check options
41+
03 Sep 2021 - V1.0.27 : Fix arc ramps not changing Z when they should have
4142
*/
42-
obversion = 'V1.0.26';
43+
obversion = 'V1.0.27';
4344
description = "OpenBuilds CNC : GRBL/BlackBox"; // cannot have brackets in comments
4445
vendor = "OpenBuilds";
4546
vendorUrl = "https://openbuilds.com";
@@ -228,10 +229,6 @@ var sOutput = createVariable({prefix:"S", force:false}, rpmFormat);
228229
var mOutput = createVariable({force:false}, mFormat); // only use for M3/4/5
229230
230231
// for arcs
231-
var xaOutput = createVariable({prefix:"X", force:true}, arcFormat);
232-
var yaOutput = createVariable({prefix:"Y", force:true}, arcFormat);
233-
var zaOutput = createVariable({prefix:"Z", force:false}, arcFormat);
234-
235232
var iOutput = createReferenceVariable({prefix:"I", force:true}, arcFormat);
236233
var jOutput = createReferenceVariable({prefix:"J", force:true}, arcFormat);
237234
var kOutput = createReferenceVariable({prefix:"K", force:true}, arcFormat);
@@ -676,9 +673,6 @@ function forceXYZ()
676673
xOutput.reset();
677674
yOutput.reset();
678675
zOutput.reset();
679-
xaOutput.reset();
680-
yaOutput.reset();
681-
zaOutput.reset();
682676
}
683677
684678
function forceAny()
@@ -1074,7 +1068,7 @@ function onLinear5D(_x, _y, _z, _a, _b, _c, feed)
10741068
function onCircular(clockwise, cx, cy, cz, x, y, z, feed)
10751069
{
10761070
var start = getCurrentPosition();
1077-
xOutput.reset();
1071+
xOutput.reset(); // always have X and Y, Z will output of it changed
10781072
yOutput.reset();
10791073
10801074
// arcs smaller than bitradius always have significant radius errors, so get radius and linearize them (because we cannot change minimumCircularRadius here)
@@ -1101,22 +1095,22 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed)
11011095
{
11021096
case PLANE_XY:
11031097
if (!isLaser && !isPlasma)
1104-
writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xaOutput.format(x), yaOutput.format(y), zaOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
1098+
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));
11051099
else
11061100
{
11071101
zo = properties.UseZ ? zOutput.format(z) : "";
1108-
writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xaOutput.format(x), yaOutput.format(y), zo, iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
1102+
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));
11091103
}
11101104
break;
11111105
case PLANE_ZX:
11121106
if (!isLaser)
1113-
writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xaOutput.format(x), yaOutput.format(y), zaOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
1107+
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));
11141108
else
11151109
linearize(tolerance);
11161110
break;
11171111
case PLANE_YZ:
11181112
if (!isLaser)
1119-
writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xaOutput.format(x), yaOutput.format(y), zaOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
1113+
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));
11201114
else
11211115
linearize(tolerance);
11221116
break;

0 commit comments

Comments
 (0)