bump rev 4.3.1 and fix thinwall closed poly
This commit is contained in:
parent
33aa8a550f
commit
e8d5c9e743
6 changed files with 54 additions and 50 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue