Divide Target Length by Segment

Divides a curve by a target length, but respects kinks/discontinuities by dividing each structural segment independently.

Utilities Nickname: DivTrgtSeg

Overview

Divides a curve by a target length, but respects kinks/discontinuities by dividing each structural segment independently.

Inputs (2)

  • Curves (Curve): Curves to divide
  • Target Length (Number): Target length for subdivisions

Outputs (3)

  • Points (Point): Division points (without duplicates at kinks)
  • SubCurves (Curve): Divided sub-curves
  • Lengths (Number): Actual length of each sub-curve

Method, assumptions and simplifications

The same notes appear in the component's Info output.

Method

  1. Each curve is split into its segments with DuplicateSegments (polycurve segments, polyline edges), and every segment is further split at its interior kinks (G1 discontinuities); otherwise the whole curve is one segment.
  2. Each segment is divided into n = round(length / Target Length) equal-length parts, at least 1, so parts are between about 0.67 and 1.5 × Target Length for short segments and closer to it for long ones.
  3. Outputs per curve (one branch per input curve): division points without repeats at segment joints, the sub-curves and their lengths.

Assumptions

  • Segments join end to start; Target Length is in model units and greater than 0.001.

Simplifications and limits

  • Parts are equal within a segment but differ between segments. On a closed curve the last point repeats the first.