tolerancing.iso10110_bridge#

ISO 10110 Bridge Module

This module converts between the fabrication tolerances of an ISO 10110 drawing specification (optiland.iso10110.DrawingSpec) and the tolerances of a Tolerancing problem.

Field mapping, drawing to tolerance (surface numbers are the optic’s):

  • SurfaceSpec.r_tolerance (mm) to "radius", in lens units (mm). "±a" or a bare number a gives [-a, +a]; "+a/-b" gives [-b, +a]. Flat surfaces are skipped.

  • 3/ A(B/C) (ISO 10110-5): sag_tolerance (A) to "fringes", irregularity (B) to "irregularity" with kind="B" and rotationally_symmetric (C) to "irregularity" with kind="C", each with limits [-v, +v]. The test wavelength is test_wavelength in nm, converted to µm, or 546.07 nm when unset, as the drawn 3/ code states. With form_unit="nm" a value in nm of sag is converted to fringes: one fringe is half the test wavelength of sag. The clear semi-aperture is ca_diameter / 2 when given.

  • 4/ σ'(δ) (ISO 10110-6): the tilt angle σ in arc minutes, the angle of the surface normal to the reference axis, to "surface_tilt" about x and y, converted to degrees (σ / 60). With centering="per_axis" (default) each axis gets [-σ, +σ]; with centering="rss" each axis gets ±σ / √2, so a tilt at both limits has a total angle of σ. The lateral decentration δ in mm goes to "surface_decenter" in x and y, [-δ, +δ] each, in lens units.

  • ElementSpec.ct_tolerance (mm) to "thickness" after the first surface of a singlet, parsed like r_tolerance. With adjust_thickness=True (default) the air space after the element absorbs the change, so later surfaces do not move. Cemented elements are skipped: the drawn tolerance is on the total thickness, not on one component.

The ISO 10110 data model holds no refractive index or Abbe number tolerances (homogeneity classes are not index offsets), so no "index" or "abbe" tolerances are made. Tolerances are added by name through tolerance_registry: a type that is not registered, a flat surface with a radius tolerance, or a cemented element with a thickness tolerance is skipped with a UserWarning, or raises ValueError when strict=True.

Kramer Harrison, 2026

Module Attributes

DEFAULT_TEST_WAVELENGTH_NM

Test wavelength in nm of a fringe value with no stated wavelength.

Functions

drawing_values_from_tolerancing(tolerancing)

Report the ISO 10110 drawing fields implied by the tolerances.

tolerances_from_drawing(tolerancing, drawing, *)

Add the tolerances stated by an ISO 10110 drawing specification.

DEFAULT_TEST_WAVELENGTH_NM = 546.07#

Test wavelength in nm of a fringe value with no stated wavelength.

drawing_values_from_tolerancing(tolerancing: Tolerancing) → dict[str, dict[int, dict[str, float | str]]][source]#

Report the ISO 10110 drawing fields implied by the tolerances.

The inverse of tolerances_from_drawing() for the built-in types. The result holds keyword arguments for DrawingSpec.set_surface under "surfaces" (keyed by surface number) and for DrawingSpec.set_element under "elements" (keyed by element index). Radius and thickness limits are reported as a number when symmetric and as "+a/-b" otherwise. Form, tilt and decenter fields are magnitudes, so asymmetric limits report the larger magnitude. Tilts are read as centering="per_axis": σ is the larger tilt limit in arc minutes. All fringe values of a surface are stated at the test wavelength of its first form tolerance. Other tolerance types, and thickness tolerances that are not on the first surface of a singlet, are not reported. Clear apertures are not reported.

Parameters:

tolerancing – The tolerancing problem.

Returns:

{"surfaces": {...}, "elements": {...}}.

tolerances_from_drawing(tolerancing: Tolerancing, drawing: DrawingSpec, *, distribution: str | Distribution = 'normal', centering: str = 'per_axis', adjust_thickness: bool = True, strict: bool = False) → list[Tolerance][source]#

Add the tolerances stated by an ISO 10110 drawing specification.

See the module docstring for the field mapping and unit conversions. Only surfaces and elements of drawing.elements are read.

Parameters:
  • tolerancing – The tolerancing problem to add to. Its optic must have the same surfaces as the drawing’s optic.

  • drawing – The ISO 10110 drawing specification.

  • distribution – The distribution of every new tolerance.

  • centering – How the 4/ tilt angle σ is split into tilts about x and y: "per_axis" (±σ each) or "rss" (±σ/√2 each).

  • adjust_thickness – Let the air space after an element absorb its thickness change.

  • strict – Raise instead of warning when a field cannot be mapped.

Returns:

The new tolerances, in the order they were added.

Raises:

ValueError – If the optics differ in surface count, centering is unknown, or, with strict=True, a field cannot be mapped. On an error no tolerance is added.