surfaces.converters

Converters

This module contains classes that convert between different surface types.

Kramer Harrison, 2024

Functions

convert_to_thick_lens(lens)

Converts all paraxial surfaces in a lens into thick lenses

Classes

ParaxialToThickLensConverter(...[, ...])

Converts a ParaxialSurface into an equivalent thick lens composed of two real surfaces.

class ParaxialToThickLensConverter(paraxial_surface: Surface, optic: Optic, material: str | float | BaseMaterial = 'N-BK7', center_thickness: float = 3.0)[source]

Converts a ParaxialSurface into an equivalent thick lens composed of two real surfaces.

Parameters:
  • paraxial_surface – The ParaxialSurface to convert.

  • optic – The parent Optic instance containing the paraxial surface.

  • material – The lens material. Can be: - A string (e.g., “N-BK7”, resolved via Material lookup). - A float (refractive index, creates an IdealMaterial). - A BaseMaterial instance.

  • center_thickness – The desired center thickness of the thick lens.

convert()[source]

Performs the conversion from paraxial to thick lens.

This method will: 1. Calculate the front and back radii of the thick lens. 2. Remove the original paraxial surface from the optic. 3. Create and add two new surfaces to the optic.

convert_to_thick_lens(lens: Optic)[source]

Converts all paraxial surfaces in a lens into thick lenses

Parameters:

lens (Optic) – the lens to be converted

Returns:

the converted lens

Return type:

Optic