PointString3d Class

A PointString3d is an array of points.

  • PointString3D is first class (displayable, possibly persistent) geometry derived from the GeometryQuery base class.
  • The various points in the PointString3d are NOT connected by line segments for display or other calculations.

Extends

Implements

Methods

Name Description
addPoint(point: Point3d): void Add a single point to the PointString3d  
addPoints(...points: any[]): void Add multiple points to the PointString3d  
clear(): void Reduce to empty set of points.  
clone(): PointString3d Return a deep clone.  
cloneTransformed(transform: Transform): PointString3d Clone and apply a transform.  
closestPoint(spacePoint: Point3d): { index: number, xyz: Point3d } Return the index and coordinates of the closest point to spacePoint.  
dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handlePointString(this)  
extendRange(rangeToExtend: Range3d, transform?: Transform): void Extend a range to include the points in this PointString3d.  
isAlmostEqual(other: GeometryQuery): boolean Return true if corresponding points are almost equal.  
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean Return true if all points are in the given plane.  
isSameGeometryClass(other: GeometryQuery): boolean Test if other is a PointString3d  
numPoints(): number Return the number of points.  
pointAt(i: number, result?: Point3d): undefined | Point3d Access a single point by index.  
popPoint(): void Remove the last point added to the PointString3d  
reverseInPlace(): void Reverse the point order  
setFrom(other: PointString3d): void Replace this PointString3d's point array by a clone of the array in other  
setFromJSON(json?: any): void Replace this instance's points by those from a json array, e.g.  
toJSON(): any Convert an PointString3d to a JSON object.  
tryTransformInPlace(transform: Transform): boolean Return the number of points.  
create(...points: any[]): PointString3d Static Create a PointString3d from points.  
createFloat64Array(xyzData: Float64Array): PointString3d Static Create a PointString3d from xyz coordinates packed in a Float64Array  
createPoints(points: Point3d[]): PointString3d Static Create from an array of Point3d  
fromJSON(json?: any): PointString3d Static Create a PointString3d from a json array, e.g.  

Inherited methods

Name Inherited from Description
range(transform?: Transform, result?: Range3d): Range3d GeometryQuery return the range of the entire (tree) GeometryQuery
tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean GeometryQuery try to move the geometry by dx,dy,dz
areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static GeometryQuery apply instance method isAlmostEqual if both are defined.

Properties

Name Type Description
geometryCategory Readonly "pointCollection" String name for schema properties  
points Accessor ReadOnly Point3d[] return a clone of the points array.  

Inherited properties

Name Type Inherited from Description
children Accessor ReadOnly undefined | GeometryQuery[] GeometryQuery return GeometryQuery children for recursive queries.

* leaf classes do not need to implement.

Defined in

Last Updated: 20 June, 2023