Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions js/Cam.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ jscut.priv.cam = jscut.priv.cam || {};

var retractGcode =
'; Retract\r\n' +
'G1 Z' + safeZ.toFixed(decimal) + rapidFeedGcode + '\r\n';
'G1 Z' + safeZ.toFixed(decimal) + retractFeedGcode + '\r\n';


var retractForTabGcode =
'; Retract for tab\r\n' +
Expand Down Expand Up @@ -420,7 +421,7 @@ jscut.priv.cam = jscut.priv.cam || {};
gcode +=
'; Rapid to initial position\r\n' +
'G1' + convertPoint(origPath[0], false) + rapidFeedGcode + '\r\n' +
'G1 Z' + currentZ.toFixed(decimal) + '\r\n';
'G1 Z' + currentZ.toFixed(decimal) + retractFeedGcode + '\r\n';

var selectedPaths;
if (nextZ >= tabZ || useZ)
Expand Down
6 changes: 4 additions & 2 deletions js/GcodeConversionViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function GcodeConversionViewModel(options, miscViewModel, materialViewModel, too
var safeZ = self.unitConverter.fromInch(materialViewModel.matZSafeMove.toInch());
var rapidRate = self.unitConverter.fromInch(toolModel.rapidRate.toInch());
var plungeRate = self.unitConverter.fromInch(toolModel.plungeRate.toInch());
var rapidZRate = self.unitConverter.fromInch(toolModel.rapidZRate.toInch());
var cutRate = self.unitConverter.fromInch(toolModel.cutRate.toInch());
var passDepth = self.unitConverter.fromInch(toolModel.passDepth.toInch());
var topZ = self.unitConverter.fromInch(materialViewModel.matTopZ.toInch());
Expand Down Expand Up @@ -115,7 +116,7 @@ function GcodeConversionViewModel(options, miscViewModel, materialViewModel, too
else
gcode += "G21 ; Set units to mm\r\n";
gcode += "G90 ; Absolute positioning\r\n";
gcode += "G1 Z" + safeZ + " F" + rapidRate + " ; Move to clearance level\r\n"
gcode += "G1 Z" + safeZ + " F" + rapidZRate + " ; Move to clearance level\r\n"

for (var opIndex = 0; opIndex < ops.length; ++opIndex) {
var op = ops[opIndex];
Expand All @@ -135,6 +136,7 @@ function GcodeConversionViewModel(options, miscViewModel, materialViewModel, too
"\r\n; Cut Depth: " + cutDepth +
"\r\n; Pass Depth: " + passDepth +
"\r\n; Plunge rate: " + plungeRate +
"\r\n; Rapid Z rate: " + rapidZRate +
"\r\n; Cut rate: " + cutRate +
"\r\n;\r\n";

Expand All @@ -151,7 +153,7 @@ function GcodeConversionViewModel(options, miscViewModel, materialViewModel, too
safeZ: safeZ,
passDepth: passDepth,
plungeFeed: plungeRate,
retractFeed: rapidRate,
retractFeed: rapidZRate,
cutFeed: cutRate,
rapidFeed: rapidRate,
tabGeometry: tabGeometry,
Expand Down
4 changes: 4 additions & 0 deletions js/OperationsViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ function ToolModel() {
self.stepover = ko.observable(.4);
self.rapidRate = ko.observable(100);
self.plungeRate = ko.observable(5);
self.rapidZRate = ko.observable(10);
self.cutRate = ko.observable(40);

self.unitConverter.add(self.diameter);
self.unitConverter.add(self.passDepth);
self.unitConverter.add(self.rapidRate);
self.unitConverter.add(self.plungeRate);
self.unitConverter.add(self.rapidZRate);
self.unitConverter.add(self.cutRate);

self.angle.subscribe(function (newValue) {
Expand Down Expand Up @@ -68,6 +70,7 @@ function ToolModel() {
'stepover': self.stepover(),
'rapidRate': self.rapidRate(),
'plungeRate': self.plungeRate(),
'rapidZRate': self.rapidZRate(),
'cutRate': self.cutRate(),
};
}
Expand All @@ -88,6 +91,7 @@ function ToolModel() {
f(json.stepover, self.stepover);
f(json.rapidRate, self.rapidRate);
f(json.plungeRate, self.plungeRate);
f(json.rapidZRate, self.rapidZRate);
f(json.cutRate, self.cutRate);
}
}
Expand Down
4 changes: 4 additions & 0 deletions jscut.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ <h3 class="panel-title">
<td><label for="toolPlungeRate" class="control-label">Plunge</label>
<td><span data-bind="text: units"></span>/min
<td><input id="toolPlungeRate" type="number" step="any" data-bind="value: plungeRate">
<tr>
<td><label for="toolRapidZRRate" class="control-label">Rapid Z</label>
<td><span data-bind="text: units"></span>/min
<td><input id="toolRapidZRate" type="number" step="any" data-bind="value: rapidZRate">
<tr>
<td><label for="toolCutRate" class="control-label">Cut</label>
<td><span data-bind="text: units"></span>/min
Expand Down