Path Util
make-subpath
make-subpath()
Create a new subpath. A path is an array of subpaths.
first-subpath-closed
first-subpath-closed()
Get if the first subpath is closed
first-subpath-start
first-subpath-start()
Get the start position of the first path
subpath-start
subpath-start()
Get the start point of a subpath
subpath-end
subpath-end()
Get the end point of a subpath
last-subpath-end
last-subpath-end()
Get the end position of the last path
same-z-plane
same-z-plane()
Tests whether every vertex in path lies on the same z-plane, returning (z, same-z) where z is the z-coordinate of the first vertex and same-z is true iff every other vertex is within tol of that z-coordinate.
bounds
bounds()
Calculates the bounding points for a list of path segments
segment-lengths
segment-lengths()
Returns an array of arrays with the lengths of all path segments. One sub-array for each subpath and its segments.
length
length()
Returns the sum of all segment lengths of a path.
point-at
point-at()
Get information about a point at a given distance on a path.
shorten-to
shorten-to()
Shorten a path on one or both sides
normalize
normalize()
Normalize a path:
- Add missing closing segments
- Remove zero-length line segments