Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions shapes.scad
Original file line number Diff line number Diff line change
Expand Up @@ -2121,12 +2121,13 @@ module interior_fillet(l=1.0, r=1.0, ang=90, overlap=0.01, orient=ORIENT_X, alig
module slot(
p1=undef, p2=undef, h=10, l=undef,
r=undef, r1=undef, r2=undef,
d=undef, d1=undef, d2=undef
d=undef, d1=undef, d2=undef,
orient=undef
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
orient=undef
align=V_CENTER, orient=ORIENT_Z

) {
r1 = get_radius(r1=r1, r=r, d1=d1, d=d, dflt=5);
r2 = get_radius(r1=r2, r=r, d1=d2, d=d, dflt=5);
sides = quantup(segs(max(r1, r2)), 4);
hull() spread(p1=p1, p2=p2, l=l, n=2) cyl(l=h, r1=r1, r2=r2, center=true, $fn=sides);
hull() spread(p1=p1, p2=p2, l=l, n=2) cyl(l=h, r1=r1, r2=r2, center=true, $fn=sides, orient=orient);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hull() spread(p1=p1, p2=p2, l=l, n=2) cyl(l=h, r1=r1, r2=r2, center=true, $fn=sides, orient=orient);
if (align!=V_CENTER || orient!=ORIENT_Z) {
orient_and_align(size=[l+2*r1, 2*r1, h], orient=orient, align=align, orig_orient=ORIENT_Z, orig_align=V_CENTER)
solid();
} else {
solid();
}
module solid()
{
hull() spread(p1=p1, p2=p2, l=l, n=2) cyl(l=h, r1=r1, r2=r2, align=V_CENTER, orient=ORIENT_Z, $fn=sides);
}

}


Expand Down