Reverses the order of the points, so the polyline runs the other way.
The given polyline's own point list is reversed in place and handed back inside a new polyline object. Example: [[0,0,0], [1,0,0], [2,0,0]] -> [[2,0,0], [1,0,0], [0,0,0]]
The polyline
A polyline with the points in reverse order
Splits the polyline into line objects, one per segment, each with a start and an end point.
A closed polyline also gets the segment from its last point back to its first, unless the two coincide. Example: three points -> two lines, or three when closed
The polyline
One line per segment, in order
Splits the polyline into segments, each a pair of points.
A closed polyline also gets the segment from its last point back to its first, unless the two coincide. Fewer than two points give no segments. Example: four points, closed -> four segments around the loop
The polyline
One point pair per segment, in order
Builds a polyline object from points, open or closed.
Example: three points with isClosed true -> a triangle
The points and whether the last joins back to the first
The polyline object
Finds the largest fillet for every corner of the polyline, each limited to the nearer half of its segments so the fillets never overlap.
A closed polyline includes the two corners at its ends. Fewer than three points give an empty list.
The polyline and the tolerance
One radius per corner, in the order of the corners
Finds one fillet radius that fits every corner of the polyline: the smallest of the per-corner maximums under the half-segment rule.
Fewer than three points, or any corner that allows no fillet, give 0.
The polyline and the tolerance
The radius that fits every corner, in model units
Measures the polyline by adding up the straight distances between neighboring points.
The closing segment of a closed polyline is not counted. Example: [[0,0,0], [3,0,0], [3,4,0]] -> 7
The polyline
The length in model units
Counts the points of the polyline.
Example: three points -> 3
The polyline
The number of points
Reads the list of points out of the polyline.
Example: { points: [[0,0,0], [1,0,0]] } -> [[0,0,0], [1,0,0]]
The polyline
Its points, in order
Finds the points where two polylines cross each other, testing every segment of one against every segment of the other.
Crossings closer together than the tolerance are reported once. Example: two polylines forming an X -> the point in the middle
The two polylines and the tolerance
The crossing points; empty when there are none
Finds the points where the polyline crosses itself.
Neighboring segments are not tested against each other, and crossings closer together than the tolerance are reported once. Example: a figure-eight -> its one crossing point
The polyline and the tolerance
The crossing points; empty when there are none
Joins loose segments into polylines by matching up ends that meet within the tolerance.
Segments that connect end to end become one polyline each chain; segments that touch nothing become single-segment polylines. Example: ten scattered segments forming two chains -> two polylines
The segments and the tolerance for two ends to count as touching
The polylines the segments form
Applies a transformation matrix, or a list of them in order, to every point of the polyline.
Example: a translation by [5,0,0] -> every point moved 5 along X
The polyline and the transformation
A new polyline with the transformed points
Polylines: chains of straight segments through a list of points, held as plain objects of the form
{ points, isClosed }. A closed polyline joins its last point back to its first. The methods here measure a polyline, convert it to segments or lines, find where polylines cross, sort loose segments into chains and size fillets for its corners. Lengths are in model units.