More synopses

This commit is contained in:
Richard Milewski
2023-03-29 17:19:52 -07:00
parent 912d822075
commit 8740497497
4 changed files with 57 additions and 14 deletions

View File

@@ -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: