Header menu logo Euclid

Points3D Type

A type containing only static member functions for operating on multiple 3D points or set of 3D points. Aka point-clouds

Static members

Static member Description

Points3D.center pts

Full Usage: Points3D.center pts

Parameters:
Returns: Pnt

Finds the center, mean, or average point.

pts : IList<Pnt>
Returns: Pnt

Points3D.closestOfTwo pt1 pt2 referencePoint

Full Usage: Points3D.closestOfTwo pt1 pt2 referencePoint

Parameters:
Returns: Pnt

Returns the closest of two 3D points to a given reference 3D point. If both points are equidistant the first point is returned.

pt1 : Pnt
pt2 : Pnt
referencePoint : Pnt
Returns: Pnt

Points3D.closestPoint (pts, pt)

Full Usage: Points3D.closestPoint (pts, pt)

Parameters:
Returns: Pnt

Returns the closest point from a 3D point list to a given 3D point.

pts : IList<Pnt>
pt : Pnt
Returns: Pnt

Points3D.closestPointIdx (pts, pt)

Full Usage: Points3D.closestPointIdx (pts, pt)

Parameters:
Returns: int

Returns the closest 3D point index from a 3D point list to a given 3D point.

pts : IList<Pnt>
pt : Pnt
Returns: int

Points3D.closestPointsIdx (xs, ys)

Full Usage: Points3D.closestPointsIdx (xs, ys)

Parameters:
Returns: int * int

Returns the indices of the 3D points that are closest to each other.

xs : IList<Pnt>
ys : IList<Pnt>
Returns: int * int

Points3D.cullDuplicatePointsInSeq (pts, tolerance)

Full Usage: Points3D.cullDuplicatePointsInSeq (pts, tolerance)

Parameters:
    pts : ResizeArray<Pnt>
    tolerance : float

Returns: ResizeArray<Pnt>

Culls 3D points if they are too close to previous or next item. Last and first 3D points stay the same.

pts : ResizeArray<Pnt>
tolerance : float
Returns: ResizeArray<Pnt>

Points3D.findContinuousPoints (ptss, tolGap)

Full Usage: Points3D.findContinuousPoints (ptss, tolGap)

Parameters:
    ptss : ResizeArray<ResizeArray<Pnt>>
    tolGap : float

Returns: ResizeArray<Pnt>

Similar to join polylines, this tries to find continuous sequences of 3D points. 'tolGap' is the maximum allowable gap between the start and the endpoint of two segments. Search starts from the segment with the most points. Both start and end point of each 3D point list are checked for adjacency.

ptss : ResizeArray<ResizeArray<Pnt>>
tolGap : float
Returns: ResizeArray<Pnt>

Points3D.minDistBetweenPointSets (xs, ys)

Full Usage: Points3D.minDistBetweenPointSets (xs, ys)

Parameters:
Returns: float

Given two lists of 3D points finds the pair that are closest to each other and returns their distance.

xs : IList<Pnt>
ys : IList<Pnt>
Returns: float

Points3D.mostDistantPoint (findPointFrom, checkAgainst)

Full Usage: Points3D.mostDistantPoint (findPointFrom, checkAgainst)

Parameters:
Returns: Pnt

Find the 3D point that has the biggest distance to any 3D point from another set.

findPointFrom : IList<Pnt>
checkAgainst : IList<Pnt>
Returns: Pnt

Points3D.mostDistantPointIdx (findPointFrom, checkAgainst)

Full Usage: Points3D.mostDistantPointIdx (findPointFrom, checkAgainst)

Parameters:
Returns: int * int

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

findPointFrom : IList<Pnt>
checkAgainst : IList<Pnt>
Returns: int * int

Points3D.normalOfPoints pts

Full Usage: Points3D.normalOfPoints pts

Parameters:
Returns: Vec

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. The sweep from the first to the second point (from the mean center) defines the orientation of the normal.

pts : IList<Pnt>
Returns: Vec

Type something to start searching.