trim support shadow to overhangs
This commit is contained in:
parent
46df283300
commit
b705bd6391
1 changed files with 7 additions and 0 deletions
|
|
@ -511,6 +511,13 @@ export function sliceOne(settings, widget, onupdate, ondone) {
|
|||
// assign to slices (sync)
|
||||
for (let slice of stack) {
|
||||
slice.shadow = await widget.shadowAt(slice.z, true);
|
||||
if (!(slice.up && slice.shadow?.length)) continue;
|
||||
// trim shadow to part overhangs
|
||||
let top = slice.up.topPolys();
|
||||
let bot = slice.topPolys();
|
||||
let bridge = [];
|
||||
POLY.subtract(top, bot, bridge, undefined, slice.z, 0, { wasm: true });
|
||||
slice.shadow = POLY.trimTo(slice.shadow, bridge, { minArea: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue