Skip to content

Commit

Permalink
Return to Zero at end, and Lift pen at start
Browse files Browse the repository at this point in the history
  • Loading branch information
petervanderwalt committed Nov 25, 2024
1 parent fd052d1 commit eecb1d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions js/advanced-cam-gcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,20 @@ function generateGcode(index, toolpathGrp, cutSpeed, plungeSpeed, spindleRpm, la
$('#gcodesavebtn2').addClass('primary');
} else {
console.log(toolpathGrp)

if (localStorage.getItem("hasSpindle") == 'true') {
if (toolpathsInScene[index].userData.camOperation.indexOf('CNC') == 0 || toolpathsInScene[index].userData.camOperation.indexOf('Drill') == 0) {
g += `M3 S` + spindleRpm + `; Start Spindle\n`
g += `G4 P8; Wait 8 seconds for spindle to spin up to speed\n`
}
}

if (toolpathsInScene[j].userData.camOperation.indexOf('Pen') == 0) {
g += tooloff;
}




toolpathGrp.traverse(function(child) {
var toolDia = toolpathGrp.userData.toolDia;
Expand Down
2 changes: 1 addition & 1 deletion js/application-settings-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function selectToolhead() {
if ($("#hasPenPlotter").is(':checked')) {
// console.log('Add Laser Dynamic')
// startcode += "; Plotter does not need specific startup\n"
// endcode += "; Plotter does not need specific end\n"
endcode += "G0 X0 Z0; Move back to start Position\n"
//$('#scommandscale').val(1000);
localStorage.setItem("hasPenPlotter", true);
} else {
Expand Down

0 comments on commit eecb1d0

Please sign in to comment.