Removes a point when it repeats the one right before it; the same point further away is kept.
With checkFirstAndLast on, a last point that repeats the first is dropped too. Points
within tolerance of each other count as the same.
Example: [[0,0,0], [0,0,0], [1,0,0], [1,0,0], [2,0,0]] -> [[0,0,0], [1,0,0], [2,0,0]]
The points, the tolerance and whether to compare the first and last
The points without consecutive repeats
Builds a 3D point from its x, y and z values.
Example: x=10, y=5, z=3 -> [10,5,3]
The three values
The point [x, y, z]
Builds a 2D point from its x and y values.
Example: x=10, y=5 -> [10,5]
The two values
The point [x, y]
Lays out points along a logarithmic spiral in the XY plane, from the origin outward to
radius.
numberPoints sets how many points are placed, phi and widening how quickly the spiral
opens, and factor where along the curve it starts. Every point has z = 0.
The point count, the radius and the shape of the spiral
The points along the spiral, from the center outward
Lays out the centers of a honeycomb of hexagons in the XY plane.
radiusHexagon is the distance from a hexagon's center to a corner; columns run along X and
rows along Y, every second row shifted by half a column. orientOnCenter centers the grid on
the origin, pointsOnGround lays it on the XZ plane.
The hexagon size, how many columns and rows, and where to place the grid
The center points, row by row
Lays out a honeycomb of hexagons that fills a given width and height, sizing the hexagons from the counts.
The result carries the center points and the six corners of every hexagon. A corner points up
unless flatTop is set; the extend flags stretch the outer rows past the edges to cover the
rectangle without a jagged border.
The area to fill, the hexagon counts, the orientation and the placement options
The centers and the corner points of every hexagon
Finds the direction at right angles to the plane through three points, with length 1.
The direction follows the right-hand rule going from the first point to the second to the
third; reverseNormal flips it. Points on one line have no plane, so the result is
undefined.
Example: [0,0,0], [1,0,0], [0,1,0] -> [0,0,1]
The three points and whether to flip the result
The unit normal, or undefined when the points are on one line
Lays out points along the circular arc through three points, from the first through the second to the third.
The arc is divided into segments equal steps between the given ends. Points on one line fix
no arc and come back as they are.
Example: [1,0,0], [0,1,0] and [-1,0,0] in 2 segments -> [[1,0,0], [0,1,0], [-1,0,0]]
The three points and the number of steps
The points along the arc, its ends included
Finds the smallest axis-aligned box that holds all the points.
The result carries the min and max corners, the center, and the width (X), height (Y) and length (Z). Example: points [[0,0,0], [10,5,3]] -> min [0,0,0], max [10,5,3], center [5,2.5,1.5]
The bounding box with its corners, center and sizes
Measures the distance from a point to the nearest point in a list.
Example: point [0,0,0] and points [[5,0,0], [10,0,0], [3,0,0]] -> 3
The point to measure from and the points to search
The distance to the nearest point, in model units
Finds the position of the nearest point in a list, counted from 1.
Example: point [0,0,0] and points [[5,0,0], [10,0,0], [3,0,0]] -> 3
The point to measure from and the points to search
The 1-based index of the nearest point
Finds the nearest point in a list to a given point.
Example: point [0,0,0] and points [[5,0,0], [10,0,0], [3,0,0]] -> [3,0,0]
The point to measure from and the points to search
The nearest point
Finds the largest fillet that fits a corner: the arc touches both segments and stays inside them.
The corner is end; start and center are the far ends of the two segments that meet
there. The radius is limited by the shorter segment. A straight or folded-back corner, or a
segment shorter than tolerance, gives 0.
The far end of each segment, the corner they share, and the tolerance
The largest fillet radius, in model units
Finds the largest fillet at a corner whose arc touches each segment within its nearer half, so neighboring corners of a polyline can each be filleted without the arcs overlapping.
The corner is end; start and center are the far ends of the two segments. A straight or
folded-back corner, or a segment shorter than tolerance, gives 0.
The far end of each segment, the corner they share, and the tolerance
The largest fillet radius under the half-segment rule, in model units
Finds the largest fillet for every corner of a polyline, each limited to the nearer half of its segments so the fillets never overlap.
With checkLastWithFirst on, the polyline is treated as closed and the two corners at the
ends are included. Fewer than three points give an empty list.
The polyline points, whether it is closed, and the tolerance
One radius per corner, in the order of the corners
Finds one fillet radius that fits every corner of a polyline: the smallest of the per-corner maximums under the half-segment rule.
With checkLastWithFirst on, the polyline is treated as closed. Fewer than three points, or
any corner that allows no fillet, give 0.
The polyline points, whether it is closed, and the tolerance
The radius that fits every corner, in model units
Measures the straight-line distance between two points.
Example: [0,0,0] to [3,4,0] -> 5
The two points
The distance in model units
Measures the distance from one point to each point in a list.
Example: start [0,0,0] and end points [[3,0,0], [0,4,0], [5,0,0]] -> [3, 4, 5]
The start point and the points to measure to
One distance per end point, in the same order
Tells whether two points are closer together than a tolerance.
Example: [1.0000001, 2, 3] and [1, 2, 3] with tolerance 1e-6 -> true
The two points and the tolerance
True when the distance between them is below the tolerance
Applies a transformation matrix, or a list of them in order, to one point.
Example: point [0,0,0] with a translation by [5,5,0] -> [5,5,0]
The point and the transformation to apply
The transformed point
Applies the same transformation matrix, or list of them in order, to every point.
Example: five points with a 90 degree rotation -> all five rotated together
The points and the transformation to apply to each
The transformed points, in the same order
Applies a different transformation to each point: the first transformation to the first point, and so on.
The two lists must have the same length, or an error is thrown. Example: three points with three translations -> each point moved by its own translation
The points and one transformation per point
The transformed points, in the same order
Moves every point by the same vector.
Example: points [[0,0,0], [1,0,0]] by [5,5,0] -> [[5,5,0], [6,5,0]]
The points and the vector to move them by
The moved points, in the same order
Moves each point by its own vector: the first point by the first vector, and so on.
The two lists must have the same length, or an error is thrown. Example: three points with three vectors -> each point moved by its own vector
The points and one vector per point
The moved points, in the same order
Moves every point by the given x, y and z amounts.
Example: point [0,0,0] with x=10, y=5, z=0 -> [10,5,0]
The points and the distance to move along each axis
The moved points, in the same order
Scales points away from or toward a center, with its own factor per axis.
Example: point [10,0,0] about center [5,0,0] with factors [2,1,1] -> [15,0,0]
The points, the center to scale about and the factor per axis
The scaled points, in the same order
Stretches points along one direction, measured from a center; distances across that direction stay as they are.
Example: point [10,0,0] from center [0,0,0] along [1,0,0] with scale 2 -> [20,0,0]
The points, the center, the direction to stretch along and the factor
The stretched points, in the same order
Rotates points around an axis that passes through a center.
The angle is in degrees and turns counter-clockwise when the axis points toward you. Example: point [10,0,0] around the Y axis through [0,0,0] by 90 -> [0,0,-10]
The points, the axis direction, the center it passes through and the angle in degrees
The rotated points, in the same order
Repeats one point a given number of times in a list.
Example: point [5,5,0] three times -> [[5,5,0], [5,5,0], [5,5,0]]
The point and how many copies to make
The list of copies
Points as plain number arrays. A point is
[x, y, z]with Y pointing up, the same shape as a vector, so the two can be passed to each other's methods; a 2D point is[x, y]. Every method returns new points or numbers and never changes its inputs. Angles are in degrees and lengths in model units.