prescription.prescription
Prescription orchestrator.
Kramer Harrison, 2026
Classes
|
Generates an optical prescription report from an Optic instance. |
- class Prescription(optic: Optic, sections: list[BaseSection] | None = None)[source]
Generates an optical prescription report from an Optic instance.
- Parameters:
optic – The optical system to describe.
sections – Optional list of section instances. Defaults to the standard five-section set when None.
- Raises:
NotImplementedError – If a MultiConfiguration object is passed.
- build() Document[source]
Build and return the Document model without rendering.
- Returns:
Populated Document ready for a renderer to consume.
- save(path: str | os.PathLike, renderer: BaseRenderer | None = None) None[source]
Save the prescription to a file.
- Parameters:
path – Output file path. Extension determines the renderer when renderer is None:
.pdf→ PDFRenderer, anything else → PlainTextRenderer.renderer – Explicit renderer instance. Overrides extension inference.