CurveCollection Class

  • A CurveCollection is an abstract (non-instantiable) class for various sets of curves with particular structures:
    • CurveChain is a (non-instantiable) intermediate class for a sequence of CurvePrimitive joining head-to-tail. The two instantiable forms of CurveChain are
      • Path - A chain not required to close, and not enclosing a planar area
      • Loop - A chain required to close from last to first so that a planar area is enclosed.
    • ParityRegion -- a collection of coplanar Loops, with "in/out" classification by parity rules
    • UnionRegion -- a collection of coplanar Loops, with "in/out" classification by union rules
    • BagOfCurves -- a collection of AnyCurve with no implied structure.

Extends

Extended by

Methods

Name Description
announceToCurveProcessor(processor: RecursiveCurveProcessor): void Abstract Support method for ICurvePrimitive ...  
checkForNonLinearPrimitives(): boolean return true if the curve collection has any primitives other than LineSegment3d and LineString3d  
clone(): CurveCollection | undefined Return a deep copy.  
cloneEmptyPeer(): CurveCollection Abstract clone an empty collection.  
cloneStroked(options?: StrokeOptions): AnyCurve Abstract Return a CurveCollection with the same structure but all curves replaced by strokes.  
cloneTransformed(transform: Transform): CurveCollection | undefined Create a deep copy of transformed curves.  
cloneWithExpandedLineStrings(): CurveCollection | undefined Create a deep copy with all linestrings expanded to multiple LineSegment3d.  
collectCurvePrimitives(): CurvePrimitive[] Return an array containing only the curve primitives.  
dgnBoundaryType(): number Abstract Return the boundary type of a corresponding MicroStation CurveVector.  
extendRange(rangeToExtend: Range3d, transform?: Transform): void Extend (increase) rangeToExtend as needed to include these curves (optionally transformed)  
getChild(i: number): AnyCurve | undefined Abstract Return a child identified by by index  
maxGap(): number return the max gap between adjacent primitives in Path and Loop collections.  
sumLengths(): number Return the sum of the lengths of all contained curves.  
tryAddChild(child: AnyCurve | undefined): boolean Abstract Try to add a child.  
tryTransformInPlace(transform: Transform): boolean Apply transform recursively to children  
createCurveLocationDetailOnAnyCurvePrimitive(source: GeometryQuery | undefined, fraction: number = 0.5): CurveLocationDetail | undefined Static * Find any curve primitive in the source.  

Inherited methods

Name Inherited from Description
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).
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
curveCollectionType Abstract CurveCollectionType Type discriminator.  
geometryCategory "curveCollection" = "curveCollection" String name for schema properties  
isAnyRegionType Accessor ReadOnly boolean Return true for planar region types:
Loop
ParityRegion
* UnionRegion
 
isClosedPath Accessor ReadOnly boolean Return true for a single-loop planar region type, i.e.  
isInner boolean Flag for inner loop status.  
isOpenPath Accessor ReadOnly boolean Return true for a Path, i.e.  

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: 13 October, 2019