add try catch for broken cylinder polys
This commit is contained in:
parent
9e19d13905
commit
917cbf882b
1 changed files with 12 additions and 4 deletions
|
|
@ -44,10 +44,18 @@ export class OpHelical extends CamOp {
|
||||||
//iterate over selected faces
|
//iterate over selected faces
|
||||||
for (let face of faces) {
|
for (let face of faces) {
|
||||||
//get poly info for the cylinder
|
//get poly info for the cylinder
|
||||||
let { zmin, zmax, diam, center, interior, faces } = cylinder_poly_find(
|
let res
|
||||||
widget,
|
try{
|
||||||
face
|
res = cylinder_poly_find(
|
||||||
);
|
widget,
|
||||||
|
face
|
||||||
|
);
|
||||||
|
}catch(error){
|
||||||
|
// don't quit if a cylinder errors out, just skip
|
||||||
|
console.error(error)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
let { zmin, zmax, diam, center, interior, faces } = res;
|
||||||
// console.log({ zmin, zmax, diam, center, interior });
|
// console.log({ zmin, zmax, diam, center, interior });
|
||||||
let radius = diam >> 1;
|
let radius = diam >> 1;
|
||||||
zmax = fromTop ? stock.z: zmax;
|
zmax = fromTop ? stock.z: zmax;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue