PointString3d Class

A PointString3d is an array of points.

  • PointString3D is first class (persistible, displayable) 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): object 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): Point3d | undefined 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, dz: number = 0): boolean GeometryQuery try to move the geometry by dx,dy,dz

Properties

Name Type Description
geometryCategory "pointCollection" = "pointCollection"    
points Accessor ReadOnly Point3d[] return a clone of the points array.  

Inherited properties

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

* leaf classes do not need to implement.

Defined in

Last Updated: 20 September, 2019