UnionRegion Class

  • A UnionRegion is a collection of other planar region types -- Loop and ParityRegion.
  • The composite is the union of the contained regions.
  • A point is "in" the composite if it is "in" one or more of the contained regions.

@see Curve Collections learning article.

Extends

Methods

Name Description
constructor(): UnionRegion Constructor -- initialize with no children  
announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number-1): void Dispatch to more strongly typed processor.announceUnionRegion(this, indexInParent)  
cloneEmptyPeer(): UnionRegion Return new empty UnionRegion  
cloneStroked(options?: StrokeOptions): UnionRegion Return structural clone with stroked primitives.  
dgnBoundaryType(): number Return the boundary type (5) of a corresponding MicroStation CurveVector  
dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleUnionRegion(this)  
getChild(i: number): undefined | Loop | ParityRegion Return a child identified by index.  
isSameGeometryClass(other: GeometryQuery): boolean Test if other is a UnionRegion  
tryAddChild(child: AnyCurve): boolean Try to add a child (by capturing it).  
create(...data: Loop | ParityRegion[]): UnionRegion Static Create a UnionRegion by capturing the given regions as children.  

Inherited methods

Name Inherited from Description
checkForNonLinearPrimitives(): boolean CurveCollection Return true if the curve collection has any primitives other than LineSegment3d and LineString3d
clone(): CurveCollection CurveCollection Return a deep copy.
cloneTransformed(transform: Transform): undefined | CurveCollection CurveCollection Create a deep copy of transformed curves.
cloneWithExpandedLineStrings(): CurveCollection CurveCollection Create a deep copy with all linestrings broken down into multiple LineSegment3d.
closestPoint(spacePoint: Point3d): undefined | CurveLocationDetail CurveCollection Return the closest point on the contained curves
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: booleanfalse, explodeLineStrings: booleanfalse): CurvePrimitive[] CurveCollection Return an array containing all CurvePrimitives in the instance.
extendRange(rangeToExtend: Range3d, transform?: Transform): void CurveCollection Extend (increase) the given range as needed to encompass all curves in the curve collection.
isAlmostEqual(other: GeometryQuery): boolean CurveCollection Test for exact structure and nearly identical geometry.
isAnyRegion(): this is AnyRegion CurveCollection Type guard for AnyRegion
isLoop(): this is Loop CurveCollection Type guard for Loop
isPath(): this is Path CurveCollection Type guard for Path
maxGap(): number CurveCollection Return the max gap between adjacent primitives in Path and Loop collections.
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d CurveCollection Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters
range(transform?: Transform, result?: Range3d): Range3d CurveCollection Return the range of the entire GeometryQuery tree.
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: number0.0, dz: number0.0): boolean CurveCollection Try to move the geometry by dx,dy,dz.
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static CurveCollection Apply instance method isAlmostEqual if both are defined.
createCurveLocationDetailOnAnyCurvePrimitive(source: GeometryQuery, fraction: number0.5): undefined | CurveLocationDetail Static CurveCollection Find any CurvePrimitive in the source and evaluate it at the given fraction.

Properties

Name Type Description
_children Protected Loop | ParityRegion[] Collection of Loop and ParityRegion children.  
children Accessor ReadOnly Loop | ParityRegion[] Return the array of regions  
curveCollectionType Readonly "unionRegion" String name for schema properties  

Inherited properties

Name Type Inherited from Description
geometryCategory Readonly "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: 28 October, 2024