Merge branch 'Synopses-Edits'

This commit is contained in:
Richard Milewski 2023-03-27 14:37:30 -07:00
commit a6b71315a9
2 changed files with 156 additions and 50 deletions

View file

@ -21,14 +21,16 @@ use <builtins.scad>
// Section: 2D Primitives
// Function&Module: square()
// Synopsis: Creates a 2D square or rectangle.
// Topics: Shapes (2D), Path Generators (2D)
// See Also: rect()
//
// Usage: As a Module
// square(size, [center], ...);
// Usage: With Attachments
// square(size, [center], ...) [ATTACHMENTS];
// Usage: As a Function
// path = square(size, [center], ...);
// See Also: rect()
// Description:
// When called as the builtin module, creates a 2D square or rectangle of the given size.
// When called as a function, returns a 2D path/list of points for a square/rectangle of the given size.
@ -71,12 +73,13 @@ module square(size=1, center, anchor, spin) {
// Function&Module: rect()
// Synopsis: Creates a 2d rectangle with optional corner rounding.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: square()
// Usage: As Module
// rect(size, [rounding], [chamfer], ...) [ATTACHMENTS];
// Usage: As Function
// path = rect(size, [rounding], [chamfer], ...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: square()
// Description:
// When called as a module, creates a 2D rectangle of the given size, with optional rounding or chamfering.
// When called as a function, returns a 2D path/list of points for a square/rectangle of the given size.
@ -208,7 +211,10 @@ function rect(size=1, rounding=0, chamfer=0, atype="box", anchor=CENTER, spin=0,
// Function&Module: circle()
// Synopsis: Creates the approximation of a circle.
// Topics: Shapes (2D), Path Generators (2D)
// See Also: ellipse(), circle_2tangents(), circle_3points()
//
// Usage: As a Module
// circle(r|d=, ...) [ATTACHMENTS];
// circle(points=) [ATTACHMENTS];
@ -217,7 +223,6 @@ function rect(size=1, rounding=0, chamfer=0, atype="box", anchor=CENTER, spin=0,
// path = circle(r|d=, ...);
// path = circle(points=);
// path = circle(r|d=, corner=);
// See Also: ellipse(), circle_2tangents(), circle_3points()
// Description:
// When called as the builtin module, creates a 2D polygon that approximates a circle of the given size.
// When called as a function, returns a 2D list of points (path) for a polygon that approximates a circle of the given size.
@ -311,12 +316,14 @@ module circle(r, d, points, corner, anchor=CENTER, spin=0) {
// Function&Module: ellipse()
// Synopsis: Creates the approximation of an ellipse or a circle.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), circle_2tangents(), circle_3points()
// Usage: As a Module
// ellipse(r|d=, [realign=], [circum=], [uniform=], ...) [ATTACHMENTS];
// Usage: As a Function
// path = ellipse(r|d=, [realign=], [circum=], [uniform=], ...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), circle_2tangents(), circle_3points()
// Description:
// When called as a module, creates a 2D polygon that approximates a circle or ellipse of the given size.
// When called as a function, returns a 2D list of points (path) for a polygon that approximates a circle or ellipse of the given size.
@ -494,12 +501,14 @@ function ellipse(r, d, realign=false, circum=false, uniform=false, anchor=CENTER
// Section: Polygons
// Function&Module: regular_ngon()
// Synopsis: Creates a regular N-sided polygon.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), pentagon(), hexagon(), octagon(), ellipse(), star()
// Usage:
// regular_ngon(n, r|d=|or=|od=, [realign=]) [ATTACHMENTS];
// regular_ngon(n, ir=|id=, [realign=]) [ATTACHMENTS];
// regular_ngon(n, side=, [realign=]) [ATTACHMENTS];
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), pentagon(), hexagon(), octagon(), ellipse(), star()
// Description:
// When called as a function, returns a 2D path for a regular N-sided polygon.
// When called as a module, creates a 2D regular N-sided polygon.
@ -633,14 +642,16 @@ module regular_ngon(n=6, r, d, or, od, ir, id, side, rounding=0, realign=false,
// Function&Module: pentagon()
// Synopsis: Creates a regular pentagon.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), regular_ngon(), hexagon(), octagon(), ellipse(), star()
// Usage:
// pentagon(or|od=, [realign=], [align_tip=|align_side=]) [ATTACHMENTS];
// pentagon(ir=|id=, [realign=], [align_tip=|align_side=]) [ATTACHMENTS];
// pentagon(side=, [realign=], [align_tip=|align_side=]) [ATTACHMENTS];
// Usage: as function
// path = pentagon(...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), regular_ngon(), hexagon(), octagon(), ellipse(), star()
// Description:
// When called as a function, returns a 2D path for a regular pentagon.
// When called as a module, creates a 2D regular pentagon.
@ -691,6 +702,10 @@ module pentagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip
// Function&Module: hexagon()
// Synopsis: Creates a regular hexagon.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), regular_ngon(), pentagon(), octagon(), ellipse(), star()
// Usage: As Module
// hexagon(r/or, [realign=], <align_tip=|align_side=>, [rounding=], ...) [ATTACHMENTS];
// hexagon(d=/od=, ...) [ATTACHMENTS];
@ -698,8 +713,6 @@ module pentagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip
// hexagon(side=, ...) [ATTACHMENTS];
// Usage: As Function
// path = hexagon(...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), regular_ngon(), pentagon(), octagon(), ellipse(), star()
// Description:
// When called as a function, returns a 2D path for a regular hexagon.
// When called as a module, creates a 2D regular hexagon.
@ -750,6 +763,10 @@ module hexagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip,
// Function&Module: octagon()
// Synopsis: Creates a regular octagon.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), regular_ngon(), pentagon(), hexagon(), ellipse(), star()
// Usage: As Module
// octagon(r/or, [realign=], [align_tip=|align_side=], [rounding=], ...) [ATTACHMENTS];
// octagon(d=/od=, ...) [ATTACHMENTS];
@ -757,8 +774,6 @@ module hexagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip,
// octagon(side=, ...) [ATTACHMENTS];
// Usage: As Function
// path = octagon(...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), regular_ngon(), pentagon(), hexagon(), ellipse(), star()
// Description:
// When called as a function, returns a 2D path for a regular octagon.
// When called as a module, creates a 2D regular octagon.
@ -808,6 +823,10 @@ module octagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip,
// Function&Module: right_triangle()
// Synopsis: Creates a right triangle.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: square(), rect(), regular_ngon(), pentagon(), hexagon(), octagon(), star()
// Usage: As Module
// right_triangle(size, [center], ...) [ATTACHMENTS];
// Usage: As Function
@ -851,6 +870,10 @@ module right_triangle(size=[1,1], center, anchor, spin=0) {
// Function&Module: trapezoid()
// Synopsis: Creates a trapezoid with parallel top and bottom sides.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: rect(), square()
// Usage: As Module
// trapezoid(h, w1, w2, [shift=], [rounding=], [chamfer=], [flip=], ...) [ATTACHMENTS];
// trapezoid(h, w1, ang=, [rounding=], [chamfer=], [flip=], ...) [ATTACHMENTS];
@ -858,8 +881,6 @@ module right_triangle(size=[1,1], center, anchor, spin=0) {
// trapezoid(w1=, w2=, ang=, [rounding=], [chamfer=], [flip=], ...) [ATTACHMENTS];
// Usage: As Function
// path = trapezoid(...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: rect(), square()
// Description:
// When called as a function, returns a 2D path for a trapezoid with parallel front and back (top and bottom) sides.
// When called as a module, creates a 2D trapezoid. You can specify the trapezoid by giving its height and the lengths
@ -1037,14 +1058,16 @@ module trapezoid(h, w1, w2, ang, shift, chamfer=0, rounding=0, flip=false, ancho
// Function&Module: star()
// Synopsis: Creates a star-shaped polygon with N points.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse(), regular_ngon()
//
// Usage: As Module
// star(n, r/or, ir, [realign=], [align_tip=], [align_pit=], ...) [ATTACHMENTS];
// star(n, r/or, step=, ...) [ATTACHMENTS];
// Usage: As Function
// path = star(n, r/or, ir, [realign=], [align_tip=], [align_pit=], ...);
// path = star(n, r/or, step=, ...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse()
// Description:
// When called as a function, returns the path needed to create a star polygon with N points.
// When called as a module, creates a star polygon with N points.
@ -1204,8 +1227,10 @@ function _path_add_jitter(path, dist=1/512, closed=true) =
// Module: jittered_poly()
// Synopsis: Creates a polygon with extra points for smoother twisted extrusions.
// Topics: Extrusions
// See Also: subdivide_path()
//
// Usage:
// jittered_poly(path, [dist]);
// Description:
@ -1231,9 +1256,12 @@ module jittered_poly(path, dist=1/512) {
// Function&Module: teardrop2d()
// Synopsis: Creates a 2D teardrop shape.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: teardrop(), onion()
//
// Description:
// Makes a 2D teardrop shape. Useful for extruding into 3D printable holes. Uses "intersect" style anchoring.
// Makes a 2D teardrop shape. Useful for extruding into 3D printable holes as it limits overhang to 45 degrees. Uses "intersect" style anchoring.
// The cap_h parameter truncates the top of the teardrop. If cap_h is taller than the untruncated form then
// the result will be the full, untruncated shape. The segments of the bottom section of the teardrop are
// calculated to be the same as a circle or cylinder when rotated 90 degrees. (Note that this agreement is poor when `$fn=6` or `$fn=7`.
@ -1246,10 +1274,6 @@ module jittered_poly(path, dist=1/512) {
// Usage: As Function
// path = teardrop2d(r|d=, [ang], [cap_h]);
//
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
//
// See Also: teardrop(), onion()
//
// Arguments:
// r = radius of circular part of teardrop. (Default: 1)
// ang = angle of hat walls from the Y axis (half the angle of the peak). (Default: 45 degrees)
@ -1331,12 +1355,14 @@ function teardrop2d(r, ang=45, cap_h, d, circum=false, realign=false, anchor=CEN
// Function&Module: egg()
// Synopsis: Creates an egg-shaped 2d object.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse(), glued_circles()
//
// Usage: As Module
// egg(length, r1|d1=, r2|d2=, R|D=) [ATTACHMENTS];
// Usage: As Function
// path = egg(length, r1|d1=, r2|d2=, R|D=);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse(), glued_circles()
// Description:
// Constructs an egg-shaped object by connecting two circles with convex arcs that are tangent to the circles.
// You specify the length of the egg, the radii of the two circles, and the desired arc radius.
@ -1418,12 +1444,14 @@ module egg(length,r1,r2,R,d1,d2,D,anchor=CENTER, spin=0)
// Function&Module: glued_circles()
// Synopsis: Creates a shape of two circles joined by a curved waist.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse(), egg()
//
// Usage: As Module
// glued_circles(r/d=, [spread], [tangent], ...) [ATTACHMENTS];
// Usage: As Function
// path = glued_circles(r/d=, [spread], [tangent], ...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse(), egg()
// Description:
// When called as a function, returns a 2D path forming a shape of two circles joined by curved waist.
// When called as a module, creates a 2D shape of two circles joined by curved waist. Uses "hull" style anchoring.
@ -1486,12 +1514,14 @@ function _superformula(theta,m1,m2,n1,n2=1,n3=1,a=1,b=1) =
pow(pow(abs(cos(m1*theta/4)/a),n2)+pow(abs(sin(m2*theta/4)/b),n3),-1/n1);
// Function&Module: supershape()
// Synopsis: Creates a 2D [Superformula](https://en.wikipedia.org/wiki/Superformula) shape.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse()
//
// Usage: As Module
// supershape([step],[n=], [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], [r=/d=]) [ATTACHMENTS];
// Usage: As Function
// path = supershape([step], [n=], [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], [r=/d=]);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: circle(), ellipse()
// Description:
// When called as a function, returns a 2D path for the outline of the [Superformula](https://en.wikipedia.org/wiki/Superformula) shape.
// When called as a module, creates a 2D [Superformula](https://en.wikipedia.org/wiki/Superformula) shape.
@ -1567,12 +1597,14 @@ module supershape(step=0.5,n,m1=4,m2=undef,n1,n2=undef,n3=undef,a=1,b=undef, r=u
// Function&Module: reuleaux_polygon()
// Synopsis: Creates a constant-width shape that is not circular.
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: regular_ngon(), pentagon(), hexagon(), octagon()
//
// Usage: As Module
// reuleaux_polygon(n, r|d=, ...) [ATTACHMENTS];
// Usage: As Function
// path = reuleaux_polygon(n, r|d=, ...);
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
// See Also: regular_ngon(), pentagon(), hexagon(), octagon()
// Description:
// Creates a 2D Reuleaux Polygon; a constant width shape that is not circular. Uses "intersect" type anchoring.
// Arguments:
@ -1635,7 +1667,9 @@ function reuleaux_polygon(n=3, r, d, anchor=CENTER, spin=0) =
// Section: Text
// Module: text()
// Synopsis: Creates an attachable block of text.
// Topics: Attachments, Text
// See Also: text3d()
// Usage:
// text(text, [size], [font], ...);
// Description:
@ -1746,6 +1780,8 @@ module text(text, size=10, font="Helvetica", halign, valign, spacing=1.0, direct
// Section: Rounding 2D shapes
// Module: round2d()
// Synopsis: Rounds the corners of 2d objects.
// Usage:
// round2d(r) [ATTACHMENTS];
// round2d(or=) [ATTACHMENTS];
@ -1775,6 +1811,8 @@ module round2d(r, or, ir)
// Module: shell2d()
// Synopsis: Creates a shell from 2D children.
//
// Usage:
// shell2d(thickness, [or], [ir])
// Description:

View file

@ -18,14 +18,16 @@ use <builtins.scad>
// Section: Cuboids, Prismoids and Pyramids
// Function&Module: cube()
// Synopsis: Creates a cube with anchors for attaching children.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: cuboid(), prismoid()
//
// Usage: As Module (as in native OpenSCAD)
// cube(size, [center]);
// Usage: With BOSL2 Attachment extensions
// cube(size, [center], [anchor=], [spin=], [orient=]) [ATTACHMENTS];
// Usage: As Function (BOSL2 extension)
// vnf = cube(size, ...);
// See Also: cuboid(), prismoid()
// Description:
// Creates a 3D cubic object.
// This module extends the built-in cube()` module by providing support for attachments and a function form.
@ -87,6 +89,9 @@ function cube(size=1, center, anchor, spin=0, orient=UP) =
// Module: cuboid()
// Synopsis: Creates a cube with chamfering and roundovers.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: prismoid(), rounded_prism()
//
// Usage: Standard Cubes
// cuboid(size, [anchor=], [spin=], [orient=]);
@ -120,7 +125,6 @@ function cube(size=1, center, anchor, spin=0, orient=UP) =
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
// spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP`
// See Also: prismoid(), rounded_prism()
// Example: Simple regular cube.
// cuboid(40);
// Example: Cube with minimum cornerpoint given.
@ -564,7 +568,10 @@ function cuboid(
// Function&Module: prismoid()
//
// Synopsis: Creates a rectangular prismoid shape with optional roundovers and chamfering.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: cuboid(), rounded_prism() wedge() octahedron()
// Usage: Typical Prismoids
// prismoid(size1, size2, h|l, [shift], ...) [ATTACHMENTS];
// Usage: Chamfered Prismoids
@ -599,7 +606,6 @@ function cuboid(
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
//
// See Also: cuboid(), rounded_prism()
//
// Example: Rectangular Pyramid
// prismoid([40,40], [0,0], h=20);
@ -768,6 +774,11 @@ function prismoid(
// Function&Module: octahedron()
// Synopsis: Creates an octahedron with axis-aligned points.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: prismoid()
// Usage: As Module
// octahedron(size, ...) [ATTACHMENTS];
// Usage: As Function
@ -806,6 +817,10 @@ function octahedron(size=1, anchor=CENTER, spin=0, orient=UP) =
// Module: rect_tube()
// Synopsis: Creates a rectangular tube.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: tube()
//
// Usage: Typical Rectangular Tubes
// rect_tube(h, size, isize, [center], [shift]);
// rect_tube(h, size, wall=, [center=]);
@ -1076,6 +1091,9 @@ function rect_tube(
// Function&Module: wedge()
// Synopsis: Creates a 3d triangular wedge.
// Topics: Shapes (3D), Attachable, VNF Generators
// See also: prismoid(), rounded_prism(), pie_slice()
//
// Usage: As Module
// wedge(size, [center], ...) [ATTACHMENTS];
@ -1136,7 +1154,10 @@ function wedge(size=[1,1,1], center, anchor, spin=0, orient=UP) =
// Function&Module: cylinder()
// Synopsis: Creates an attachable cylinder.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: cyl()
//
// Usage: As Module (as in native OpenSCAD)
// cylinder(h, r=/d=, [center=]);
// cylinder(h, r1/d1=, r2/d2=, [center=]);
@ -1146,7 +1167,6 @@ function wedge(size=[1,1,1], center, anchor, spin=0, orient=UP) =
// Usage: As Function (BOSL2 extension)
// vnf = cylinder(h, r=/d=, ...);
// vnf = cylinder(h, r1/d1=, r2/d2=, ...);
// See Also: cyl()
// Description:
// Creates a 3D cylinder or conic object.
// This modules extends the built-in `cylinder()` module by adding support for attachment and by adding a function version.
@ -1220,7 +1240,10 @@ function cylinder(h, r1, r2, center, r, d, d1, d2, anchor, spin=0, orient=UP) =
// Function&Module: cyl()
//
// Synopsis: Creates an attachable cylinder with roundovers and chamfering.
// Topics: Cylinders, Textures, Rounding, Chamfers
// See Also: texture(), rotate_sweep(), cylinder()
//
// Usage: Normal Cylinders
// cyl(l|h|length|height, r, [center], [circum=], [realign=]) [ATTACHMENTS];
// cyl(l|h|length|height, d=, ...) [ATTACHMENTS];
@ -1244,7 +1267,6 @@ function cylinder(h, r1, r2, center, r, d, d1, d2, anchor, spin=0, orient=UP) =
// cyl(l|h|length|height, r1=, r2=, texture=, [tex_size=]|[tex_counts=], [tex_scale=], [tex_rot=], [tex_samples=], [tex_style=], [tex_taper=], [tex_inset=], ...);
// cyl(l|h|length|height, d1=, d2=, texture=, [tex_size=]|[tex_counts=], [tex_scale=], [tex_rot=], [tex_samples=], [tex_style=], [tex_taper=], [tex_inset=], ...);
//
// Topics: Cylinders, Textures, Rounding, Chamfers
//
// Description:
// Creates cylinders in various anchorings and orientations, with optional rounding, chamfers, or textures.
@ -1320,7 +1342,6 @@ function cylinder(h, r1, r2, center, r, d, d1, d2, anchor, spin=0, orient=UP) =
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
//
// See Also: texture(), rotate_sweep()
//
// Example: By Radius
// xdistribute(30) {
@ -1616,9 +1637,12 @@ module cyl(
// Module: xcyl()
// Synopsis: creates a cylinder oriented along the X axis.
// Topics: Cylinders, Textures, Rounding, Chamfers
// See Also: texture(), rotate_sweep(), cyl()
//
// Description:
// Creates a cylinder oriented along the X axis.
// Creates an attachable cylinder with roundovers and chamfering oriented along the X axis.
//
// Usage: Typical
// xcyl(l|h|length|height, r|d=, [anchor=], ...) [ATTACHMENTS];
@ -1696,9 +1720,13 @@ module xcyl(
// Module: ycyl()
// Synopsis: creates a cylinder oriented along the y axis.
// Topics: Cylinders, Textures, Rounding, Chamfers
// See Also: texture(), rotate_sweep(), cyl()
//
// Description:
// Creates a cylinder oriented along the Y axis.
// Creates an attachable cylinder with roundovers and chamfering oriented along the y axis.
//
// Usage: Typical
// ycyl(l|h|length|height, r|d=, [anchor=], ...) [ATTACHMENTS];
@ -1778,9 +1806,13 @@ module ycyl(
// Module: zcyl()
// Synopsis: creates a cylinder oriented along the Z axis.
// Topics: Cylinders, Textures, Rounding, Chamfers
// See Also: texture(), rotate_sweep(), cyl()
//
// Description:
// Creates a cylinder oriented along the Z axis.
// Creates an attachable cylinder with roundovers and chamfering oriented along the Z axis.
//
// Usage: Typical
// zcyl(l|h|length|height, r|d=, [anchor=],...) [ATTACHMENTS];
@ -1859,6 +1891,10 @@ module zcyl(
// Module: tube()
// Synopsis: Creates a cylindrical or conical tube.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: rect_tube()
//
// Description:
// Makes a hollow tube that can be cylindrical or conical by specifying inner and outer dimensions or by giving one dimension and
@ -1954,6 +1990,9 @@ module tube(
// Function&Module: pie_slice()
// Synopsis: Creates a pie slice shape
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: wedge()
//
// Description:
// Creates a pie slice shape.
@ -2050,14 +2089,16 @@ function pie_slice(
// Function&Module: sphere()
// Synopsis: Creates an attachable spherical object.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: spheroid()
// Usage: As Module (native OpenSCAD)
// sphere(r|d=);
// Usage: Using BOSL2 attachments extensions
// sphere(r|d=, [anchor=], [spin=], [orient=]) [ATTACHMENTS];
// Usage: As Function (BOSL2 extension)
// vnf = sphere(r|d=, [anchor=], [spin=], [orient=]) [ATTACHMENTS];
// See Also: spheroid()
// Description:
// Creates a sphere object.
// This module extends the built-in `sphere()` module by providing support for BOSL2 anchoring and attachments, and a function form.
@ -2095,6 +2136,10 @@ function sphere(r, d, anchor=CENTER, spin=0, orient=UP) =
// Function&Module: spheroid()
// Synopsis: Creates an attachable spherical object with controllable triangulation.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: sphere();
//
// Usage: Typical
// spheroid(r|d, [circum], [style]) [ATTACHMENTS];
// Usage: As Function
@ -2422,6 +2467,8 @@ function spheroid(r, style="aligned", d, circum=false, anchor=CENTER, spin=0, or
// Function&Module: torus()
// Synopsis: Creates an attachable torus.
// Topics: Shapes (3D), Attachable, VNF Generators
//
// Usage: As Module
// torus(r_maj|d_maj, r_min|d_min, [center], ...) [ATTACHMENTS];
@ -2439,7 +2486,7 @@ function spheroid(r, style="aligned", d, circum=false, anchor=CENTER, spin=0, or
// vnf = torus(r_min|d_min, ir|id, ...);
//
// Description:
// Creates a torus shape.
// Creates an attachable toroidal shape.
//
// Figure(2D,Med):
// module dashcirc(r,start=0,angle=359.9,dashlen=5) let(step=360*dashlen/(2*r*PI)) for(a=[start:step:start+angle]) stroke(arc(r=r,start=a,angle=step/2));
@ -2562,6 +2609,9 @@ function torus(
// Function&Module: teardrop()
// Synopsis: Creates a teardrop shape.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: onion(), teardrop2d()
//
// Description:
// Makes a teardrop shape in the XZ plane. Useful for 3D printable holes.
@ -2701,6 +2751,9 @@ function teardrop(h, r, ang=45, cap_h, r1, r2, d, d1, d2, cap_h1, cap_h2, chamf
// Function&Module: onion()
// Synopsis: Creates an attachable onion-like shape.
// Topics: Shapes (3D), Attachable, VNF Generators
// See Also: teardrop(), teardrop2d()
//
// Description:
// Creates a sphere with a conical hat, to make a 3D teardrop.
@ -2788,7 +2841,10 @@ function onion(r, ang=45, cap_h, d, anchor=CENTER, spin=0, orient=UP) =
// Section: Text
// Module: text3d()
// Synopsis: Creates an attachable 3d text block.
// Topics: Attachments, Text
// See Also: path_text(), text()
//
// Usage:
// text3d(text, [h], [size], [font], [language=], [script=], [direction=], [atype=], [anchor=], [spin=], [orient=]);
// Description:
@ -2828,7 +2884,6 @@ function onion(r, ang=45, cap_h, d, anchor=CENTER, spin=0, orient=UP) =
// center = Center the text. Equivalent to `atype="center", anchor=CENTER`. Default: false
// spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP`
// See Also: path_text()
// Anchor Types:
// baseline = Anchor center is relative to text baseline
// ycenter = Anchor center is relative to the actualy y direction center of the text
@ -2894,6 +2949,10 @@ function _cut_interp(pathcut, path, data) =
// Module: path_text()
// Synopsis: Creates 2d or 3d text placed along a path.
// Topics: Text, Paths, Paths (2D), Paths (3D), Path Generators, Path Generators (2D)
// See Also, text(), text2d()
// Usage:
// path_text(path, text, [size], [thickness], [font], [lettersize=], [offset=], [reverse=], [normal=], [top=], [textmetrics=], [kern=])
// Description:
@ -3134,7 +3193,10 @@ module path_text(path, text, font, size, thickness, lettersize, offset=0, revers
// Topics: Shapes (3D), Attachable
// Module: fillet()
// Synopsis: Creates a smooth fillet between two faces.
//
//
// Description:
// Creates a shape that can be unioned into a concave joint between two faces, to fillet them.
@ -3213,11 +3275,14 @@ module fillet(l=1.0, r, ang=90, overlap=0.01, d, length, h, height, anchor=CENTE
// Function&Module: heightfield()
// Synopsis: Generates a 3D surface from a 2D grid of values.
// Topics: Textures, Heightfield
// See Also: cylindrical_heightfield()
//
// Usage: As Module
// heightfield(data, [size], [bottom], [maxz], [xrange], [yrange], [style], [convexity], ...) [ATTACHMENTS];
// Usage: As Function
// vnf = heightfield(data, [size], [bottom], [maxz], [xrange], [yrange], [style], ...);
// Topics: Textures, Heightfield
// Description:
// Given a regular rectangular 2D grid of scalar values, or a function literal, generates a 3D
// surface where the height at any given point is the scalar value for that position.
@ -3236,7 +3301,6 @@ module fillet(l=1.0, r, ang=90, overlap=0.01, d, length, h, height, anchor=CENTE
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
// spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP`
// See Also: heightfield(), cylindrical_heightfield()
// Example:
// heightfield(size=[100,100], bottom=-20, data=[
// for (y=[-180:4:180]) [
@ -3342,11 +3406,14 @@ function heightfield(data, size=[100,100], bottom=-20, maxz=100, xrange=[-1:0.04
// Function&Module: cylindrical_heightfield()
// Synopsis: Generates a cylindrical 3d surface from a 2D grid of values.
// Topics: Extrusion, Textures, Knurling, Heightfield
// See Also: heightfield()
//
// Usage: As Function
// vnf = cylindrical_heightfield(data, l|length=|h=|height=, r|d=, [base=], [transpose=], [aspect=]);
// Usage: As Module
// cylindrical_heightfield(data, l|length=|h=|height=, r|d=, [base=], [transpose=], [aspect=]) [ATTACHMENTS];
// Topics: Extrusion, Textures, Knurling, Heightfield
// Description:
// Given a regular rectangular 2D grid of scalar values, or a function literal of signature (x,y), generates
// a cylindrical 3D surface where the height at any given point above the radius `r=`, is the scalar value
@ -3374,7 +3441,6 @@ function heightfield(data, size=[100,100], bottom=-20, maxz=100, xrange=[-1:0.04
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
// spin = Rotate this many degrees around the Z axis. See [spin](attachments.scad#subsection-spin). Default: `0`
// orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP`
// See Also: heightfield(), cylindrical_heightfield()
// Example(VPD=400;VPR=[55,0,150]):
// cylindrical_heightfield(l=100, r=30, base=5, data=[
// for (y=[-180:4:180]) [
@ -3488,10 +3554,12 @@ module cylindrical_heightfield(
// Module: ruler()
// Synopsis: Creates a ruler.
//
// Usage:
// ruler(length, width, [thickness=], [depth=], [labels=], [pipscale=], [maxscale=], [colors=], [alpha=], [unit=], [inch=]) [ATTACHMENTS];
// Description:
// Creates a ruler for checking dimensions of the model
// Creates an attachable ruler for checking dimensions of the model.
// Arguments:
// length = length of the ruler. Default 100
// width = width of the ruler. Default: size of the largest unit division