fix missing import, add inner first to outline and rough

This commit is contained in:
Stewart Allen 2025-09-03 13:09:18 -04:00
commit f272ce86f0
5 changed files with 12 additions and 5 deletions

View file

@ -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';

View file

@ -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;

View file

@ -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();
} }

View file

@ -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();
} }

View file

@ -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;
} }