fix slicing of slabs (requires pocket bottom revisit)
This commit is contained in:
parent
4ba452d812
commit
a077cf5739
6 changed files with 22 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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()) },
|
||||
|
|
|
|||
Loading…
Reference in a new issue