pycba.units#
PyCBA - Display unit systems.
PyCBA’s solver is unit-agnostic: it performs no unit conversions, so any internally consistent set of units (e.g. kN/m/kNm, or N/mm/Nmm) may be used as long as all inputs share the same system. This module does not change that contract - it only governs how plots are labelled and how deflections are scaled for display.
A UnitSystem is a small, immutable bundle of label strings (force,
length, moment, distributed load) plus a deflection display scale/label. Pick
one of the named presets ("SI", "SI-N-mm", "US-ft", "US-in",
"none"), set it globally with set_units(), or pass units= to any
plotting method to override it for a single figure. Build a custom
UnitSystem for anything else.
The default is SI with kN and m ("SI"), matching PyCBA’s historical plot
labels, so existing scripts and figures are unchanged.
Functions
Return the current global default display unit system. |
|
Resolve a units argument to a |
|
Set the global default display unit system used by plots. |
Classes
A display unit system: axis-label units and the deflection display scale. |