simplifyRegionType MethodStatic
Simplify the type of the region by stripping redundant parent(s).
- No Boolean operations are performed.
- Invalid inputs (such as childless regions) are not corrected.
simplifyRegionType(region: AnyRegion): AnyRegion
@returns * For a UnionRegion with exactly one child, return it if it is a Loop,
or if it is a ParityRegion with multiple children, otherwise return the ParityRegion
's Loop
.
- For a
ParityRegion
with exactly oneLoop
, return it. - All other inputs returned unchanged.
Parameter | Type | Description |
---|---|---|
region | AnyRegion | region to simplify |
Returns - AnyRegion
- For a UnionRegion with exactly one child, return it if it is a Loop,
or if it is a ParityRegion with multiple children, otherwise return the
ParityRegion
'sLoop
. - For a
ParityRegion
with exactly oneLoop
, return it. - All other inputs returned unchanged.
Defined in
- curve/RegionOps.ts Line 337
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.