forked from 1b-agent/opencadstudio-upstream
acadrust's DXF reader does not parse group code 53 (text rotation), so DimensionBase.text_rotation is always zero for DXF-loaded files. Fall back to the natural axis-aligned rotation computed from geometry: Linear dimensions use d.rotation (radians), Aligned dimensions use atan2 of the second-first vector. Normalize to (-π/2, π/2] so text never appears upside-down. Explicit non-zero overrides stored by the DWG reader are preserved. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>