, );
+// mat = reorient(anchor, spin, , *two_d*, *size*, <*size2*>, <*shift*>, <*cp*>, <*offset*>, <*anchors*>);
+// pts = reorient(anchor, spin, , *two_d*, *size*, <*size2*>, <*shift*>, <*cp*>, <*offset*>, <*anchors*>, *p*);
// Usage: Circle/Oval Geometry
-// reorient(anchor, spin, , two_d, r|d, , , , );
+// mat = reorient(anchor, spin, , *two_d*, *r*|*d*, <*cp*>, <*offset*>, );
+// pts = reorient(anchor, spin, , *two_d*, *r*|*d*, <*cp*>, <*offset*>, , *p*);
// Usage: 2D Path/Polygon Geometry
-// reorient(anchor, spin, , two_d, path, , , , , );
+// mat = reorient(anchor, spin, , *two_d*, *path*, <*extent*>, <*cp*>, <*offset*>, <*anchors*>);
+// pts = reorient(anchor, spin, , *two_d*, *path*, <*extent*>, <*cp*>, <*offset*>, <*anchors*>, *p*);
// Usage: Cubical/Prismoidal Geometry
-// reorient(anchor, spin, , size, , , , , , );
+// mat = reorient(anchor, spin, , *size*, <*size2*>, <*shift*>, <*cp*>, <*offset*>, <*anchors*>);
+// pts = reorient(anchor, spin, , *size*, <*size2*>, <*shift*>, <*cp*>, <*offset*>, <*anchors*>, *p*);
// Usage: Cylindrical Geometry
-// reorient(anchor, spin, , r|d, l, , , , , );
+// mat = reorient(anchor, spin, , *r*|*d*, *l*, <*offset*>, <*axis*>, <*cp*>, <*anchors*>);
+// pts = reorient(anchor, spin, , *r*|*d*, *l*, <*offset*>, <*axis*>, <*cp*>, <*anchors*>, *p*);
// Usage: Conical Geometry
-// reorient(anchor, spin, , r1|d1, r2|d2, l, , , , , );
+// mat = reorient(anchor, spin, , *r1*|*d1*, *r2*|*d2*, *l*, <*axis*>, <*cp*>, <*offset*>, <*anchors*>);
+// pts = reorient(anchor, spin, , *r1*|*d1*, *r2*|*d2*, *l*, <*axis*>, <*cp*>, <*offset*>, <*anchors*>, *p*);
// Usage: Spheroid/Ovoid Geometry
-// reorient(anchor, spin, , r|d, , , , );
+// mat = reorient(anchor, spin, , *r*|*d*, <*cp*>, <*offset*>, <*anchors*>);
+// pts = reorient(anchor, spin, , *r*|*d*, <*cp*>, <*offset*>, <*anchors*>, *p*);
// Usage: VNF Geometry
-// reorient(anchor, spin, , vnf, , , , , );
+// mat = reorient(anchor, spin, , *vnf*, <*extent*>, <*cp*>, <*offset*>, <*anchors*>);
+// pts = reorient(anchor, spin, , *vnf*, <*extent*>, <*cp*>, <*offset*>, <*anchors*>, *p*);
//
// Description:
// Given anchor, spin, orient, and general geometry info for a managed volume, this calculates
@@ -669,6 +673,7 @@ function attachment_is_shown(tags) =
// 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`
+// ---
// size = If given as a 3D vector, contains the XY size of the bottom of the cuboidal/prismoidal volume, and the Z height. If given as a 2D vector, contains the front X width of the rectangular/trapezoidal shape, and the Y length.
// size2 = If given as a 2D vector, contains the XY size of the top of the prismoidal volume. If given as a number, contains the back width of the trapezoidal shape.
// shift = If given as a 2D vector, shifts the top of the prismoidal or conical shape by the given amount. If given as a number, shifts the back of the trapezoidal shape right by that amount. Default: No shift.
@@ -721,21 +726,21 @@ function reorient(
// Module: attachable()
//
// Usage: Square/Trapezoid Geometry
-// attachable(anchor, spin, two_d, size, , , , , ...
+// attachable(anchor, spin, *two_d*, *size*, <*size2*>, <*shift*>, <*cp*>, <*offset*>, <*anchors*> ...
// Usage: Circle/Oval Geometry
-// attachable(anchor, spin, two_d, r|d, , , ) ...
+// attachable(anchor, spin, *two_d*, *r*|*d*, <*cp*>, <*offset*>, <*anchors*>) ...
// Usage: 2D Path/Polygon Geometry
-// attachable(anchor, spin, two_d, path, , , , ...
+// attachable(anchor, spin, *two_d*, *path*, <*extent*>, <*cp*>, <*offset*>, <*anchors*> ...
// Usage: Cubical/Prismoidal Geometry
-// attachable(anchor, spin, , size, , , , , ...
+// attachable(anchor, spin, , *size*, <*size2*>, <*shift*>, <*cp*>, <*offset*>, <*anchors*> ...
// Usage: Cylindrical Geometry
-// attachable(anchor, spin, , r|d, l, , , , ) ...
+// attachable(anchor, spin, , *r*|*d*, *l*, <*axis*>, <*cp*>, <*offset*>, <*anchors*>) ...
// Usage: Conical Geometry
-// attachable(anchor, spin, , r1|d1, r2|d2, l, , , , ) ...
+// attachable(anchor, spin, , *r1*|*d1*, *r2*|*d2*, *l*, <*axis*>, <*cp*>, <*offset*>, <*anchors*>) ...
// Usage: Spheroid/Ovoid Geometry
-// attachable(anchor, spin, , r|d, , , ) ...
+// attachable(anchor, spin, , *r*|*d*, <*cp*>, <*offset*>, <*anchors*>) ...
// Usage: VNF Geometry
-// attachable(anchor, spin, , vnf, , , , ) ...
+// attachable(anchor, spin, , *vnf*, <*extent*>, <*cp*>, <*offset*>, <*anchors*>) ...
//
// Description:
// Manages the anchoring, spin, orientation, and attachments for a 3D volume or 2D area.
@@ -768,6 +773,7 @@ function reorient(
// 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`
+// ---
// size = If given as a 3D vector, contains the XY size of the bottom of the cuboidal/prismoidal volume, and the Z height. If given as a 2D vector, contains the front X width of the rectangular/trapezoidal shape, and the Y length.
// size2 = If given as a 2D vector, contains the XY size of the top of the prismoidal volume. If given as a number, contains the back width of the trapezoidal shape.
// shift = If given as a 2D vector, shifts the top of the prismoidal or conical shape by the given amount. If given as a number, shifts the back of the trapezoidal shape right by that amount. Default: No shift.
@@ -967,8 +973,8 @@ module position(from)
// Module: attach()
// Usage:
-// attach(from, ) ...
-// attach(from, to, ) ...
+// attach(from, , ) ...
+// attach(from, to, , ) ...
// Description:
// Attaches children to a parent object at an anchor point and orientation.
// Attached objects will be overlapped into the parent object by a little bit,
@@ -987,7 +993,7 @@ module position(from)
// attach(RIGHT, BOTTOM) down(1.5) cyl(l=11.5, d1=10, d2=5);
// attach(FRONT, BOTTOM, overlap=1.5) cyl(l=11.5, d1=10, d2=5);
// }
-module attach(from, to=undef, overlap=undef, norot=false)
+module attach(from, to, overlap, norot=false)
{
assert($parent_geom != undef, "No object to attach to!");
overlap = (overlap!=undef)? overlap : $overlap;
@@ -1010,12 +1016,13 @@ module attach(from, to=undef, overlap=undef, norot=false)
// Module: face_profile()
// Usage:
-// face_profile(faces, r, d, ) ...
+// face_profile(faces, r|d, ) ...
// Description:
// Given a 2D edge profile, extrudes it into a mask for all edges and corners bounding each given face.
// Arguments:
// faces = Faces to mask edges and corners of.
// r = Radius of corner mask.
+// ---
// d = Diameter of corner mask.
// convexity = Max number of times a line could intersect the perimeter of the mask shape. Default: 10
module face_profile(faces=[], r, d, convexity=10) {
@@ -1334,7 +1341,7 @@ module show(tags="")
// rounding_mask_z(l=p.z, r=25);
// }
// }
-module diff(neg, pos=undef, keep=undef)
+module diff(neg, pos, keep)
{
// Don't perform the operation if the current tags are hidden
if (attachment_is_shown($tags)) {
diff --git a/version.scad b/version.scad
index 86d2209..a3333e1 100644
--- a/version.scad
+++ b/version.scad
@@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////
-BOSL_VERSION = [2,0,521];
+BOSL_VERSION = [2,0,522];
// Section: BOSL Library Version Functions