Points Type
Provides operations on 2D and 3D points.
Static members
Static member |
Description
|
|
|
|
Checks if three points are in one line. This is a very fast check, but it is hard to find an appropriate tolerance. (Default is 0.001) This tolerance is the square area of the parallelogram described by two vectors created from the 3 points. So it also returns true if the points are equal or very close to each other. Returns false for NaN input values. See Points.areInLine function too.
|
|
|
|
Returns the double square area of a triangle. This is the fastest way to get a comparison or sorting value for the area of a triangle. This is just the square length of the Cross Product vector. The length of a Cross Product vector is equal to the area of the parallelogram described by the two input vectors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Similar to Join Polylines this tries to find continuos sequences of 3D points. 'tolGap' is the maximum allowable gap between the start and the endpoint of to segments. Search starts from the segment with the most points. Both start and end point of each 3D point list is checked for adjacency.
|
|
Similar to join polylines this tries to find continuos sequences of 2D points. 'tolGap' is the maximum allowable gap between the start and the endpoint of to segments. Search starts from the segment with the most points. Both start and end point of each 2D point list is checked for adjacency.
|
|
The sign is negative if the loop is clockwise. Last and first point should be the same.
|
|
|
|
|
|
|
|
|
|
Find the index of the 2D point that has the biggest distance to any 2D point from the other set. Basically the most lonely point in 'findPointFrom' list with respect to 'checkAgainst' list. Returns findPointFromIdx * checkAgainstIdx
|
|
Find the index of the 3D point that has the biggest distance to any 3D point from the other set. Basically the most lonely point in 'findPointFrom' list with respect to 'checkAgainst' list. Returns findPointFromIdx * checkAgainstIdx
|
|
Finds the mean normal of many points. It finds the center point and then takes cross-products iterating all points in pairs of two. The first three points define the orientation of the normal. So it considers the current order of points too. If the order is counterclockwise in the World X-Y plane then the normal is in world Z orientation.
|
|
Finds the mean normal of many points. It finds the center point and then takes cross-products iterating all points in pairs of two. The first three points define the orientation of the normal. So it considers the current order of points too. If the order is counterclockwise in the World X-Y plane then the normal is in world Z orientation.
|
Full Usage:
Points.offsetInCorner (prevPt, thisPt, nextPt, prevDist, nextDist)
Parameters: Returns: ValueOption<Pnt>
|
It finds the inner offset point in a corner (defined by a Polyline from 3 points (prevPt, thisPt and nextPt) The offset from first and second segment are given separately and can vary (prevDist and nextDist). Use negative distance for outer offset. If Points are collinear by 0.25 degrees or less than 1-e6 units apart returns: ValueNone. Use negative distances to get outside offset.
|
Full Usage:
Points.offsetInCorner (thisPt, prevToThis, thisToNext, prevDist, nextDist)
Parameters: Returns: ValueOption<Pnt>
|
It finds the inner offset point in a corner (defined a point, a previous vector to this point and a next vector from this point) The offset from first and second segment are given separately and can vary (prevDist and nextDist). Use negative distance for outer offset. If Points are collinear by 0.25 degrees or less than 1-e6 units apart returns: ValueNone. Use negative distances to get outside offset.
|
It finds the inner offset point in a corner (defined by a Polyline from 3 points (prevPt, thisPt and nextPt) The offset from first and second segment are given separately and can vary (prevDist and nextDist). Use negative distance for outer offset. If Points are collinear by 0.25 degrees or less than 1-e6 units apart returns: ValueNone. Use negative distances to get outside offset. The 'referenceNormal' is' An approximate orientation Normal to help find the correct offset side, To be in Z Axis orientation for Counter-Clockwise loops in 2D. Returns the offset point, the unitized normal vector aligned with the referenceNormal, the shift direction for prev and next line.
|
|
It finds the inner offset point in a corner (defined a point, a previous vector to this point and a next vector from this point) The offset from first and second segment are given separately and can vary (prevDist and nextDist). Use negative distance for outer offset. If Points are collinear by 0.25 degrees or less than 1-e6 units apart returns: ValueNone. Use negative distances to get outside offset. The 'referenceNormal' is' An approximate orientation Normal to help find the correct offset side, To be in Z Axis orientation for Counter-Clockwise loops in 2D. Returns the offset point, the unitized normal vector aligned with the referenceNormal, the shift direction for prev and next line.
|
|
It finds the inner offset point in a corner (defined by a Polyline from 3 points (prevPt, thisPt and nextPt) The offset from first and second segment are given separately and can vary (prevDist and nextDist). Use negative distance for outer offset. If Points are collinear by 0.25 degrees or less than 1-e6 units apart returns: ValueNone. Use negative distances to get outside offset. 'referenceOrient' is positive for counterclockwise loops otherwise negative. Returns the offset point, the shift direction for prev and next line.
|
|
It finds the inner offset point in a corner (defined a point, a previous vector to this point and a next vector from this point) The offset from first and second segment are given separately and can vary (prevDist and nextDist). Use negative distance for outer offset. If Points are collinear by 0.25 degrees or less than 1-e6 units apart returns: ValueNone. Use negative distances to get outside offset. 'referenceOrient' is positive for counterclockwise loops otherwise negative. Returns the offset point, the shift direction for prev and next line.
|