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)  
clone(): UnionRegion Return a deep copy.  
cloneEmptyPeer(): UnionRegion Return new empty UnionRegion  
cloneStroked(options?: StrokeOptions): UnionRegion Return structural clone with stroked primitives.  
cloneTransformed(transform: Transform): UnionRegion Create a deep copy of transformed curves.  
cloneWithExpandedLineStrings(): UnionRegion Create a deep copy with all linestrings broken down into multiple LineSegment3d.  
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): ParityRegion | Loop | undefined 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: ParityRegion | Loop[]): UnionRegion Static Create a UnionRegion by capturing the given regions as children.  

Inherited methods

Name Inherited from Description
allTangents(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail[] | undefined Inherited CurveCollection Return all points P on the contained curves such that the line containing spacePoint and P is tangent to the
checkForNonLinearPrimitives(): boolean Inherited CurveCollection Return true if the curve collection has any primitives other than LineSegment3d and LineString3d
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail): CurveLocationDetail | undefined Inherited CurveCollection Return the closest point on the contained curves.
closestPointXY(spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail): CurveLocationDetail | undefined Inherited CurveCollection Return the closest point on the contained curves as viewed in the xy-plane (ignoring z).
closestTangent(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail | undefined Inherited CurveCollection Return the point P on the contained curves such that the line containing spacePoint and P is tangent to the
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false): CurvePrimitive[] Inherited CurveCollection Return an array containing all CurvePrimitives in the instance.
emitTangents(spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions): void Inherited CurveCollection Announce all points P on the contained curves such that the line containing spacePoint and P is tangent to
extendRange(rangeToExtend: Range3d, transform?: Transform): void Inherited CurveCollection Extend (increase) the given range as needed to encompass all curves in the curve collection.
findParentOfDescendant(descendant: AnyCurve): CurveCollection | undefined Inherited CurveCollection Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant.
isAlmostEqual(other: GeometryQuery): boolean Inherited CurveCollection Test for exact structure and nearly identical geometry.
isAnyRegion(): this is AnyRegion Inherited CurveCollection Type guard for AnyRegion
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean Inherited CurveCollection Ask if the curves of the collection are within tolerance of the input plane.
isLoop(): this is Loop Inherited CurveCollection Type guard for Loop.
isPath(): this is Path Inherited CurveCollection Type guard for Path.
maxGap(): number Inherited CurveCollection Return the max gap between adjacent primitives in Path and Loop collections.
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined 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.
reverse(): this Inherited CurveCollection Call reverseInPlace and return the instance.
reverseInPlace(): void Inherited CurveCollection Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction.
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: number = 0.0, dz: number = 0.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.
computeScaledTolerance(geom: GeometryQuery | GeometryQuery[], options?: ScaledToleranceOptions): number Static Inherited CurveCollection Compute a distance tolerance appropriate for comparing the coordinates of geom.
createCurveLocationDetailOnAnyCurvePrimitive(source: GeometryQuery, fraction: number = 0.5): CurveLocationDetail | undefined Static Inherited CurveCollection Find any CurvePrimitive in the source and evaluate it at the given fraction.
scaleToleranceForGeometry(geom: GeometryQuery | GeometryQuery[], distanceTolerance: number, options?: ScaledToleranceOptions): number Static Inherited CurveCollection Scale the given distance tolerance as appropriate for comparing the coordinates of geom.

Properties

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

Inherited properties

Name Type Inherited from Description
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.
isOpenPath Accessor Inherited ReadOnly boolean CurveCollection Return true for a Path, i.e. a chain of curves joined head-to-tail.
* This is NOT a test for (lack of) physical closure.

Defined in

Last Updated: 24 September, 2026