add arc R axis
This commit is contained in:
parent
3ffc3ab853
commit
5f7b0a3380
1 changed files with 5 additions and 3 deletions
|
|
@ -45,7 +45,7 @@ CAM.export = function(print, online) {
|
|||
cmdToolChange = device.gcodeChange || [ "M6 T{tool}" ],
|
||||
cmdSpindle = device.gcodeSpindle || [ "M3 S{speed}" ],
|
||||
cmdDwell = device.gcodeDwell || [ "G4 P{time}" ],
|
||||
axis = { X: 'X', Y: 'Y', Z: 'Z', A: 'A', F: 'F'},
|
||||
axis = { X: 'X', Y: 'Y', Z: 'Z', A: 'A', F: 'F', R: 'R' },
|
||||
dev = settings.device,
|
||||
spro = settings.process,
|
||||
maxZd = spro.camFastFeedZ,
|
||||
|
|
@ -257,10 +257,9 @@ CAM.export = function(print, online) {
|
|||
console.log(out)
|
||||
let gn;
|
||||
if ( out.emit >=0 && out.emit <= 3) gn = `G${out.emit}`;
|
||||
else throw new Error(`malformed emit type ${out.emit}`);
|
||||
|
||||
let speed = out.speed,
|
||||
arc = out.emit == 2 || out.emit == 3,
|
||||
radius = out.radius,
|
||||
nl = (compact_output && lastGn === gn) ? [] : [gn],
|
||||
dx = opt.dx || newpos.x - pos.x,
|
||||
dy = opt.dy || newpos.y - pos.y,
|
||||
|
|
@ -305,6 +304,9 @@ CAM.export = function(print, online) {
|
|||
pos.f = feed;
|
||||
nl.append(space).append(axis.F).append(add0(consts.feed = feed * factor, true));
|
||||
}
|
||||
if(arc){
|
||||
nl.append(space).append(axis.R).append(add0(radius * factor, true));
|
||||
}
|
||||
|
||||
// temp hack to support RML1 dialect from a file extensions trigger
|
||||
if (isRML) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue