mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-19 12:51:30 +02:00
Fixed xcyl() and ycyl() anchoring and attachments.
This commit is contained in:
20
shapes.scad
20
shapes.scad
@@ -219,7 +219,7 @@ module cuboid(
|
||||
ard = abs(rounding);
|
||||
cube(size, center=true);
|
||||
|
||||
// External-Chamfer mask edges
|
||||
// External-Rounding mask edges
|
||||
difference() {
|
||||
union() {
|
||||
for (i = [0:3], axis=[0:1]) {
|
||||
@@ -741,8 +741,13 @@ module cyl(
|
||||
// }
|
||||
module xcyl(l=undef, r=undef, d=undef, r1=undef, r2=undef, d1=undef, d2=undef, h=undef, anchor=CENTER)
|
||||
{
|
||||
anchor = rot(from=RIGHT, to=UP, p=anchor);
|
||||
cyl(l=l, h=h, r=r, r1=r1, r2=r2, d=d, d1=d1, d2=d2, orient=RIGHT, anchor=anchor) children();
|
||||
r1 = get_radius(r1=r1, r=r, d1=d1, d=d, dflt=1);
|
||||
r2 = get_radius(r1=r2, r=r, d1=d2, d=d, dflt=1);
|
||||
l = first_defined([l, h, 1]);
|
||||
attachable(anchor,0,UP, r1=r1, r2=r2, l=l, axis=RIGHT) {
|
||||
cyl(l=l, r1=r1, r2=r2, orient=RIGHT, anchor=CENTER);
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -779,8 +784,13 @@ module xcyl(l=undef, r=undef, d=undef, r1=undef, r2=undef, d1=undef, d2=undef, h
|
||||
// }
|
||||
module ycyl(l=undef, r=undef, d=undef, r1=undef, r2=undef, d1=undef, d2=undef, h=undef, anchor=CENTER)
|
||||
{
|
||||
anchor = rot(from=BACK, to=UP, p=anchor);
|
||||
cyl(l=l, h=h, r=r, r1=r1, r2=r2, d=d, d1=d1, d2=d2, orient=BACK, anchor=anchor) children();
|
||||
r1 = get_radius(r1=r1, r=r, d1=d1, d=d, dflt=1);
|
||||
r2 = get_radius(r1=r2, r=r, d1=d2, d=d, dflt=1);
|
||||
l = first_defined([l, h, 1]);
|
||||
attachable(anchor,0,UP, r1=r1, r2=r2, l=l, axis=BACK) {
|
||||
cyl(l=l, h=h, r=r, r1=r1, r2=r2, d=d, d1=d1, d2=d2, orient=BACK, anchor=CENTER);
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,424];
|
||||
BOSL_VERSION = [2,0,425];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
Reference in New Issue
Block a user