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.
  • A single entry in the chain can in fact contain multiple curve primitives if the entry itself is (for instance) CurveChainWithDistanceIndex which presents itself (through method interface) as a CurvePrimitive with well defined mappings from fraction to xyz, but in fact does all the calculations over multiple primitives.
  • The specific derived classes are Path and Loop
  • CurveChain is an intermediate class. It is not instantiable on its own.

Extends

Extended by

Methods

Name Description
constructor(): CurveChain Protected    
cloneStroked(options?: StrokeOptions): AnyCurve Return a structural clone, with CurvePrimitive objects stroked.  
cyclicCurvePrimitive(index: number): CurvePrimitive | undefined Return the [index] curve primitive, using modulo to mapindex to the cyclic indexing.  
extendRange(range: Range3d, transform?: Transform): void invoke curve.extendRange(range, transform) for each child  
getChild(i: number): CurvePrimitive | undefined Return a child by index  
getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined Stroke the chain into a simple xyz array.  
reverseChildrenInPlace(): void Reverse each child curve (in place)
Reverse the order of the children in the CurveChain array.
 
tryAddChild(child: AnyCurve | undefined): boolean add a child curve.  

Inherited methods

Name Inherited from Description
announceToCurveProcessor(processor: RecursiveCurveProcessor): void Abstract CurveCollection Support method for ICurvePrimitive ...
checkForNonLinearPrimitives(): boolean CurveCollection return true if the curve collection has any primitives other than LineSegment3d and LineString3d
clone(): CurveCollection | undefined CurveCollection Return a deep copy.
cloneEmptyPeer(): CurveCollection Abstract CurveCollection clone an empty collection.
cloneTransformed(transform: Transform): CurveCollection | undefined CurveCollection Create a deep copy of transformed curves.
cloneWithExpandedLineStrings(): CurveCollection | undefined CurveCollection Create a deep copy with all linestrings expanded to multiple LineSegment3d.
collectCurvePrimitives(): CurvePrimitive[] CurveCollection Return an array containing only the curve primitives.
dgnBoundaryType(): number Abstract CurveCollection Return the boundary type of a corresponding MicroStation CurveVector.
dispatchToGeometryHandler(handler: GeometryHandler): any Abstract GeometryQuery * "double dispatch" call pattern.
isAlmostEqual(other: GeometryQuery): boolean GeometryQuery test for exact structure and nearly identical geometry.
isSameGeometryClass(other: GeometryQuery): boolean Abstract GeometryQuery test if (other instanceof this.Type).
maxGap(): number CurveCollection return the max gap between adjacent primitives in Path and Loop collections.
range(transform?: Transform, result?: Range3d): Range3d GeometryQuery return the range of the entire (tree) GeometryQuery
sumLengths(): number CurveCollection Return the sum of the lengths of all contained curves.
tryTransformInPlace(transform: Transform): boolean CurveCollection Apply transform recursively to children
tryTranslateInPlace(dx: number, dy: number = 0, dz: number = 0): boolean GeometryQuery try to move the geometry by dx,dy,dz
createCurveLocationDetailOnAnyCurvePrimitive(source: GeometryQuery | undefined, fraction: number = 0.5): CurveLocationDetail | undefined Static CurveCollection * Find any curve primitive in the source.

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 CurveCollectionType CurveCollection Type discriminator.
geometryCategory "curveCollection" = "curveCollection" CurveCollection String name for schema properties
isAnyRegionType Accessor ReadOnly boolean CurveCollection Return true for planar region types:
Loop
ParityRegion
* UnionRegion
isClosedPath Accessor 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 boolean CurveCollection Flag for inner loop status.
isOpenPath Accessor ReadOnly boolean CurveCollection Return true for a Path, i.e. a chain of curves joined head-to-tail

Defined in

Last Updated: 08 January, 2020