fix missing import, add inner first to outline and rough
This commit is contained in:
parent
4930aa82f2
commit
f272ce86f0
5 changed files with 12 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
|
|
||||||
import { api } from '../../core/api.js';
|
import { api } from '../../core/api.js';
|
||||||
import { env, opRender } from './client.js';
|
import { env, opAdd, opRender } from './client.js';
|
||||||
import { CAM } from './driver-fe.js';
|
import { CAM } from './driver-fe.js';
|
||||||
import { clearTabs, restoreTabs } from './cl-tab.js';
|
import { clearTabs, restoreTabs } from './cl-tab.js';
|
||||||
import { updateStock } from './cl-stock.js';
|
import { updateStock } from './cl-stock.js';
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ const traceClear = () => {
|
||||||
api.conf.save();
|
api.conf.save();
|
||||||
};
|
};
|
||||||
|
|
||||||
const opAdd = (rec) => {
|
export const opAdd = (rec) => {
|
||||||
if (!env.isCamMode) return;
|
if (!env.isCamMode) return;
|
||||||
clearPops();
|
clearPops();
|
||||||
let oplist = env.current.process.ops;
|
let oplist = env.current.process.ops;
|
||||||
|
|
|
||||||
|
|
@ -269,9 +269,11 @@ class OpOutline extends CamOp {
|
||||||
let polyLast;
|
let polyLast;
|
||||||
// console.log({order, orderPolys});
|
// console.log({order, orderPolys});
|
||||||
printPoint = poly2polyEmit(orderPolys, printPoint, function(poly, index, count) {
|
printPoint = poly2polyEmit(orderPolys, printPoint, function(poly, index, count) {
|
||||||
|
|
||||||
polyLast = polyEmit(poly, index, count, polyLast);
|
polyLast = polyEmit(poly, index, count, polyLast);
|
||||||
}, { swapdir: false });
|
}, {
|
||||||
|
swapdir: false,
|
||||||
|
weight: process.camInnerFirst
|
||||||
|
});
|
||||||
})
|
})
|
||||||
newLayer();
|
newLayer();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -310,6 +310,8 @@ class OpRough extends CamOp {
|
||||||
POLY.setWinding(level, cutdir, false);
|
POLY.setWinding(level, cutdir, false);
|
||||||
poly2polyEmit(level, printPoint, (poly, index, count) => {
|
poly2polyEmit(level, printPoint, (poly, index, count) => {
|
||||||
printPoint = polyEmit(poly, index, count, printPoint, {cutFromLast: true});
|
printPoint = polyEmit(poly, index, count, printPoint, {cutFromLast: true});
|
||||||
|
}, {
|
||||||
|
weight: process.camInnerFirst
|
||||||
});
|
});
|
||||||
newLayer();
|
newLayer();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1072,7 +1072,10 @@ export function prepEach(widget, settings, print, firstPoint, update) {
|
||||||
fromPoint = depthOutlinePath(fromPoint, depth + 1, levels, radius, emitter, dir, ease);
|
fromPoint = depthOutlinePath(fromPoint, depth + 1, levels, radius, emitter, dir, ease);
|
||||||
fromPoint = depthOutlinePath(fromPoint, depth + 1, levels, radius, emitter, !dir, ease);
|
fromPoint = depthOutlinePath(fromPoint, depth + 1, levels, radius, emitter, !dir, ease);
|
||||||
return fromPoint;
|
return fromPoint;
|
||||||
}, { weight: false, swapdir: false });
|
}, {
|
||||||
|
weight: innerFirst,
|
||||||
|
swapdir: false
|
||||||
|
});
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue