ClosedCurveLinearSegment#

class lumopt2.parametrization.closed_curve.ClosedCurveLinearSegment(start_vertex_idx: int, end_vertex_idx: int, n_vertices_lumerical_polygon: int = 50)#

A linear segment connecting two vertices

Initialize this class the same way as its parent class. Documentation to the parent class is below.

Base class for segments in a composite Bezier geometry.

Parameters:
start_vertex_idxint

Index of the starting vertex (1-based).

end_vertex_idxint

Index of the ending vertex (1-based).

n_vertices_lumerical_polygonint, optional

Number of discrete points to represent this segment in Lumerical (default: 50).

Methods

ClosedCurveLinearSegment.evaluate(vertices, ...)

Evaluate linear segment (possibly subdivided with control points).

ClosedCurveLinearSegment.get_control_points(...)

Get the control point positions for visualization.

ClosedCurveLinearSegment.get_num_params()

Get number of optimization parameters for this segment.

ClosedCurveLinearSegment.set_parametric(...)

Make this segment parametric for optimization.