ComponentGroup#

class ComponentGroup(origin, **kwargs)[source]#

Bases: OpticalComponent

__init__(origin, **kwargs)[source]#

Initialize a component at a lab-frame origin.

Parameters:
  • origin – Component origin in lab coordinates.

  • **kwargs – Optional display metadata such as name, label, render_obj, and render_comp_vec.

property bbox#

Return cached axis-aligned bounding box in lab coordinates.

property bboxes#
get_bboxes() List[tuple][source]#
get_bbox() tuple[source]#

Compute axis-aligned bounding box in lab frame.

Returns:

Tuple (xmin, xmax, ymin, ymax, zmin, zmax) in lab coordinates.

render(ax, type: str, **kwargs)[source]#

Render the component boundary in 2D ("Z") or 3D ("3D").

interact(ray: Ray) Tuple[float, List[Ray]] | Tuple[None, None][source]#

Apply component interaction in local frame and return lab-frame rays.

Parameters:

ray – Input ray in lab coordinates.

Returns:

Tuple (t, rays) where t is the hit distance and rays contains the truncated incoming segment plus newly generated outgoing rays in lab coordinates. Returns (None, None) when no interaction occurs.

add_rays(rays)[source]#
add_component(component)[source]#
add_components(components)[source]#
add_monitor(monitor)[source]#
add_monitors(monitors)[source]#
add_refpoint(point)[source]#