Skip to content

Commit b97bab8

Browse files
committed
fix laser initial feedrate
1 parent 7e75403 commit b97bab8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

OpenbuildsFusion360PostGrbl.cps

+10-2
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ function onOpen() {
566566
zOutput.format(1);
567567
else
568568
zOutput.format(0);
569+
//writeComment("onOpen end");
569570
}
570571

571572
function onComment(message) {
@@ -613,7 +614,9 @@ function onSection() {
613614
var sectionId = getCurrentSectionId(); // what is the number of this operation (starts from 0)
614615
var section = getSection(sectionId); // what is the section-object for this operation
615616
var tool = section.getTool();
617+
writeln("");
616618
//writeComment("Section : " + (sectionId + 1));
619+
var maxfeedrate = section.getMaximumFeedrate();
617620
618621
if (!isFirstSection() && properties.generateMultiple && (tool.number != getPreviousSection().getTool().number)) {
619622
sequenceNumber ++;
@@ -755,10 +758,15 @@ function onSection() {
755758

756759
// Rapid move to initial position, first XY, then Z
757760
var initialPosition = getFramePosition(currentSection.getInitialPosition());
758-
writeBlock(gAbsIncModal.format(90), gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y));
761+
if (isLaser)
762+
f = feedOutput.format(maxfeedrate);
763+
else
764+
f = "";
765+
writeBlock(gAbsIncModal.format(90), gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), f);
759766
if (isLaser && properties.UseZ)
760767
writeBlock(gMotionModal.format(0), zOutput.format(0));
761768
isNewfile = false;
769+
//writeComment("onSection end");
762770
}
763771

764772
function onDwell(seconds) {
@@ -840,7 +848,7 @@ function onLinear(_x, _y, _z, feed) {
840848
var s = sOutput.format(power);
841849
writeBlock(gMotionModal.format(1), x, y, z, f, s);
842850
} else {
843-
// this is the new process when do dont have onRapid but GRBL requires G0 moves for noncutting laser moves
851+
// this is the new process when we dont have onRapid but GRBL requires G0 moves for noncutting laser moves
844852
var z = properties.UseZ ? zOutput.format(0) : "";
845853
var s = sOutput.format(power);
846854
if (powerOn)

0 commit comments

Comments
 (0)