start area op implementation
This commit is contained in:
parent
cc85832236
commit
3ced33f11b
5 changed files with 259 additions and 132 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue