constructCurveXYOffset MethodStatic

Construct curves that are offset from a Path or Loop

  • The construction will remove "some" local effects of features smaller than the offset distance, but will not detect self intersection among widely separated edges.
  • Offset distance is defined as positive to the left.
  • If offsetDistanceOrOptions is given as a number, default options are applied.
  • When the offset needs to do an "outside" turn, the first applicable construction is applied:
    • If the turn is larger than options.minArcDegrees, a circular arc is constructed.
    • if the turn is larger than options.maxChamferDegrees, the turn is constructed as a sequence of straight lines that are
      • outside the arc
      • have uniform turn angle less than options.maxChamferDegrees
      • each line segment (except first and last) touches the arc at its midpoint.
    • Otherwise the prior and successor curves are extended to simple intersection.

constructCurveXYOffset(curves: Path | Loop, offsetDistanceOrOptions: number | JointOptions): CurveCollection | undefined

Parameter Type Description
curves Path | Loop input curves
offsetDistanceOrOptions number | JointOptions offset controls.

Defined in

Last Updated: 05 June, 2020