start area op implementation

This commit is contained in:
Stewart Allen 2025-11-28 21:09:09 -05:00
commit 3ced33f11b
5 changed files with 259 additions and 132 deletions

View file

@ -70,6 +70,14 @@ export class Polygon {
return bounds;
}
getBound3D() {
let bounds = new THREE.Box3();
for (let point of this.points) {
bounds.expandByPoint(point);
}
return bounds;
}
toPath2D(offset) {
return paths.pointsToPath(this.points, offset, this.open);
}
@ -985,7 +993,13 @@ export class Polygon {
}
minZ() {
return Math.min(...this.points.map(p => p.z));
let minZ = Math.min(...this.points.map(p => p.z));
if (this.inner) {
for (let i of this.inner) {
minZ = Math.min(minZ, i.minZ());
}
}
return minZ;
}
avgZ() {