Synopses, etc for skin.scad

This commit is contained in:
Revar Desmera 2023-05-01 00:32:49 -07:00
parent da0a75ad16
commit 21d592dad3
2 changed files with 51 additions and 15 deletions

View file

@ -71,6 +71,7 @@ DefineSynTags:
Mat = Can return a transformation matrix.
MatList = Can return a list of transformation matrices.
Path = Can return a Path.
PathList = Can return a list of Paths.
Region = Can return a Region.
Trans = Can transform children.
VNF = Can return a VNF.

View file

@ -18,11 +18,14 @@
// Section: Skin and sweep
// Function&Module: skin()
// Synopsis: Connect a sequence of arbitrary polygons into a 3D object.
// SynTags: VNF, Geom
// Topics: Extrusion, Skin
// See Also: sweep(), linear_sweep(), rotate_sweep(), spiral_sweep(), path_sweep()
// Usage: As module:
// skin(profiles, slices, [z=], [refine=], [method=], [sampling=], [caps=], [closed=], [style=], [convexity=], [anchor=],[cp=],[spin=],[orient=],[atype=]) [ATTACHMENTS];
// Usage: As function:
// vnf = skin(profiles, slices, [z=], [refine=], [method=], [sampling=], [caps=], [closed=], [style=], [anchor=],[cp=],[spin=],[orient=],[atype=]);
// Synopsis: Connect a sequence of arbitrary polygons into a 3D object.
// Description:
// Given a list of two or more path `profiles` in 3d space, produces faces to skin a surface between
// the profiles. Optionally the first and last profiles can have endcaps, or the first and last profiles
@ -507,11 +510,17 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
// Function&Module: linear_sweep()
// Usage:
// Synopsis: Create a linear extrusion from a path, with optional texturing.
// SynTags: VNF, Geom
// Topics: Extrusion, Textures, Sweep
// See Also: rotate_sweep(), sweep(), spiral_sweep(), path_sweep()
// Usage: As Module
// linear_sweep(region, [height], [center=], [slices=], [twist=], [scale=], [style=], [caps=], [convexity=]) [ATTACHMENTS];
// Usage: With Texturing
// linear_sweep(region, [height], [center=], texture=, [tex_size=]|[tex_counts=], [tex_scale=], [style=], [tex_samples=], ...) [ATTACHMENTS];
// Synopsis: Create a linear extrusion from a path with optional texturing.
// Usage: As Function
// vnf = linear_sweep(region, [height], [center=], [slices=], [twist=], [scale=], [style=], [caps=]);
// vnf = linear_sweep(region, [height], [center=], texture=, [tex_size=]|[tex_counts=], [tex_scale=], [style=], [tex_samples=], ...);
// Description:
// If called as a module, creates a polyhedron that is the linear extrusion of the given 2D region or polygon.
// If called as a function, returns a VNF that can be used to generate a polyhedron of the linear extrusion
@ -822,14 +831,16 @@ function linear_sweep(
// Function&Module: rotate_sweep()
// Synopsis: Create a surface of revolution from a path with optional texturing.
// SynTags: VNF, Geom
// Topics: Extrusion, Sweep, Revolution, Textures
// See Also: linear_sweep(), sweep(), spiral_sweep(), path_sweep()
// Usage: As Function
// vnf = rotate_sweep(shape, [angle], ...);
// Usage: As Module
// rotate_sweep(shape, [angle], ...) [ATTACHMENTS];
// Usage: With Texturing
// rotate_sweep(shape, texture=, [tex_size=]|[tex_counts=], [tex_scale=], [tex_samples=], [tex_rot=], [tex_inset=], ...) [ATTACHMENTS];
// Synopsis: Create a surface of revolution from a path with optional texturing.
// Topics: Extrusion, Sweep, Revolution
// Description:
// Takes a polygon or [region](regions.scad) and sweeps it in a rotation around the Z axis, with optional texturing.
// When called as a function, returns a [VNF](vnf.scad).
@ -1045,14 +1056,16 @@ module rotate_sweep(
// Function&Module: spiral_sweep()
// Synopsis: Sweep a path along a helix.
// SynTags: VNF, Geom
// Topics: Extrusion, Sweep, Spiral
// See Also: linear_sweep(), rotate_sweep(), sweep(), path_sweep()
// Usage: As Module
// spiral_sweep(poly, h, r|d=, turns, [taper=], [center=], [taper1=], [taper2=], [internal=], ...)[ATTACHMENTS];
// spiral_sweep(poly, h, r1=|d1=, r2=|d2=, turns, [taper=], [center=], [taper1=], [taper2=], [internal=], ...)[ATTACHMENTS];
// Usage: As Function
// vnf = spiral_sweep(poly, h, r|d=, turns, ...);
// vnf = spiral_sweep(poly, h, r1=|d1=, r1=|d2=, turns, ...);
// Synopsis: Sweep a path along a helix.
// Topics: Extrusion, Sweep
// Description:
// Takes a closed 2D polygon path, centered on the XY plane, and sweeps/extrudes it along a 3D spiral path
// of a given radius, height and degrees of rotation. The origin in the profile traces out the helix of the specified radius.
@ -1273,11 +1286,14 @@ module spiral_sweep(poly, h, r, turns=1, taper, r1, r2, d, d1, d2, internal=fals
// Function&Module: path_sweep()
// Synopsis: Sweep a 2d polygon path along a 2d or 3d path.
// SynTags: VNF, Geom
// Topics: Extrusion, Sweep, Paths
// See Also: linear_sweep(), rotate_sweep(), sweep(), spiral_sweep(), path_sweep2d()
// Usage: As module
// path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [scale=], [scale_by_length=], [last_normal=], [tangent=], [uniform=], [relaxed=], [caps=], [style=], [convexity=], [anchor=], [cp=], [spin=], [orient=], [atype=]) [ATTACHMENTS];
// Usage: As function
// vnf = path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [scale=], [scale_by_length=], [last_normal=], [tangent=], [uniform=], [relaxed=], [caps=], [style=], [transforms=], [anchor=], [cp=], [spin=], [orient=], [atype=]);
// Synopsis: Sweep a 2d polygon path along a 2d or 3d path.
// Description:
// Takes as input `shape`, a 2D polygon path (list of points), and `path`, a 2d or 3d path (also a list of points)
// and constructs a polyhedron by sweeping the shape along the path. When run as a module returns the polyhedron geometry.
@ -1868,11 +1884,14 @@ function path_sweep(shape, path, method="incremental", normal, closed, twist=0,
// Function&Module: path_sweep2d()
// Synopsis: Sweep a 2d polygon path along a 2d path allowing self-intersection.
// SynTags: VNF, Geom
// Topics: Extrusion, Sweep, Paths
// See Also: linear_sweep(), rotate_sweep(), sweep(), spiral_sweep(), path_sweep()
// Usage: as module
// path_sweep2d(shape, path, [closed], [caps], [quality], [style], [convexity=], [anchor=], [spin=], [orient=], [atype=], [cp=]) [ATTACHMENTS];
// Usage: as function
// vnf = path_sweep2d(shape, path, [closed], [caps], [quality], [style], [anchor=], [spin=], [orient=], [atype=], [cp=]);
// Synopsis: Sweep a 2d polygon path along a 2d path allowing self-intersection.
// Description:
// Takes an input 2D polygon (the shape) and a 2d path, and constructs a polyhedron by sweeping the shape along the path.
// When run as a module returns the polyhedron geometry. When run as a function returns a VNF.
@ -1996,11 +2015,14 @@ function _ofs_face_edge(face,firstlen,second=false) =
// Function&Module: sweep()
// Synopsis: Construct a 3d object from arbitrary transformations of a 2d polygon path.
// SynTags: VNF, Geom
// Topics: Extrusion, Sweep, Paths
// See Also: linear_sweep(), rotate_sweep(), spiral_sweep(), path_sweep(), path_sweep2d()
// Usage: As Module
// sweep(shape, transforms, [closed], [caps], [style], [convexity=], [anchor=], [spin=], [orient=], [atype=]) [ATTACHMENTS];
// Usage: As Function
// vnf = sweep(shape, transforms, [closed], [caps], [style], [anchor=], [spin=], [orient=], [atype=]);
// Synopsis: Construct a 3d object from arbitrary transformations of a 2d polygon path.
// Description:
// The input `shape` must be a non-self-intersecting 2D polygon or region, and `transforms`
// is a list of 4x4 transformation matrices. The sweep algorithm applies each transformation in sequence
@ -2102,10 +2124,12 @@ module sweep(shape, transforms, closed=false, caps, style="min_edge", convexity=
// Section: Functions for resampling and slicing profile lists
// Function: subdivide_and_slice()
// Synopsis: Resample list of paths to have the same point count and interpolate additional paths.
// SynTags: PathList
// Topics: Paths, Path Subdivision
// See Also: slice_profiles()
// Usage:
// newprof = subdivide_and_slice(profiles, slices, [numpoints], [method], [closed]);
// Synopsis: Resample list of paths to have the same point count and interpolate additional paths.
// Description:
// Subdivides the input profiles to have length `numpoints` where `numpoints` must be at least as
// big as the largest input profile. By default `numpoints` is set equal to the length of the
@ -2133,7 +2157,10 @@ function subdivide_and_slice(profiles, slices, numpoints, method="length", close
// Function: slice_profiles()
// Synopsis: Linearly interpolates between path profiles.
// SynTags: PathList
// Topics: Paths, Path Subdivision
// See Also: subdivide_and_slice()
// Usage:
// profs = slice_profiles(profiles, slices, [closed]);
// Description:
@ -2188,9 +2215,12 @@ function _smooth(data,len,closed=false,angle=false) =
// Function: rot_resample()
// Synopsis: Resample a list of rotation operators.
// SynTags: MatList
// Topics: Matrices, Interpolation, Rotation
// See Also: subdivide_and_slice(), slice_profiles()
// Usage:
// rlist = rot_resample(rotlist, n, [method=], [twist=], [scale=], [smoothlen=], [long=], [turns=], [closed=])
// Synopsis: Resample a list of rotation operators.
// Description:
// Takes as input a list of rotation matrices in 3d. Produces as output a resampled
// list of rotation operators (4x4 matrixes) suitable for use with sweep(). You can optionally apply twist to
@ -2590,9 +2620,12 @@ function _find_one_tangent(curve, edge, curve_offset=[0,0,0], closed=true) =
// Function: associate_vertices()
// Synopsis: Create vertex association to control how {{skin()}} links vertices.
// SynTags: PathList
// Topics: Extrusion, Skinning, Paths
// See Also: skin(), sweep()
// Usage:
// newpoly = associate_vertices(polygons, split);
// Synopsis: Create vertex association to control how skin() links vertices.
// Description:
// Takes as input a list of polygons and duplicates specified vertices in each polygon in the list through the series so
// that the input can be passed to `skin()`. This allows you to decide how the vertices are linked up rather than accepting
@ -2763,10 +2796,12 @@ function associate_vertices(polygons, split, curpoly=0) =
// Function: texture()
// Usage:
// tx = texture(tex, [n=], [inset=], [gap=], [roughness=]);
// Topics: Textures, Knurling
// Synopsis: Produce a standard texture.
// Topics: Extrusion, Textures
// See Also: linear_sweep(), rotate_sweep()
// Usage:
// tx = texture(tex, [n=], [inset=], [gap=], [roughness=]);
// Description:
// Given a texture name, returns a texture. Textures can come in two varieties:
// - Heightfield textures which are 2D arrays of scalars. These are usually faster to render, but can be less precise and prone to triangulation errors. The table below gives the recommended style for the best triangulation. If results are still incorrect, switch to the similar VNF tile by adding the "_vnf" suffix.