mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +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,
|
faces=undef,
|
||||||
facetype=undef,
|
facetype=undef,
|
||||||
hasfaces=undef,
|
hasfaces=undef,
|
||||||
side=1,
|
side=undef,
|
||||||
ir=undef,
|
ir=undef,
|
||||||
mr=undef,
|
mr=undef,
|
||||||
or=undef,
|
or=undef,
|
||||||
|
@ -591,7 +591,7 @@ function regular_polyhedron_info(
|
||||||
info=undef, name=undef,
|
info=undef, name=undef,
|
||||||
index=undef, type=undef,
|
index=undef, type=undef,
|
||||||
faces=undef, facetype=undef,
|
faces=undef, facetype=undef,
|
||||||
hasfaces=undef, side=1,
|
hasfaces=undef, side=undef,
|
||||||
ir=undef, mr=undef, or=undef,
|
ir=undef, mr=undef, or=undef,
|
||||||
r=undef, d=undef,
|
r=undef, d=undef,
|
||||||
anchor=[0,0,0], center=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]))
|
assert(valid_facedown,str("'facedown' set to ",facedown," but selected polygon only has faces with size(s) ",entry[facevertices]))
|
||||||
let(
|
let(
|
||||||
|
side = default(side,1), // This default setting must occur after _trapezohedron is called
|
||||||
scalefactor = (
|
scalefactor = (
|
||||||
name=="trapezohedron" ? 1 : (
|
name=="trapezohedron" ? 1 : (
|
||||||
argcount == 0? side :
|
argcount == 0? side :
|
||||||
|
@ -730,7 +731,7 @@ function _stellate_faces(scalefactor,stellate,vertices,faces_normals) =
|
||||||
function _trapezohedron(faces, r, side, longside, h, d) =
|
function _trapezohedron(faces, r, side, longside, h, d) =
|
||||||
assert(faces%2==0, "Must set 'faces' to an even number for trapezohedron")
|
assert(faces%2==0, "Must set 'faces' to an even number for trapezohedron")
|
||||||
let(
|
let(
|
||||||
r = get_radius(r=r, d=d, dflt=1),
|
r = get_radius(r=r, d=d),
|
||||||
N = faces/2,
|
N = faces/2,
|
||||||
parmcount = num_defined([r,side,longside,h])
|
parmcount = num_defined([r,side,longside,h])
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue