createLoopPathOrBagOfCurves MethodStatic
Create curve collection of subtype determined by gaps between the input curves.
- If (a) wrap is requested and (b) all curves connect head-to-tail (including wraparound), assemble as a
loop. - If all curves connect head-to-tail except for closure, return a
Path. - If there are internal gaps, return a
BagOfCurves - If input array has zero length, return undefined.
createLoopPathOrBagOfCurves(curves: CurvePrimitive[], wrap: boolean = true, consolidateAdjacentPrimitives: boolean = false): undefined | CurveCollection
| Parameter | Type | Description |
|---|---|---|
| curves | CurvePrimitive[] | input curves |
| wrap | boolean | whether to create a Loop (true) or Path (false) if maximum gap is minimal |
| consolidateAdjacentPrimitives | boolean | whether to simplify the result by calling consolidateAdjacentPrimitives |
Returns - undefined | CurveCollection
Defined in
- curve/RegionOps.ts Line 610
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.