From 87404974970df55419f175f71d86da263dbdfbb1 Mon Sep 17 00:00:00 2001 From: Richard Milewski Date: Wed, 29 Mar 2023 17:19:52 -0700 Subject: [PATCH] More synopses --- masks2d.scad | 12 ++++++------ mutators.scad | 24 ++++++++++++++++++++++-- paths.scad | 29 ++++++++++++++++++++++++++--- shapes3d.scad | 6 +++--- 4 files changed, 57 insertions(+), 14 deletions(-) diff --git a/masks2d.scad b/masks2d.scad index 78435f8..bf93ce9 100644 --- a/masks2d.scad +++ b/masks2d.scad @@ -79,7 +79,7 @@ function mask2d_roundover(r, inset=0, excess=0.01, d, anchor=CENTER,spin=0) = // Function&Module: mask2d_cove() -// Synopsis: Creates a 2d cove (quarter-round) mask shape. +// Synopsis: Creates a 2D cove (quarter-round) mask shape. // Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D) // See Also: corner_profile(), edge_profile(), face_profile() // Usage: As module @@ -280,8 +280,8 @@ function mask2d_rabbet(size, excess=0.01, anchor=CENTER,spin=0) = // Function&Module: mask2d_dovetail() -// Creates a 2d dovetail mask shape. -// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D) +// Synopsis: Creates a 2D dovetail mask shape. +// Topics: Masks (2D), Shapes (2D), Paths (2D), Path Generators, Attachable // See Also: corner_profile(), edge_profile(), face_profile() // Usage: As Module // mask2d_dovetail(edge, [angle], [inset], [shelf], [excess], ...) [ATTACHMENTS]; @@ -358,8 +358,8 @@ function mask2d_dovetail(edge, angle=30, inset=0, shelf=0, excess=0.01, x, y, an // Function&Module: mask2d_teardrop() -// Synopsis: Creates a 2d teardrop mask shape with a controllable maximum angle from vertical. -// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D) +// Synopsis: Creates a 2D teardrop mask shape with a controllable maximum angle from vertical. +// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D), FDM Optimized // See Also: corner_profile(), edge_profile(), face_profile() // Usage: As Module // mask2d_teardrop(r|d=, [angle], [excess]) [ATTACHMENTS]; @@ -422,7 +422,7 @@ module mask2d_teardrop(r, angle=45, excess=0.01, d, anchor=CENTER, spin=0) { } // Function&Module: mask2d_ogee() -// Synopsis: Creates a 2d ogee mask shape. +// Synopsis: Creates a 2D ogee mask shape. // Topics: Shapes (2D), Paths (2D), Path Generators, Attachable, Masks (2D) // See Also: corner_profile(), edge_profile(), face_profile() // Usage: As Module diff --git a/mutators.scad b/mutators.scad index c370daa..1c74e32 100644 --- a/mutators.scad +++ b/mutators.scad @@ -13,6 +13,8 @@ ////////////////////////////////////////////////////////////////////// // Module: bounding_box() +// Synopsis: Creates the smallest bounding box that contains all the children. +// Topics: Mutators, Bounds, Bounding Boxes // Usage: // bounding_box([excess],[planar]) CHILDREN; // Description: @@ -101,7 +103,8 @@ module bounding_box(excess=0, planar=false) { // Module: chain_hull() -// +// Synopsis: Performs the union of hull operations between consecutive pairs of children. +// Topics: Mutators // Usage: // chain_hull() CHILDREN; // @@ -149,6 +152,9 @@ module chain_hull() // Module: path_extrude2d() +// Synopsis: Extrudes 2D children along a 2D path. +// Topics: Mutators, Extrusion +// See Also: path_sweep(), path_extrude() // Usage: // path_extrude2d(path, [caps=], [closed=], [s=], [convexity=]) 2D-CHILDREN; // Description: @@ -262,6 +268,8 @@ module path_extrude2d(path, caps=false, closed=false, s, convexity=10) { // Module: cylindrical_extrude() +// Synopsis: Extrudes 2D children outwards around a cylinder. +// Topics: Mutators, Extrusion, Rotation // Usage: // cylindrical_extrude(ir|id=, or|od=, [size=], [convexity=], [spin=], [orient=]) 2D-CHILDREN; // Description: @@ -321,6 +329,8 @@ module cylindrical_extrude(ir, or, od, id, size=1000, convexity=10, spin=0, orie // Module: extrude_from_to() +// Extrudes 2D children between two points in 3D space. +// Topics: Extrusion, Mutators // Usage: // extrude_from_to(pt1, pt2, [convexity=], [twist=], [scale=], [slices=]) 2D-CHILDREN; // Description: @@ -359,10 +369,12 @@ module extrude_from_to(pt1, pt2, convexity, twist, scale, slices) { // Module: path_extrude() +// Synopsis: Extrudes 2D children along a 3D path. +// Topics: Paths, Extrusion, Mutators +// See Also: path_sweep(), path_extrude2d() // Usage: path_extrude(path, [convexity], [clipsize]) 2D-CHILDREN; // Description: // Extrudes 2D children along a 3D path. This may be slow and can have problems with twisting. -// See Also: path_sweep() // Arguments: // path = Array of points for the bezier path to extrude along. // convexity = Maximum number of walls a ray can pass through. @@ -418,6 +430,9 @@ module path_extrude(path, convexity=10, clipsize=100) { ////////////////////////////////////////////////////////////////////// // Module: minkowski_difference() +// Synopsis: Removes diff shapes from base shape surface. +// Topics: Mutators +// See Also: Offset3d() // Usage: // minkowski_difference() { BASE; DIFF1; DIFF2; ... } // Description: @@ -454,6 +469,9 @@ module minkowski_difference(planar=false) { // Module: offset3d() +// Synopsis: Expands or contracts the surface of a 3D object. +// Topics: Mutators +// See Also: minkowski_difference() // Usage: // offset3d(r, [size], [convexity]) CHILDREN; // Description: @@ -493,6 +511,8 @@ module offset3d(r, size=100, convexity=10) { // Module: round3d() +// Synopsis: Rounds arbitrary 3d objects. +// Topics: Rounding, Mutators // Usage: // round3d(r) CHILDREN; // round3d(or) CHILDREN; diff --git a/paths.scad b/paths.scad index 8dc1b94..117113d 100644 --- a/paths.scad +++ b/paths.scad @@ -18,6 +18,8 @@ // Section: Utility Functions // Function: is_path() +// Synopsis: Returns True if 'list' is a path. +// Topics: Paths // Usage: // is_path(list, [dim], [fast]) // Description: @@ -55,6 +57,9 @@ function is_path(list, dim=[2,3], fast=false) = && (is_undef(dim) || in_list(len(list[0]), force_list(dim))); // Function: is_1region() +// Synopsis: Returns true if path is a region with one component. +// Topics: Paths, Regions +// See Also: force_path() // Usage: // bool = is_1region(path, [name]) // Description: @@ -71,6 +76,9 @@ function is_1region(path, name="path") = // Function: force_path() +// Synopsis: Checks that path is a region with one component. +// Topics: Paths, Regions +// See Also: is_1region() // Usage: // outpath = force_path(path, [name]) // Description: @@ -119,6 +127,8 @@ function _path_select(path, s1, u1, s2, u2, closed=false) = // Function: path_merge_collinear() +// Synopsis: Removes unnecessary points from a path. +// Topics: Paths, Regions // Description: // Takes a path and removes unnecessary sequential collinear points. // Usage: @@ -149,6 +159,9 @@ function path_merge_collinear(path, closed, eps=EPSILON) = // Function: path_length() +// Synopsis: Returns the path length. +// Topics: Paths +// See Also: path_segment_lengths(), path_length_fractions() // Usage: // path_length(path,[closed]) // Description: @@ -169,6 +182,9 @@ function path_length(path,closed) = // Function: path_segment_lengths() +// Synopsis: Returns a list of the lengths of segments in a path. +// Topics: Paths +// See Also: path_length(), path_length_fractions() // Usage: // path_segment_lengths(path,[closed]) // Description: @@ -274,7 +290,7 @@ function _path_self_intersections(path, closed=true, eps=EPSILON) = [isect[0], i, isect[1], j, isect[2]] ]; -// Section: Resampling—changing the number of points in a path +// Section: Resampling - changing the number of points in a path // Input `data` is a list that sums to an integer. @@ -295,6 +311,8 @@ function _sum_preserving_round(data, index=0) = // Function: subdivide_path() +// Synopsis: Subdivides a path to produce a more finely sampled path. +// Topics: Paths, Path Subdivision // See Also: subdivide_and_slice(), resample_path(), jittered_poly() // Usage: // newpath = subdivide_path(path, n|refine=|maxlen=, [method=], [closed=], [exact=]); @@ -686,7 +704,7 @@ function path_torsion(path, closed=false) = // Function: path_cut() -// Topics: Paths +// Topics: Paths, Path Subdivision // See Also: split_path_at_self_crossings() // Usage: // path_list = path_cut(path, cutdist, [closed]); @@ -746,7 +764,8 @@ function _path_cut_getpaths(path, cutlist, closed) = // Function: path_cut_points() -// +// Synopsis: Returns a list of cut points at a list of distances from the first point in a path. +// Topics: Paths, Path Subdivision // Usage: // cuts = path_cut_points(path, cutdist, [closed=], [direction=]); // @@ -882,6 +901,8 @@ function _cut_to_seg_u_form(pathcut, path, closed) = // Function: split_path_at_self_crossings() +// Synopsis: Split a 2D path wherever it crosses itself. +// Topics: Paths, Path Subdivision // Usage: // paths = split_path_at_self_crossings(path, [closed], [eps]); // Description: @@ -949,6 +970,8 @@ function _tag_self_crossing_subpaths(path, nonzero, closed=true, eps=EPSILON) = // Function: polygon_parts() +// Synopsis: Parses a self-intersecting polygon into a list of non-intersecting polygons. +// Topics: Paths, Polygons // Usage: // splitpolys = polygon_parts(poly, [nonzero], [eps]); // Description: diff --git a/shapes3d.scad b/shapes3d.scad index efe1f16..93cca60 100644 --- a/shapes3d.scad +++ b/shapes3d.scad @@ -2612,7 +2612,7 @@ function torus( // Function&Module: teardrop() // Synopsis: Creates a teardrop shape, or returns a vnf. -// Topics: Shapes (3D), Attachable, VNF Generators +// Topics: Shapes (3D), Attachable, VNF Generators, FDM Optimized // See Also: onion(), teardrop2d() // Description: // Makes a teardrop shape in the XZ plane. Useful for 3D printable holes. @@ -2753,7 +2753,7 @@ 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, or returns a vnf. -// Topics: Shapes (3D), Attachable, VNF Generators +// Topics: Shapes (3D), Attachable, VNF Generators, FDM Optimized // See Also: teardrop(), teardrop2d() // Description: // Creates a sphere with a conical hat, to make a 3D teardrop. @@ -3550,7 +3550,7 @@ module cylindrical_heightfield( // Module: ruler() // Synopsis: Creates a ruler. -// +// Topics: Distance // Usage: // ruler(length, width, [thickness=], [depth=], [labels=], [pipscale=], [maxscale=], [colors=], [alpha=], [unit=], [inch=]) [ATTACHMENTS]; // Description: