CurveChain Class

Shared base class for use by both open and closed paths.

  • A CurveChain contains only CurvePrimitives. No other paths, loops, or regions allowed.
  • The specific derived classes are Path and Loop.
  • CurveChain is an intermediate class. It is not instantiable on its own.
  • The related class CurveChainWithDistanceIndex is a CurvePrimitive whose API presents well-defined mappings from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.

@see Curve Collections learning article.

Extends

Extended by

Methods

Name Description
constructor(): CurveChain Protected Constructor  
childIndex(target: CurvePrimitive, alsoSearchProxies?: boolean): undefined | number Return the index where target is found in the array of children.  
cloneStroked(options?: StrokeOptions): CurveChain Abstract Return a structural clone, with CurvePrimitive objects stroked.  
cyclicCurvePrimitive(index: number, cyclic: booleantrue): undefined | CurvePrimitive Return the curve primitive at the given index, optionally using modulo to map index to the cyclic indexing.  
endPoint(result?: Point3d): undefined | Point3d Return the end point of the curve chain (end point of the last child).  
extendRange(range: Range3d, transform?: Transform): void Invoke curve.extendRange(range, transform) for each child  
getChild(i: number): undefined | CurvePrimitive Return a child by index  
getPackedStrokes(options?: StrokeOptions): undefined | GrowableXYZArray Stroke the chain into a simple xyz array.  
primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(index: number, fraction: number, cyclic: booleanfalse, result?: CurveLocationDetail): undefined | CurveLocationDetail Evaluate an indexed curve at a fraction.  
reverseChildrenInPlace(): void Reverse each child curve (in place).  
reverseInPlace(): void Same as reverseChildrenInPlace.  
startPoint(result?: Point3d): undefined | Point3d Return the start point of the curve chain (start point of the first child).  
tryAddChild(child: AnyCurve): boolean Add a child curve.  

Inherited methods

Name Inherited from Description
announceToCurveProcessor(processor: RecursiveCurveProcessor): void Abstract Inherited CurveCollection Support method for ICurvePrimitive ...
checkForNonLinearPrimitives(): boolean Inherited CurveCollection Return true if the curve collection has any primitives other than LineSegment3d and LineString3d
clone(): CurveCollection Inherited CurveCollection Return a deep copy.
cloneEmptyPeer(): CurveCollection Abstract Inherited CurveCollection Clone an empty collection.
cloneTransformed(transform: Transform): undefined | CurveCollection Inherited CurveCollection Create a deep copy of transformed curves.
cloneWithExpandedLineStrings(): CurveCollection Inherited CurveCollection Create a deep copy with all linestrings broken down into multiple LineSegment3d.
closestPoint(spacePoint: Point3d, _extend: VariantCurveExtendParameterfalse, result?: CurveLocationDetail): undefined | CurveLocationDetail Inherited CurveCollection Return the closest point on the contained curves.
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: booleanfalse, explodeLineStrings: booleanfalse): CurvePrimitive[] Inherited CurveCollection Return an array containing all CurvePrimitives in the instance.
dgnBoundaryType(): number Abstract Inherited CurveCollection Return the boundary type of a corresponding MicroStation CurveVector.
dispatchToGeometryHandler(handler: GeometryHandler): any Abstract Inherited CurveCollection Double Dispatch call pattern.
isAlmostEqual(other: GeometryQuery): boolean Inherited CurveCollection Test for exact structure and nearly identical geometry.
isAnyRegion(): this is AnyRegion Inherited CurveCollection Type guard for AnyRegion
isLoop(): this is Loop Inherited CurveCollection Type guard for Loop
isPath(): this is Path Inherited CurveCollection Type guard for Path
isSameGeometryClass(other: GeometryQuery): boolean Abstract Inherited CurveCollection Test if (other instanceof this.Type).
maxGap(): number Inherited CurveCollection Return the max gap between adjacent primitives in Path and Loop collections.
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d Inherited CurveCollection Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters
range(transform?: Transform, result?: Range3d): Range3d Inherited CurveCollection Return the range of the entire GeometryQuery tree.
sumLengths(): number Inherited CurveCollection Return the sum of the lengths of all contained curves.
tryTransformInPlace(transform: Transform): boolean Inherited CurveCollection Apply transform recursively to children
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean Inherited CurveCollection Try to move the geometry by dx,dy,dz.
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited CurveCollection Apply instance method isAlmostEqual if both are defined.
createCurveLocationDetailOnAnyCurvePrimitive(source: GeometryQuery, fraction: number0.5): undefined | CurveLocationDetail Static Inherited CurveCollection Find any CurvePrimitive in the source and evaluate it at the given fraction.

Properties

Name Type Description
_curves Protected CurvePrimitive[] The curve primitives in the chain.  
children Accessor ReadOnly CurvePrimitive[] Return the array of CurvePrimitive  

Inherited properties

Name Type Inherited from Description
curveCollectionType Abstract Readonly Inherited CurveCollectionType CurveCollection Type discriminator.
geometryCategory Readonly Inherited "curveCollection" CurveCollection String name for schema properties
isAnyRegionType Accessor Inherited ReadOnly boolean CurveCollection Return true for planar region types:
* Loop
* ParityRegion
* UnionRegion
isClosedPath Accessor Inherited ReadOnly boolean CurveCollection Return true for a single-loop planar region type, i.e. Loop.
* This is NOT a test for physical closure of a Path.
isInner Inherited boolean CurveCollection Flag for inner loop status.
isOpenPath Accessor Inherited ReadOnly boolean CurveCollection Return true for a Path, i.e. a chain of curves joined head-to-tail

Defined in

Last Updated: 29 November, 2024