collectCurvePrimitives MethodStatic

collect all CurvePrimitives in loosely typed input.

  • This (always) recurses into primitives within collections (Path, Loop, ParityRegion, UnionRegion)
  • It (optionally) recurses to hidden primitives within primitives (i.e. CurveChainWithDistanceIndex)
  • If collectorArray is given, it is NOT cleared -- primitives are appended.

collectCurvePrimitives(candidates: AnyCurve | AnyCurve[], collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[]

Parameter Type Description
candidates AnyCurve | AnyCurve[] array of various CurvePrimitive and CurveCollection
collectorArray CurvePrimitive[]  
smallestPossiblePrimitives boolean if false, leave CurveChainWithDistanceIndex as single primitives. If true, recurse to their children.
explodeLinestrings boolean  

Returns - CurvePrimitive[]

Defined in

Last Updated: 30 November, 2023