collectInsideAndOutsideOffsets 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.

collectInsideAndOutsideOffsets(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 assembling fragments head-to-tail

Returns - { chains?: AnyChain, insideOffsets: AnyCurve[], outsideOffsets: AnyCurve[] }

object with named chains, insideOffsets, outsideOffsets

Defined in

Last Updated: 16 April, 2024