mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
Fixed rounding masks for r1=0.
This commit is contained in:
parent
019961aef7
commit
af82c1ffc7
19
masks.scad
19
masks.scad
@ -411,10 +411,21 @@ module rounding_mask(l=undef, r=undef, r1=undef, r2=undef, anchor=CENTER, spin=0
|
||||
r2 = get_radius(r1=r2, r=r, dflt=1);
|
||||
sides = quantup(segs(max(r1,r2)),4);
|
||||
orient_and_anchor([2*r1, 2*r1, l], orient, anchor, spin=spin, size2=[2*r2,2*r2], chain=true) {
|
||||
linear_extrude(height=l+0.1, convexity=4, center=true, scale=r2/r1) {
|
||||
difference() {
|
||||
square(2*r1, center=true);
|
||||
xspread(2*r1) yspread(2*r1) circle(r=r1, $fn=sides);
|
||||
if (r1<r2) {
|
||||
zflip() {
|
||||
linear_extrude(height=l, convexity=4, center=true, scale=r1/r2) {
|
||||
difference() {
|
||||
square(2*r2, center=true);
|
||||
xspread(2*r2) yspread(2*r2) circle(r=r2, $fn=sides);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
linear_extrude(height=l, convexity=4, center=true, scale=r2/r1) {
|
||||
difference() {
|
||||
square(2*r1, center=true);
|
||||
xspread(2*r1) yspread(2*r1) circle(r=r1, $fn=sides);
|
||||
}
|
||||
}
|
||||
}
|
||||
children();
|
||||
|
@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,119];
|
||||
BOSL_VERSION = [2,0,120];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user