set_parametric#

ClosedCurveCubicSegment.set_parametric(num_added_vertices: int, movement: str)#

Make this segment parametric for optimization.

Parameters:
num_added_verticesint

Number of intermediate vertices to add (not including start/end vertices).

movementstr

Type of movement allowed (‘x-axis’, ‘y-axis’, ‘both’).

Raises:
NotImplementedError

Always. Direct segment-level parametrization is not currently wired up to ClosedCurve.discretize_polygon – the polygon-build loop always passes params=None to segment.evaluate(). Use Parametrize(segment_index=...) (or ClosedCurve._make_segment_parametric) instead. These APIs split the segment into sub-segments with intermediate vertices and parametrize the vertex positions, which _get_current_vertices correctly threads through.