suppress indexed lerp output points. invert a axis input/output b/c display rotation is inverted
This commit is contained in:
parent
da16b3740f
commit
8da1aa5689
4 changed files with 20 additions and 5 deletions
|
|
@ -76,7 +76,8 @@ CAM.export = function(print, online) {
|
|||
scale = {
|
||||
x: 1,
|
||||
y: 1,
|
||||
z: 1
|
||||
z: 1,
|
||||
a: 1
|
||||
},
|
||||
consts = {
|
||||
box: runbox,
|
||||
|
|
@ -281,7 +282,7 @@ CAM.export = function(print, online) {
|
|||
}
|
||||
if (da) {
|
||||
pos.a = newpos.a;
|
||||
nl.append(space).append(axis.A).append(add0(consts.pos_a = pos.a * factor));
|
||||
nl.append(space).append(axis.A).append(add0(consts.pos_a = pos.a * -factor));
|
||||
}
|
||||
if (newFeed) {
|
||||
pos.f = feed;
|
||||
|
|
@ -342,6 +343,7 @@ CAM.export = function(print, online) {
|
|||
if (map.X) scale.x = map.X;
|
||||
if (map.Y) scale.y = map.Y;
|
||||
if (map.Z) scale.z = map.Z;
|
||||
if (map.A) scale.a = map.A;
|
||||
if (map.DEC !== undefined) decimals = parseInt(map.DEC);
|
||||
console.log('export scaling applied', map);
|
||||
} catch (e) {
|
||||
|
|
@ -408,6 +410,7 @@ CAM.export = function(print, online) {
|
|||
point.x *= scale.x;
|
||||
point.y *= scale.y;
|
||||
point.z *= scale.z;
|
||||
point.a *= scale.a;
|
||||
}
|
||||
if (spro.outputInvertX) point.x = -point.x;
|
||||
if (spro.outputInvertY) point.y = -point.y;
|
||||
|
|
@ -455,6 +458,10 @@ CAM.export = function(print, online) {
|
|||
newSpindle = layerout.spindle;
|
||||
// iterate over layer output records
|
||||
layerout.forEach((out, ind) => {
|
||||
if (out.type === 'lerp') {
|
||||
// suppress display only lerp points
|
||||
return;
|
||||
}
|
||||
if (out.gcode && Array.isArray(out.gcode)) {
|
||||
filterEmit(out.gcode, consts);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
|||
isContour,
|
||||
isRough,
|
||||
isLathe,
|
||||
isIndex,
|
||||
tool,
|
||||
toolType,
|
||||
toolDiam,
|
||||
|
|
@ -571,6 +572,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
|||
setTolerance(0);
|
||||
nextIsMove = true;
|
||||
currentOp = op.op;
|
||||
isIndex = currentOp.type === 'index';
|
||||
isLathe = currentOp.type === 'lathe';
|
||||
isRough = currentOp.type === 'rough';
|
||||
isPocket = currentOp.type === 'pocket';
|
||||
|
|
@ -583,8 +585,10 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
|||
opSum += weight;
|
||||
if (tool && lastPoint) {
|
||||
newLayer();
|
||||
layerPush(printPoint = lastPoint.clone().setZ(zmax_outer), 0, 0, tool);
|
||||
newLayer();
|
||||
if (!isIndex) {
|
||||
layerPush(printPoint = lastPoint.clone().setZ(zmax_outer), 0, 0, tool);
|
||||
newLayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -482,6 +482,9 @@ function exportGCodeDialog(gcode, sections, info, names) {
|
|||
$('print-filename').value = filename;
|
||||
$('print-filesize').value = util.comma(info.bytes);
|
||||
$('print-filament').value = Math.round(info.distance);
|
||||
if (set.controller.devel) {
|
||||
$('code-preview-textarea').style.height = "30em";
|
||||
}
|
||||
calcTime();
|
||||
if (fdm) {
|
||||
calcWeight();
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ class Print {
|
|||
|
||||
if (pos.A) {
|
||||
let ip = new THREE.Vector3(pos.X, pos.Y, pos.Z)
|
||||
.applyAxisAngle(XAXIS, pos.A * DEG2RAD);
|
||||
.applyAxisAngle(XAXIS, -pos.A * DEG2RAD);
|
||||
point.x = ip.x;
|
||||
point.y = ip.y;
|
||||
point.z = ip.z;
|
||||
|
|
@ -603,6 +603,7 @@ class Output {
|
|||
this.speed = speed;
|
||||
this.tool = tool;
|
||||
this.type = type;
|
||||
// this.where = new Error().stack.split("\n");
|
||||
}
|
||||
|
||||
clone(z) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue