Selector: add rotation_x/y/z value keys #6262

Expose the Euler rotation of an element's placement in degrees through
get_element_value, alongside the existing x/y/z and easting/northing/
elevation keys. This makes element rotation exportable through ifccsv,
e.g. for placing oriented symbols in GIS.

Adopts the approach agreed in the review of the stale PR #6272 by
@TZwielehner: reuse util.shape_builder.np_matrix_to_euler and do the
degree conversion inside get_element_value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit d4805387ef)
This commit is contained in:
Petru Conduraru
2026-07-05 20:25:05 +03:00
committed by Dion Moult
parent 21b5fa6b15
commit 6d0809c703
3 changed files with 29 additions and 2 deletions
@@ -222,6 +222,9 @@ Valid keys are:
"``easting``", "Gets the map easting of the element's placement"
"``northing``", "Gets the map northing of the element's placement"
"``elevation``", "Gets the map elevation of the element's placement"
"``rotation_x``", "Gets the X Euler rotation of the element's placement in degrees"
"``rotation_y``", "Gets the Y Euler rotation of the element's placement in degrees"
"``rotation_z``", "Gets the Z Euler rotation of the element's placement in degrees (e.g. plan rotation of a symbol)"
"``count``", "If the previous key returns multiple things, count that list. Otherwise, return 1."
"``{{number}}``", "If the previous key returns multiple things, fetch the ``{{number}}`` index (e.g. 0, 1, 2, 3, etc) item in that list."