UnionRegion Class
- A
UnionRegionis a collection of other planar region types --LoopandParityRegion. - 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.
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): Loop | ParityRegion | undefined | Return a child identified by index. | |
| isSameGeometryClass(other: GeometryQuery): boolean | test if other is a UnionRegion |
|
| tryAddChild(child: AnyCurve): boolean | add a child. | |
| create(...data: Array<ParityRegion | Loop>): UnionRegion Static | Create a UnionRegion with given region 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 | undefined | CurveCollection | Return a deep copy. |
| 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. |
| extendRange(rangeToExtend: Range3d, transform?: Transform): void | CurveCollection | Extend (increase) rangeToExtend as needed to include these curves (optionally transformed) |
| isAlmostEqual(other: GeometryQuery): boolean | GeometryQuery | test for exact structure and nearly identical geometry. |
| 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 | |
|---|---|---|---|
| _children Protected | Array<ParityRegion | Loop> | collection of Loop and ParityRegion children. | |
| children Accessor ReadOnly | Array<ParityRegion | Loop> | Return the array of regions | |
| curveCollectionType | "unionRegion" = "unionRegion" | String name for schema properties |
Inherited properties
| Name | Type | Inherited from | Description |
|---|---|---|---|
| geometryCategory | "curveCollection" = "curveCollection" | CurveCollection | String name for schema properties |
| isAnyRegionType Accessor ReadOnly | boolean | CurveCollection | Return true for planar region types:LoopParityRegion* 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