fix op regsiter -,= modes
This commit is contained in:
parent
becb464715
commit
3e517d88dc
3 changed files with 4 additions and 4 deletions
|
|
@ -121,7 +121,7 @@ export function poly2polyEmit(array, startPoint, emitter, opt = {}) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let area = poly.open ? 1 : poly.area();
|
let area = poly.open ? 1 : poly.area();
|
||||||
poly.forEachPoint(function (point, index) {
|
poly.forEachPoint((point, index) => {
|
||||||
dist = opt.weight ?
|
dist = opt.weight ?
|
||||||
startPoint.distTo3D(point) * area * area :
|
startPoint.distTo3D(point) * area * area :
|
||||||
startPoint.distTo2D(point);
|
startPoint.distTo2D(point);
|
||||||
|
|
|
||||||
|
|
@ -147,13 +147,13 @@ class OpRegister extends CamOp {
|
||||||
|
|
||||||
prepare(ops, progress) {
|
prepare(ops, progress) {
|
||||||
let { op } = this;
|
let { op } = this;
|
||||||
let { emitDrills, setDrill, setTool, setTravelBoundary } = ops;
|
let { emitDrills, emitTraces, setDrill, setTool, setTravelBoundary } = ops;
|
||||||
|
|
||||||
setTravelBoundary();
|
setTravelBoundary();
|
||||||
if (op.axis === '-' || op.axis === '=') {
|
if (op.axis === '-' || op.axis === '=') {
|
||||||
setTool(op.tool, op.feed, op.rate);
|
setTool(op.tool, op.feed, op.rate);
|
||||||
for (let slice of this.sliceOut) {
|
for (let slice of this.sliceOut) {
|
||||||
ops.emitTrace(slice);
|
emitTraces(slice.camLines);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTool(op.tool, undefined, op.rate);
|
setTool(op.tool, undefined, op.rate);
|
||||||
|
|
|
||||||
|
|
@ -973,7 +973,7 @@ export async function prepare_one(widget, settings, print, firstPoint, update) {
|
||||||
// console.log('coming from another widget', { printPoint });
|
// console.log('coming from another widget', { printPoint });
|
||||||
} else if (center) {
|
} else if (center) {
|
||||||
// we're the first widget output. offset is center
|
// we're the first widget output. offset is center
|
||||||
printPoint = origin.clone().move({ x: center.x, y: center.y });
|
printPoint = origin.clone().move({ x: center.x, y: center.y, z: 0 });
|
||||||
// console.log('first widget output', { printPoint });
|
// console.log('first widget output', { printPoint });
|
||||||
} else {
|
} else {
|
||||||
console.log({ missing_center_using_origin: origin });
|
console.log({ missing_center_using_origin: origin });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue