collectInsideAndOutsideXYOffsets MethodStatic
Restructure curve fragments as Paths and Loops, and construct xy-offsets of the chains.
- If the inputs do not form Loop(s), the classification of offsets is suspect.
- For best offset results, the inputs should be parallel to the xy-plane.
- Chain formation is dependent upon input fragment order, as a greedy algorithm is employed.
collectInsideAndOutsideXYOffsets(fragments: AnyCurve[], offsetDistance: number, gapTolerance: number): { chains?: AnyChain, insideOffsets: AnyCurve[], outsideOffsets: AnyCurve[] }
@returns object with named chains, insideOffsets, outsideOffsets
| Parameter | Type | Description | 
|---|---|---|
| fragments | AnyCurve[] | fragments to be chained and offset | 
| offsetDistance | number | offset distance, applied to both sides of each fragment to produce inside and outside xy-offset curves. | 
| gapTolerance | number | distance to be treated as "effectively zero" when joining head-to-tail | 
Returns - { chains?: AnyChain, insideOffsets: AnyCurve[], outsideOffsets: AnyCurve[] }
object with named chains, insideOffsets, outsideOffsets
Defined in
- curve/CurveOps.ts Line 115
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.