CurveCollection Class

A CurveCollection is an abstract (non-instantiable) class for various sets of curves with particular structures:

  • CurveChain - a non-instantiable intermediate class for a sequence of CurvePrimitive joining head-to-tail. The two instantiable forms of CurveChain are:
    • Path - a chain of curves. Does not have to be closed or planar. A closed Path is not treated as bounding a surface.
    • Loop - a closed and planar chain of curves. A Loop is treated as bounding a planar area.
  • ParityRegion - a collection of coplanar Loop, with "in/out" classification by parity rules.
  • UnionRegion - a collection of coplanar Loop and/or ParityRegion, with "in/out" classification by union rules.
  • BagOfCurves - a collection of AnyCurve with no implied structure.

@see Curve Collections learning article.

Extends

Extended by

Methods

Name Description
constructor(): CurveCollection    
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 Return a deep copy.  
cloneEmptyPeer(): CurveCollection Abstract Clone an empty collection.  
cloneStroked(options?: StrokeOptions): CurveCollection Abstract Return a CurveCollection with the same structure but all curves replaced by strokes.  
cloneTransformed(transform: Transform): undefined | CurveCollection Create a deep copy of transformed curves.  
cloneWithExpandedLineStrings(): CurveCollection Create a deep copy with all linestrings broken down into multiple LineSegment3d.  
closestPoint(spacePoint: Point3d, _extend: VariantCurveExtendParameterfalse, result?: CurveLocationDetail): undefined | CurveLocationDetail Return the closest point on the contained curves.  
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: booleanfalse, explodeLineStrings: booleanfalse): CurvePrimitive[] Return an array containing all CurvePrimitives in the instance.  
dgnBoundaryType(): number Abstract Return the boundary type of a corresponding MicroStation CurveVector.  
extendRange(rangeToExtend: Range3d, transform?: Transform): void Extend (increase) the given range as needed to encompass all curves in the curve collection.  
getChild(i: number): undefined | AnyCurve Abstract Return a child identified by by index  
isAnyRegion(): this is AnyRegion Type guard for AnyRegion  
isLoop(): this is Loop Type guard for Loop  
isPath(): this is Path Type guard for Path  
maxGap(): number Return the max gap between adjacent primitives in Path and Loop collections.  
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters  
reverseInPlace(): void Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction.  
sumLengths(): number Return the sum of the lengths of all contained curves.  
tryAddChild(child: AnyCurve): boolean Abstract Try to add a child.  
tryTransformInPlace(transform: Transform): boolean Apply transform recursively to children  
createCurveLocationDetailOnAnyCurvePrimitive(source: GeometryQuery, fraction: number0.5): undefined | CurveLocationDetail Static Find any CurvePrimitive in the source and evaluate it at the given fraction.  

Inherited methods

Name Inherited from Description
dispatchToGeometryHandler(handler: GeometryHandler): any Abstract Inherited GeometryQuery Double Dispatch call pattern.
isAlmostEqual(other: GeometryQuery): boolean Inherited GeometryQuery Test for exact structure and nearly identical geometry.
isSameGeometryClass(other: GeometryQuery): boolean Abstract Inherited GeometryQuery Test if (other instanceof this.Type).
range(transform?: Transform, result?: Range3d): Range3d Inherited GeometryQuery Return the range of the entire GeometryQuery tree.
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean Inherited GeometryQuery Try to move the geometry by dx,dy,dz.
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited GeometryQuery Apply instance method isAlmostEqual if both are defined.

Properties

Name Type Description
children Accessor Abstract ReadOnly AnyCurve[] Return the curve children.  
curveCollectionType Abstract Readonly CurveCollectionType Type discriminator.  
geometryCategory Readonly "curveCollection" String name for schema properties  
isAnyRegionType Accessor ReadOnly boolean Return true for planar region types:  
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.  

Defined in

Last Updated: 21 November, 2024