Skip to content

Commit 4f394ac

Browse files
committed
1.0.29 bug fix and tweaks
1 parent c512dbd commit 4f394ac

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

OpenbuildsFusion360PostGrbl.cps

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ Changelog
4040
03 Sep 2021 - V1.0.27 : Fix arc ramps not changing Z when they should have
4141
12 Nov 2021 - V1.0.28 : Added property group names, fixed default router selection, now uses permittedCommentChars (sharmstr)
4242
24 Nov 2021 - V1.0.28 : Improved coolant selection, tweaked property groups, tweaked G53 generation, links for help in comments.
43+
21 Feb 2022 - V1.0.29 : Fix sideeffects of drill operation having rapids even when in noRapid mode by always resetting haveRapid in onSection
4344
*/
44-
obversion = 'V1.0.28';
45+
obversion = 'V1.0.29';
4546
description = "OpenBuilds CNC : GRBL/BlackBox"; // cannot have brackets in comments
4647
longDescription = description + " : Post" + obversion; // adds description to post library diaglog box
4748
vendor = "OpenBuilds";
@@ -73,7 +74,7 @@ properties =
7374
spindleOnOffDelay: 1.8, // time (in seconds) the spindle needs to get up to speed or stop, or laser/plasma pierce delay
7475
spindleTwoDirections : false, // true : spindle can rotate clockwise and counterclockwise, will send M3 and M4. false : spindle can only go clockwise, will only send M3
7576
hasCoolant : false, // true : machine uses the coolant output, M8 M9 will be sent. false : coolant output not connected, so no M8 M9 will be sent
76-
routerType : "Other",
77+
routerType : "other",
7778
generateMultiple: true, // specifies if a file should be generated for each tool change
7879
machineHomeZ : -10, // absolute machine coordinates where the machine will move to at the end of the job - first retracting Z, then moving home X Y
7980
machineHomeX : -10, // always in millimeters
@@ -569,11 +570,11 @@ function writeHeader(secID)
569570
writeComment(" Tool #" + tool.number + ": " + toTitleCase(getToolTypeName(tool.type)) + " " + tool.numberOfFlutes + " Flutes, Diam = " + xyzFormat.format(tool.diameter) + unitstr + ", Len = " + tool.fluteLength.toFixed(2) + unitstr);
570571
if (properties.routerType != "other")
571572
{
572-
writeComment(" Spindle : RPM = " + rpm + ", set router dial to " + rpm2dial(rpm, op));
573+
writeComment(" Spindle : RPM = " + round(rpm,0) + ", set router dial to " + rpm2dial(rpm, op));
573574
}
574575
else
575576
{
576-
writeComment(" Spindle : RPM = " + rpm);
577+
writeComment(" Spindle : RPM = " + round(rpm,0));
577578
}
578579
}
579580
checkMinFeedrate(section, op);
@@ -788,7 +789,8 @@ function onSection()
788789
var tool = section.getTool();
789790
var maxfeedrate = section.getMaximumFeedrate();
790791
if (debug) writeComment("onSection " + sectionId);
791-
792+
haveRapid = false; // drilling sections will have rapids even when other ops do not
793+
792794
onRadiusCompensation(); // must check every section
793795
794796
if (isPlasma)
@@ -827,7 +829,8 @@ function onSection()
827829
comment = comment + " : " + getParameter("operation-comment");
828830
}
829831
writeComment(comment);
830-
832+
if (debug)
833+
writeComment("retractHeight = " + retractHeight);
831834
// Write the WCS, ie. G54 or higher.. default to WCS1 / G54 if no or invalid WCS
832835
if (!isFirstSection() && (currentworkOffset != (53 + section.workOffset)) )
833836
{
@@ -1055,6 +1058,7 @@ function onRapid(_x, _y, _z)
10551058

10561059
function onLinear(_x, _y, _z, feed)
10571060
{
1061+
//if (debug) writeComment("onLinear " + haveRapid);
10581062
if (powerOn || haveRapid) // do not reset if power is off - for laser G0 moves
10591063
{
10601064
xOutput.reset();
@@ -1069,6 +1073,7 @@ function onLinear(_x, _y, _z, feed)
10691073
10701074
if (x || y || z)
10711075
{
1076+
linmove = 1; // have to have a default!
10721077
if (!haveRapid && z) // if z is changing
10731078
{
10741079
if (_z < retractHeight) // compare it to retractHeight, below that is G1, >= is G0
@@ -1334,7 +1339,7 @@ function onCommand(command)
13341339

13351340
function onParameter(name, value)
13361341
{
1337-
// writeComment("onParameter =" + name + "= " + value); // (onParameter =operation:retractHeight value= :5)
1342+
//if (debug) writeComment("onParameter =" + name + "= " + value); // (onParameter =operation:retractHeight value= :5)
13381343
name = name.replace(" ","_"); // dratted indexOF cannot have spaces in it!
13391344
if ( (name.indexOf("retractHeight_value") >= 0 ) ) // == "operation:retractHeight value")
13401345
{

0 commit comments

Comments
 (0)