fix thin3 chain marking and shortening

This commit is contained in:
Stewart Allen 2025-09-15 17:11:56 -04:00
commit 32d4b7e62a
2 changed files with 86 additions and 39 deletions

View file

@ -258,7 +258,7 @@ export class Polygon {
// of the polygon with the noodle removed (for the next pass)
noodle(width) {
let clone = this.clone(true);
let ins = clone.offset(width);
let ins = clone.offset(width) ?? [];
let remain = ins.clone(true);
let nood = POLY.nest(POLY.flatten([ clone, ...ins ], [], true));
return { noodle: nood, remain };