fix slicing of slabs (requires pocket bottom revisit)

This commit is contained in:
Stewart Allen 2025-12-09 18:31:41 -05:00
commit a077cf5739
6 changed files with 22 additions and 10 deletions

View file

@ -14,7 +14,7 @@ const { MODES } = api.const;
const { uc: UC } = api;
const { alerts, conf } = api;
const { current: LANG } = api.language;
const { toInt, toFloat } = UC;
const { toInt, toFloat, toFloatArray } = UC;
const units = true;
let seed = Date.now();

View file

@ -15,6 +15,10 @@ class OpOutline extends CamOp {
async slice(progress) {
let { op, state } = this;
let { shadow, tool, widget } = state;
let shadow_base = shadow.base;
if (!(shadow_base && shadow_base.length)) {
throw 'missing shadow base';
}
let areas = POLY.flatten(POLY.expand(shadow.base, tool.fluteDiameter() / 2 - 0.001));
let cutout = {
areas: { [widget.id]: areas.map(p => p.toArray()) },