bump rev 4.3.1 and fix thinwall closed poly

This commit is contained in:
Stewart Allen 2025-09-22 09:48:25 -04:00
commit e8d5c9e743
6 changed files with 54 additions and 50 deletions

View file

@ -1105,7 +1105,11 @@ export class Polygon {
}
closeIf(dist = 1) {
if (this.first().distTo2D(this.last()) <= dist) {
let closeDist = this.first().distTo2D(this.last());
if (closeDist < 0.001) {
this.points.pop();
return this.setClosed();
} else if (closeDist <= dist) {
return this.setClosed();
} else {
return this.setOpen();