annotate thin shells for output ordering

This commit is contained in:
Stewart Allen 2025-09-21 16:24:33 -04:00
commit 07213ddc79
5 changed files with 62 additions and 19 deletions

View file

@ -1104,6 +1104,14 @@ export class Polygon {
return this.first().isEqual(this.last());
}
closeIf(dist = 1) {
if (this.first().distTo2D(this.last()) <= dist) {
return this.setClosed();
} else {
return this.setOpen();
}
}
fixClosed() {
if (this.appearsClosed()) {
this.points.pop();