tolerancing.base#

Base Perturbation Module

This module defines the interface shared by everything a tolerancing analysis can apply to an optic: the low-level Perturbation (absolute values of an optimization variable) and the Tolerance (signed deviations from nominal within limits). Analyses depend on this interface only.

Kramer Harrison, 2026

Classes

BasePerturbation()

Interface for a change that a tolerancing analysis applies to an optic.

Phase(*values)

Order in which perturbations are applied within one trial.

class BasePerturbation[source]#

Interface for a change that a tolerancing analysis applies to an optic.

Variables:
  • phase (tolerancing.base.Phase) – The phase in which the perturbation is applied.

  • value (float | None) – The value applied by the last call to apply, or the nominal value after reset.

abstractmethod apply() → None[source]#

Draw a value and apply it to the optic.

abstract property label: str#

Return a short, human-readable name used in result tables.

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

Restore the optic to its nominal state for this perturbation.

value: float | None = None#
class Phase(*values)[source]#

Order in which perturbations are applied within one trial.

Perturbations are applied phase by phase, and in insertion order within a phase. Structural changes (radius, thickness) come first because a thickness change rebuilds downstream surface positions; rigid-body moves (decenters and tilts) come last so they are not overwritten.

FORM = 2#
MATERIAL = 1#
RIGID_BODY = 3#
STRUCTURE = 0#