rm dead code. fix point conversion for small areas
This commit is contained in:
parent
4a3b778069
commit
1c25bb22f3
1 changed files with 3 additions and 10 deletions
|
|
@ -1418,7 +1418,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let filter = isBelt ? (norm) => {
|
let filter = isBelt ? (norm) => {
|
||||||
return norm.z < thresh && norm.y < -0.001;
|
return norm.z <= thresh && norm.y < 0;
|
||||||
} : (norm) => {
|
} : (norm) => {
|
||||||
return norm.z < thresh;
|
return norm.z < thresh;
|
||||||
};
|
};
|
||||||
|
|
@ -1437,8 +1437,7 @@
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// skip tiny faces
|
// skip tiny faces
|
||||||
let area = BASE.newPolygon().addPoints([a,b,c]).area();
|
let poly = BASE.newPolygon().addPoints([a,b,c].map(v => BASE.newPoint(v.x, v.y, v.z)));
|
||||||
let poly = BASE.newPolygon().addPoints([a,b,c]);
|
|
||||||
if (poly.area() < min && poly.perimeter() < size) {
|
if (poly.area() < min && poly.perimeter() < size) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -1448,15 +1447,9 @@
|
||||||
}
|
}
|
||||||
// match with other attached, coplanar faces
|
// match with other attached, coplanar faces
|
||||||
coplane.put(a, b, c, norm.z);
|
coplane.put(a, b, c, norm.z);
|
||||||
// midpoint only for areas about the size of the support pillar
|
|
||||||
// if (area < size) {
|
|
||||||
// tp(new THREE.Vector3().add(a).add(b).add(c).divideScalar(3));
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// ta(a,b,c);
|
|
||||||
}
|
}
|
||||||
// console.log({v3cache, coplane});
|
|
||||||
let groups = coplane.group(true);
|
let groups = coplane.group(true);
|
||||||
|
// console.log({v3cache, coplane, groups});
|
||||||
for (let group of Object.values(groups)) {
|
for (let group of Object.values(groups)) {
|
||||||
for (let polys of group) {
|
for (let polys of group) {
|
||||||
for (let poly of polys) {
|
for (let poly of polys) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue