diff --git a/.openscad_gendocs_rc b/.openscad_gendocs_rc index 0d6030c..6591e1b 100644 --- a/.openscad_gendocs_rc +++ b/.openscad_gendocs_rc @@ -46,4 +46,5 @@ PrioritizeFiles: DefineHeader(BulletList): Side Effects DefineHeader(Table:Anchor Name|Position): Extra Anchors DefineHeader(Table:Name|Definition): Terminology +DefineHeader(BulletList): Requirements diff --git a/math.scad b/math.scad index 4db010d..346b09e 100644 --- a/math.scad +++ b/math.scad @@ -1261,8 +1261,10 @@ function compare_lists(a, b) = // Function: any() // Usage: -// b = any(l); -// b = any(l,func); +// bool = any(l); +// bool = any(l,func); // Requires OpenSCAD 2021.01 or later. +// Requirements: +// Requires OpenSCAD 2021.01 or later to use the `func=` argument. // Description: // Returns true if any item in list `l` evaluates as true. // Arguments: @@ -1292,8 +1294,10 @@ function _any_bool(l, i=0, out=false) = // Function: all() // Usage: -// b = all(l); -// b = all(l,func); +// bool = all(l); +// bool = all(l,func); // Requires OpenSCAD 2021.01 or later. +// Requirements: +// Requires OpenSCAD 2021.01 or later to use the `func=` argument. // Description: // Returns true if all items in list `l` evaluate as true. If `func` is given a function liteal // of signature (x), returning bool, then that function literal is evaluated for each list item. @@ -1325,8 +1329,10 @@ function _all_bool(l, i=0, out=true) = // Function: count_true() // Usage: -// n = count_true(l,) -// n = count_true(l,func,) +// n = count_true(l,); +// n = count_true(l,func,); // Requires OpenSCAD 2021.01 or later. +// Requirements: +// Requires OpenSCAD 2021.01 or later to use the `func=` argument. // Description: // Returns the number of items in `l` that evaluate as true. // If `l` is a lists of lists, this is applied recursively to each diff --git a/shapes.scad b/shapes.scad index 0617e86..fd9b9cb 100644 --- a/shapes.scad +++ b/shapes.scad @@ -387,10 +387,6 @@ function cuboid( // Creates a rectangular prismoid shape with optional roundovers and chamfering. // You can only round or chamfer the vertical(ish) edges. For those edges, you can // specify rounding and/or chamferring per-edge, and for top and bottom separately. -// Note: if using chamfers or rounding, you **must** also include the hull.scad file: -// ``` -// include -// ``` // // Arguments: // size1 = [width, length] of the bottom end of the prism. @@ -398,12 +394,12 @@ function cuboid( // h|l = Height of the prism. // shift = [X,Y] amount to shift the center of the top end with respect to the center of the bottom end. // --- -// rounding = The roundover radius for the vertical-ish edges of the prismoid. Requires including hull.scad. If given as a list of four numbers, gives individual radii for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. Default: 0 (no rounding) -// rounding1 = The roundover radius for the bottom of the vertical-ish edges of the prismoid. Requires including hull.scad. If given as a list of four numbers, gives individual radii for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. -// rounding2 = The roundover radius for the top of the vertical-ish edges of the prismoid. Requires including hull.scad. If given as a list of four numbers, gives individual radii for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. -// chamfer = The chamfer size for the vertical-ish edges of the prismoid. Requires including hull.scad. If given as a list of four numbers, gives individual chamfers for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. Default: 0 (no chamfer) -// chamfer1 = The chamfer size for the bottom of the vertical-ish edges of the prismoid. Requires including hull.scad. If given as a list of four numbers, gives individual chamfers for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. -// chamfer2 = The chamfer size for the top of the vertical-ish edges of the prismoid. Requires including hull.scad. If given as a list of four numbers, gives individual chamfers for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. +// rounding = The roundover radius for the vertical-ish edges of the prismoid. If given as a list of four numbers, gives individual radii for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. Default: 0 (no rounding) +// rounding1 = The roundover radius for the bottom of the vertical-ish edges of the prismoid. If given as a list of four numbers, gives individual radii for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. +// rounding2 = The roundover radius for the top of the vertical-ish edges of the prismoid. If given as a list of four numbers, gives individual radii for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. +// chamfer = The chamfer size for the vertical-ish edges of the prismoid. If given as a list of four numbers, gives individual chamfers for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. Default: 0 (no chamfer) +// chamfer1 = The chamfer size for the bottom of the vertical-ish edges of the prismoid. If given as a list of four numbers, gives individual chamfers for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. +// chamfer2 = The chamfer size for the top of the vertical-ish edges of the prismoid. If given as a list of four numbers, gives individual chamfers for each corner, in the order [X+Y+,X-Y+,X-Y-,X+Y-]. // 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` @@ -425,29 +421,22 @@ function cuboid( // Example(FlatSpin,VPD=160,VPT=[0,0,10]): Shifting/Skewing // prismoid(size1=[50,30], size2=[20,20], h=20, shift=[15,5]); // Example: Rounding -// include // prismoid(100, 80, rounding=10, h=30); // Example: Outer Chamfer Only -// include // prismoid(100, 80, chamfer=5, h=30); // Example: Gradiant Rounding -// include // prismoid(100, 80, rounding1=10, rounding2=0, h=30); // Example: Per Corner Rounding -// include // prismoid(100, 80, rounding=[0,5,10,15], h=30); // Example: Per Corner Chamfer -// include // prismoid(100, 80, chamfer=[0,5,10,15], h=30); // Example: Mixing Chamfer and Rounding -// include // prismoid( // 100, 80, h=30, // chamfer=[0,5,0,10], // rounding=[5,0,10,0] // ); // Example: Really Mixing It Up -// include // prismoid( // size1=[100,80], size2=[80,60], h=20, // chamfer1=[0,5,0,10], chamfer2=[5,0,10,0], @@ -579,10 +568,6 @@ function prismoid( // You can only round or chamfer the vertical(ish) edges. For those edges, you can // specify rounding and/or chamferring per-edge, and for top and bottom, inside and // outside separately. -// Note: if using chamfers or rounding, you **must** also include the hull.scad file: -// ``` -// include -// ``` // Arguments: // h|l = The height or length of the rectangular tube. Default: 1 // size = The outer [X,Y] size of the rectangular tube. @@ -622,45 +607,36 @@ function prismoid( // isize1=[40,20], isize2=[65,35], h=15 // ); // Example: Outer Rounding Only -// include // rect_tube(size=100, wall=5, rounding=10, irounding=0, h=30); // Example: Outer Chamfer Only -// include // rect_tube(size=100, wall=5, chamfer=5, ichamfer=0, h=30); // Example: Outer Rounding, Inner Chamfer -// include // rect_tube(size=100, wall=5, rounding=10, ichamfer=8, h=30); // Example: Inner Rounding, Outer Chamfer -// include // rect_tube(size=100, wall=5, chamfer=10, irounding=8, h=30); // Example: Gradiant Rounding -// include // rect_tube( // size1=100, size2=80, wall=5, h=30, // rounding1=10, rounding2=0, // irounding1=8, irounding2=0 // ); // Example: Per Corner Rounding -// include // rect_tube( // size=100, wall=10, h=30, // rounding=[0,5,10,15], irounding=0 // ); // Example: Per Corner Chamfer -// include // rect_tube( // size=100, wall=10, h=30, // chamfer=[0,5,10,15], ichamfer=0 // ); // Example: Mixing Chamfer and Rounding -// include // rect_tube( // size=100, wall=10, h=30, // chamfer=[0,5,0,10], ichamfer=0, // rounding=[5,0,10,0], irounding=0 // ); // Example: Really Mixing It Up -// include // rect_tube( // size1=[100,80], size2=[80,60], // isize1=[50,30], isize2=[70,50], h=20, diff --git a/std.scad b/std.scad index 72b5dc8..f99e984 100644 --- a/std.scad +++ b/std.scad @@ -27,6 +27,7 @@ include include include include +include include include include