add arc support to Rough

This commit is contained in:
bakedpotatolord 2025-06-04 17:11:48 -06:00
commit b301a25155

View file

@ -431,7 +431,7 @@ class OpRough extends CamOp {
prepare(ops, progress) { prepare(ops, progress) {
let { op, state, sliceOut, camFaces } = this; let { op, state, sliceOut, camFaces } = this;
let { setTool, setSpindle, setPrintPoint, sliceOutput } = ops; let { setTool, setSpindle, setPrintPoint, sliceOutput, polyEmit } = ops;
let { camOut, newLayer, printPoint } = ops; let { camOut, newLayer, printPoint } = ops;
let { settings } = state; let { settings } = state;
let { process } = settings; let { process } = settings;
@ -457,11 +457,8 @@ class OpRough extends CamOp {
} }
// set winding specified in output // set winding specified in output
POLY.setWinding(level, cutdir, false); POLY.setWinding(level, cutdir, false);
printPoint = poly2polyEmit(level, printPoint, function(poly, index, count) { poly2polyEmit(level, printPoint, (poly, index, count) => {
const factor = count === 1 ? 0.5 : 1; printPoint = polyEmit(poly, index, count, printPoint);
poly.forEachPoint(function(point, pidx, points, offset) {
camOut(point.clone(), offset !== 0, undefined, factor);
}, true, index);
}); });
newLayer(); newLayer();
} }