iso10110.drawing#
ISO 10110 Element Drawing Generator
Rendering architecture#
Two isolated renderer classes handle format-specific output, sharing layout
logic via _BaseRenderer:
_MatplotlibRenderer— PDF/PNG._DxfRenderer— DXF via ezdxf.
ElementDrawing is a thin public coordinator that delegates to
whichever renderer save_pdf / save_dxf / save_png / show
require. Neither renderer class is part of the public API.
Paper / orientation#
paper : “A5”,”A4”,”A3”,”A2”,”A1”,”LETTER”,”LEGAL”,”TABLOID”
orientation : “portrait” (default) | “landscape”
Bernhard Lutzer, 2026
Functions
|
Build and generate an |
|
Render a DXF file to PNG using ezdxf with a white background. |
Classes
|
ISO 10110 fabrication drawing for one lens element. |
- class ElementDrawing(element, spec, element_index: int = 0, paper: str = 'A4', orientation: str = 'portrait', total_sheets: int = 1, rotational_axis_y: float = 0.0, style: DrawingStyle | None = None)[source]#
ISO 10110 fabrication drawing for one lens element.
Delegates all rendering to
_MatplotlibRenderer(PDF/PNG) and_DxfRenderer(DXF). Rendering logic is fully isolated in those classes; this class handles only file-I/O and public API.- Parameters:
element –
LensElementspec –
DrawingSpecelement_index – 0-based element number.
paper – Paper size string (default
"A4").orientation –
"portrait"(default) or"landscape".total_sheets – Total sheet count for X/Y numbering.
rotational_axis_y – y-offset (optical mm) of the rotational axis when it differs from the optical axis. Default
0.0= coincident.style –
DrawingStylefont-size scale factors and border margin. Defaults toDrawingStyle(), reproducing the built-in appearance exactly.
- draw_element(element, spec, element_index: int = 0, paper: str = 'A4', orientation: str = 'portrait', style: DrawingStyle | None = None) ElementDrawing[source]#
Build and generate an
ElementDrawingfor element in one call.