mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Fixed trapezohedron bug
This commit is contained in:
parent
f36fbb60db
commit
579a3e5c99
1 changed files with 5 additions and 4 deletions
|
@ -283,7 +283,7 @@ module regular_polyhedron(
|
|||
faces=undef,
|
||||
facetype=undef,
|
||||
hasfaces=undef,
|
||||
side=1,
|
||||
side=undef,
|
||||
ir=undef,
|
||||
mr=undef,
|
||||
or=undef,
|
||||
|
@ -591,7 +591,7 @@ function regular_polyhedron_info(
|
|||
info=undef, name=undef,
|
||||
index=undef, type=undef,
|
||||
faces=undef, facetype=undef,
|
||||
hasfaces=undef, side=1,
|
||||
hasfaces=undef, side=undef,
|
||||
ir=undef, mr=undef, or=undef,
|
||||
r=undef, d=undef,
|
||||
anchor=[0,0,0], center=undef,
|
||||
|
@ -664,6 +664,7 @@ function regular_polyhedron_info(
|
|||
)
|
||||
assert(valid_facedown,str("'facedown' set to ",facedown," but selected polygon only has faces with size(s) ",entry[facevertices]))
|
||||
let(
|
||||
side = default(side,1), // This default setting must occur after _trapezohedron is called
|
||||
scalefactor = (
|
||||
name=="trapezohedron" ? 1 : (
|
||||
argcount == 0? side :
|
||||
|
@ -730,7 +731,7 @@ function _stellate_faces(scalefactor,stellate,vertices,faces_normals) =
|
|||
function _trapezohedron(faces, r, side, longside, h, d) =
|
||||
assert(faces%2==0, "Must set 'faces' to an even number for trapezohedron")
|
||||
let(
|
||||
r = get_radius(r=r, d=d, dflt=1),
|
||||
r = get_radius(r=r, d=d),
|
||||
N = faces/2,
|
||||
parmcount = num_defined([r,side,longside,h])
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue