tolerancing.types.surface#

Surface Tolerance Types Module

This module contains the tolerance types that act on a single surface: radius, power in fringes, conic constant, thickness, and surface decenter and tilt.

Kramer Harrison, 2026

Classes

ConicTolerance(optic, surface_number, **kwargs)

Deviation of the conic constant.

FringesTolerance(optic, surface_number[, ...])

Power deviation in fringes, applied as a change of radius.

RadiusTolerance(optic, surface_number)

Deviation of the radius of curvature, in lens units.

SurfaceDecenterTolerance(optic, ...)

Decenter of one surface along axis ("x" or "y"), in lens units.

SurfaceTiltTolerance(optic, surface_number, axis)

Tilt of one surface about its own vertex, around axis ("x" or "y"), in degrees.

ThicknessTolerance(optic, surface_number[, ...])

Deviation of the thickness after a surface, in lens units.

VariableTolerance(optic, surface_number, ...)

Tolerance that adds a scaled deviation to an optimization variable.

class ConicTolerance(optic: Optic, surface_number: int, **kwargs)[source]#

Deviation of the conic constant.

apply(delta: float) → None#

Set the variable to nominal plus the scaled deviation.

property label: str#

Return a short, human-readable name.

name: str = 'Conic'#
phase: Phase = 0#
reset() → None#

Restore the nominal value.

scale: float = 1.0#
units: str = ''#
variable_type: str = 'conic'#
class FringesTolerance(optic: Optic, surface_number: int, test_wavelength: float = 0.6328, semi_aperture: float | None = None)[source]#

Power deviation in fringes, applied as a change of radius.

One fringe is half a test wavelength of sag difference at the edge of the clear aperture. A positive deviation increases the magnitude of the sag (a more strongly curved surface); on a flat surface it gives a positive radius. The conversion is exact for conic surfaces: c = 2 s / (h**2 + (1 + k) s**2) for sag s at height h.

Parameters:
  • optic – The optic the tolerance applies to.

  • surface_number – The surface index.

  • test_wavelength – The test wavelength in µm. Defaults to 0.6328.

  • semi_aperture – The clear semi-aperture in lens units. Defaults to the surface’s semi-aperture, or the paraxial marginal plus chief ray heights when none is set.

apply(delta: float) → None[source]#

Set the radius for a power deviation of delta fringes.

property label: str#

Return a short, human-readable name.

phase: Phase = 0#
radius_for(fringes: float) → float[source]#

Return the radius that corresponds to a power deviation.

Parameters:

fringes – The signed deviation in fringes.

Returns:

The perturbed radius, inf for a flat surface.

reset() → None[source]#

Restore the nominal radius.

units: str = 'fringes'#
class RadiusTolerance(optic: Optic, surface_number: int)[source]#

Deviation of the radius of curvature, in lens units.

Raises:

ValueError – If the surface is flat. Use "fringes" instead.

apply(delta: float) → None#

Set the variable to nominal plus the scaled deviation.

property label: str#

Return a short, human-readable name.

name: str = 'Radius'#
phase: Phase = 0#
reset() → None#

Restore the nominal value.

scale: float = 1.0#
units: str = 'lens units'#
variable_type: str = 'radius'#
class SurfaceDecenterTolerance(optic: Optic, surface_number: int, axis: str)[source]#

Decenter of one surface along axis (“x” or “y”), in lens units.

apply(delta: float) → None#

Set the variable to nominal plus the scaled deviation.

property label: str#

Return a short, human-readable name.

name: str = ''#
phase: Phase = 3#
reset() → None#

Restore the nominal value.

scale: float = 1.0#
units: str = 'lens units'#
variable_type: str = 'decenter'#
class SurfaceTiltTolerance(optic: Optic, surface_number: int, axis: str)[source]#

Tilt of one surface about its own vertex, around axis (“x” or “y”), in degrees.

apply(delta: float) → None#

Set the variable to nominal plus the scaled deviation.

property label: str#

Return a short, human-readable name.

name: str = ''#
phase: Phase = 3#
reset() → None#

Restore the nominal value.

scale: float = 0.017453292519943295#
units: str = 'degrees'#
variable_type: str = 'tilt'#
class ThicknessTolerance(optic: Optic, surface_number: int, adjust: int | None = None)[source]#

Deviation of the thickness after a surface, in lens units.

Parameters:
  • optic – The optic the tolerance applies to.

  • surface_number – The surface whose following thickness changes.

  • adjust – Optional surface whose following thickness absorbs the opposite deviation, so that surfaces after it do not move.

apply(delta: float) → None[source]#

Change the thickness, and the adjust thickness by the opposite amount.

property label: str#

Return a short, human-readable name.

phase: Phase = 0#
reset() → None[source]#

Restore both thicknesses.

units: str = 'lens units'#
class VariableTolerance(optic: Optic, surface_number: int, **kwargs)[source]#

Tolerance that adds a scaled deviation to an optimization variable.

Parameters:
  • optic – The optic the tolerance applies to.

  • surface_number – The surface index.

  • **kwargs – Extra arguments for the variable, such as axis.

Variables:
  • variable_type (str) – The optimization variable type that is perturbed.

  • scale (float) – Factor from deviation units to variable units.

apply(delta: float) → None[source]#

Set the variable to nominal plus the scaled deviation.

property label: str#

Return a short, human-readable name.

name: str = ''#
phase: Phase = 0#
reset() → None[source]#

Restore the nominal value.

scale: float = 1.0#
units: str = ''#
variable_type: str = ''#