mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Don't assert error if polyhedron doesn't exist
This commit is contained in:
parent
7cefef9977
commit
32b4426a4e
1 changed files with 3 additions and 1 deletions
|
@ -330,6 +330,7 @@ module regular_polyhedron(
|
||||||
stellate=stellate,
|
stellate=stellate,
|
||||||
longside=longside, h=h, height=height
|
longside=longside, h=h, height=height
|
||||||
);
|
);
|
||||||
|
assert(len(entry)>0, "No polyhedra meet your specification");
|
||||||
scaled_points = entry[0];
|
scaled_points = entry[0];
|
||||||
translation = entry[1];
|
translation = entry[1];
|
||||||
face_triangles = entry[2];
|
face_triangles = entry[2];
|
||||||
|
@ -657,7 +658,8 @@ function regular_polyhedron_info(
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
assert(len(indexlist)>0, "No polyhedra meet your specification")
|
len(indexlist)==0 ? []
|
||||||
|
:
|
||||||
let(validindex = is_undef(index) || (index>=0 && index<len(indexlist)))
|
let(validindex = is_undef(index) || (index>=0 && index<len(indexlist)))
|
||||||
assert(validindex, str(
|
assert(validindex, str(
|
||||||
len(indexlist),
|
len(indexlist),
|
||||||
|
|
Loading…
Reference in a new issue