mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Fixed xcyl() and ycyl() anchoring and attachments.
This commit is contained in:
parent
5bfd3bee4d
commit
e86af33f52
2 changed files with 16 additions and 6 deletions
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
|
||||
|
|
Loading…
Reference in a new issue