computeAndAttachRecursiveStrokeCounts Method

attach StrokeCountMap structure to this primitive (and recursively to any children)

  • Base class implementation (here) gets the simple count from computeStrokeCountForOptions and attaches it.
  • LineString3d, arc3d, BezierCurve3d, BezierCurve3dH accept that default.
  • Subdivided primitives (linestring, bspline curve) implement themselves and attach a StrokeCountMap containing the
    total count, and also containing an array of StrokeCountMap per component.
  • For CurvePrimitiveWithDistanceIndex, the top level gets (only) a total count, and each child gets
    its own StrokeCountMap with appropriate structure.

computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void

Parameter Type Description
options StrokeOptions StrokeOptions that determine count
parentMap StrokeCountMap  

Returns - sum of a0+this.curveLength(), for use as a0 of successor in chain.

Defined in

Last Updated: 20 September, 2019