make_vertex_parametric#

ClosedCurve.make_vertex_parametric(vertex: int, movement: str = 'both', bounds: List[Tuple[float, float]] | None = None)#

Make a vertex parametric for optimization.

Parameters:
vertexint

1-based vertex index.

movementstr, optional

Movement type. Options: ‘both’: Move in both x and y (2 parameters) [DEFAULT], ‘x-axis’: Move only along x-axis (1 parameter), ‘y-axis’: Move only along y-axis (1 parameter), ‘normal’: Move along the normal direction (1 parameter) (default: ‘both’).

boundsOptional[List[Tuple[float, float]]], optional

List of bounds tuples for this vertex’s parameters. Length must match number of parameters for the movement type (default: None).

Raises:
ValueError

If vertex index is invalid or bounds length is wrong.