mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Fixed spheroid() orig and aligned styles.
This commit is contained in:
parent
4fc03b18e6
commit
2bf6c34564
4 changed files with 10 additions and 10 deletions
|
@ -238,7 +238,7 @@ function cylinder(h, r1, r2, center, l, r, d, d1, d2, anchor, spin=0, orient=UP)
|
|||
// r = Radius of the sphere.
|
||||
// d = Diameter of the sphere.
|
||||
// circum = If true, the sphere is made large enough to circumscribe the sphere of the ideal side. Otherwise inscribes. Default: false (inscribes)
|
||||
// style = The style of the sphere's construction. One of "orig", "aligned", "stagger", or "icosa". Default: "orig"
|
||||
// style = The style of the sphere's construction. One of "orig", "aligned", "stagger", "octa", or "icosa". Default: "orig"
|
||||
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#anchor). Default: `CENTER`
|
||||
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#spin). Default: `0`
|
||||
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#orient). Default: `UP`
|
||||
|
@ -267,11 +267,11 @@ function cylinder(h, r1, r2, center, l, r, d, d1, d2, anchor, spin=0, orient=UP)
|
|||
// Example: Called as Function
|
||||
// vnf = sphere(d=100, style="icosa");
|
||||
// vnf_polyhedron(vnf);
|
||||
module sphere(r, d, circum=false, style="aligned", anchor=CENTER, spin=0, orient=UP)
|
||||
module sphere(r, d, circum=false, style="orig", anchor=CENTER, spin=0, orient=UP)
|
||||
spheroid(r=r, d=d, circum=circum, style=style, anchor=anchor, spin=spin, orient=orient) children();
|
||||
|
||||
|
||||
function sphere(r, d, circum=false, style="aligned", anchor=CENTER, spin=0, orient=UP) =
|
||||
function sphere(r, d, circum=false, style="orig", anchor=CENTER, spin=0, orient=UP) =
|
||||
spheroid(r=r, d=d, circum=circum, style=style, anchor=anchor, spin=spin, orient=orient);
|
||||
|
||||
|
||||
|
|
|
@ -1182,14 +1182,14 @@ module spheroid(r, d, circum=false, style="aligned", anchor=CENTER, spin=0, orie
|
|||
if (style=="orig") {
|
||||
rotate_extrude(convexity=2,$fn=sides) {
|
||||
difference() {
|
||||
oval(r=r, circum=circum, $fn=sides);
|
||||
oval(r=r, circum=circum, realign=true, $fn=sides);
|
||||
left(r) square(2*r,center=true);
|
||||
}
|
||||
}
|
||||
} else if (style=="aligned") {
|
||||
rotate_extrude(convexity=2,$fn=sides) {
|
||||
difference() {
|
||||
zrot(180/sides) oval(r=r, circum=circum, $fn=sides);
|
||||
oval(r=r, circum=circum, $fn=sides);
|
||||
left(r) square(2*r,center=true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -269,18 +269,18 @@ module stroke(
|
|||
if (hull) {
|
||||
hull(){
|
||||
multmatrix(rotmats[i]) {
|
||||
sphere(d=widths[i]);
|
||||
sphere(d=widths[i],style="aligned");
|
||||
}
|
||||
multmatrix(rotmats[i-1]) {
|
||||
sphere(d=widths[i]);
|
||||
sphere(d=widths[i],style="aligned");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
multmatrix(rotmats[i]) {
|
||||
sphere(d=widths[i]);
|
||||
sphere(d=widths[i],style="aligned");
|
||||
}
|
||||
multmatrix(rotmats[i-1]) {
|
||||
sphere(d=widths[i]);
|
||||
sphere(d=widths[i],style="aligned");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,449];
|
||||
BOSL_VERSION = [2,0,450];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
|
Loading…
Reference in a new issue