collectChains MethodStatic
Restructure curve fragments as Paths and Loops.
- Chain formation is dependent upon input fragment order, as a greedy algorithm is employed.
collectChains(fragments: AnyCurve[], gapTolerance: numberGeometry.smallMetricDistance, planeTolerance?: number): undefined | AnyChain
@returns chains, possibly wrapped in a BagOfCurves.
Parameter | Type | Description |
---|---|---|
fragments | AnyCurve[] | fragments to be chained |
gapTolerance | number | distance to be treated as "effectively zero" when assembling fragments head-to-tail |
planeTolerance | number | tolerance for considering a closed chain to be planar. If undefined, only create Path. If defined, create Loops for closed chains within tolerance of a plane. |
Returns - undefined | AnyChain
chains, possibly wrapped in a BagOfCurves.
Defined in
- curve/CurveOps.ts Line 133
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.