Skip to content

Commit 2dc0606

Browse files
Merge pull request BelfrySCAD#1996 from adrianVmariano/master
bugfix: rounded_prism module version did not accept 1-regions
2 parents b5ff7d9 + a7b7231 commit 2dc0606

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

rounding.scad

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,15 +2429,19 @@ module rounded_prism(bottom, top, joint_bot=0, joint_top=0, joint_sides=0, k_bot
24292429
dummy1 = assert(in_list(atype, ["intersect","hull","surf_intersect","surf_hull","prismoid"]),
24302430
"Anchor type must be one of: \"hull\", \"intersect\", \"surf_hull\", \"surf_intersect\" or \"prismoid\"")
24312431
assert(atype!="prismoid" || len(bottom)==4, "Anchor type \"prismoid\" requires that len(bottom)=4");
2432+
2433+
top_path = force_path(top,"top");
2434+
bot_path = force_path(bottom,"bottom");
24322435

2433-
result = rounded_prism(bottom=bottom, top=top, joint_bot=joint_bot, joint_top=joint_top, joint_sides=joint_sides,
2436+
result = rounded_prism(bottom=bot_path, top=top_path, joint_bot=joint_bot, joint_top=joint_top, joint_sides=joint_sides,
24342437
k_bot=k_bot, k_top=k_top, k_sides=k_sides, k=k, splinesteps=splinesteps, h=h, length=length, height=height, l=l,
24352438
debug=debug, _full_info=true);
24362439
height = one_defined([l,h,height,length], "l,h,height,length", dflt=undef);
2437-
top = is_undef(top) ? path3d(bottom,height/2) :
2438-
len(top[0])==2 ? path3d(top,height/2) :
2439-
top;
2440-
bottom = len(bottom[0])==2 ? path3d(bottom,-height/2) : bottom;
2440+
top = is_undef(top_path) ? path3d(bot_path,height/2) :
2441+
len(top_path[0])==2 ? path3d(top_path,height/2) :
2442+
top_path;
2443+
bottom = len(bot_path[0])==2 ? path3d(bot_path,-height/2) : bot_path;
2444+
24412445
unrounded = vnf_vertex_array([top,bottom],caps=true, col_wrap=true,reverse=true);
24422446

24432447
vnf = result[1];

0 commit comments

Comments
 (0)