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 (optionally transformed). | |
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(): XYZProps[] | Convert an PointString3d to a JSON object. | |
tryTransformInPlace(transform: Transform): boolean | Apply transform on points in place. | |
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 GeometryQuery tree. |
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean | GeometryQuery | Try to move the geometry by dx,dy,dz. |
areAlmostEqual(a: GeometryQuery, b: 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
- curve/PointString3d.ts Line 28
Last Updated: 28 October, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.