solves.thickness#

Thickness Solve Module

This module defines ThicknessSolve, an abstract base class for solves that adjust surface positions to satisfy a condition.

Kramer Harrison, 2026

Classes

ChiefRayHeightThicknessSolve(optic, ...)

Solves for a target chief ray height on a specific surface.

MarginalRayHeightThicknessSolve(optic, ...)

Solves for a target marginal ray height on a specific surface.

ThicknessSolve(optic, surface_idx, height)

Abstract base class for thickness solves.

class ChiefRayHeightThicknessSolve(optic, surface_idx: int, height: float)[source]#

Solves for a target chief ray height on a specific surface.

apply()#

Applies the thickness solve to the optic.

This method calculates the necessary shift in z-position for the target surface and all subsequent surfaces to achieve the desired ray height.

Raises:

UnsupportedParaxialGeometryError – If the system’s unfolded axial coordinate is not global z (folded or off-axis-entered systems), before any surface is mutated – the computed offset is an unfolded axial distance and writing it into cs.z would move surfaces off their physical legs.

classmethod from_dict(optic, data)#

Creates a solve instance from a dictionary representation.

to_dict()#

Returns a dictionary representation of the solve.

class MarginalRayHeightThicknessSolve(optic, surface_idx: int, height: float)[source]#

Solves for a target marginal ray height on a specific surface.

apply()#

Applies the thickness solve to the optic.

This method calculates the necessary shift in z-position for the target surface and all subsequent surfaces to achieve the desired ray height.

Raises:

UnsupportedParaxialGeometryError – If the system’s unfolded axial coordinate is not global z (folded or off-axis-entered systems), before any surface is mutated – the computed offset is an unfolded axial distance and writing it into cs.z would move surfaces off their physical legs.

classmethod from_dict(optic, data)#

Creates a solve instance from a dictionary representation.

to_dict()#

Returns a dictionary representation of the solve.

class ThicknessSolve(optic, surface_idx: int, height: float)[source]#

Abstract base class for thickness solves.

This class provides the common structure for solves that aim to achieve a specific ray height at a given surface by adjusting the z-position of that surface and subsequent surfaces.

Variables:
  • optic (Optic) – The optic object.

  • surface_idx (int) – The index of the surface where the ray height is to be controlled.

  • height (float) – The target height of the ray on the specified surface.

apply()[source]#

Applies the thickness solve to the optic.

This method calculates the necessary shift in z-position for the target surface and all subsequent surfaces to achieve the desired ray height.

Raises:

UnsupportedParaxialGeometryError – If the system’s unfolded axial coordinate is not global z (folded or off-axis-entered systems), before any surface is mutated – the computed offset is an unfolded axial distance and writing it into cs.z would move surfaces off their physical legs.

classmethod from_dict(optic, data)[source]#

Creates a solve instance from a dictionary representation.

to_dict()[source]#

Returns a dictionary representation of the solve.