mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-02 01:00:13 +02:00
Fixed rounding masks for r1=0.
This commit is contained in:
13
masks.scad
13
masks.scad
@@ -411,12 +411,23 @@ module rounding_mask(l=undef, r=undef, r1=undef, r2=undef, anchor=CENTER, spin=0
|
|||||||
r2 = get_radius(r1=r2, r=r, dflt=1);
|
r2 = get_radius(r1=r2, r=r, dflt=1);
|
||||||
sides = quantup(segs(max(r1,r2)),4);
|
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) {
|
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) {
|
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() {
|
difference() {
|
||||||
square(2*r1, center=true);
|
square(2*r1, center=true);
|
||||||
xspread(2*r1) yspread(2*r1) circle(r=r1, $fn=sides);
|
xspread(2*r1) yspread(2*r1) circle(r=r1, $fn=sides);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,119];
|
BOSL_VERSION = [2,0,120];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
Reference in New Issue
Block a user