Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'develop' into MeshRotation
  • Loading branch information
pshriwise authored Dec 16, 2025
commit da17908a0c5dd8d09740e82071b2592279a29118
14 changes: 7 additions & 7 deletions openmc/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,14 +1043,14 @@ def from_xml_element(cls, elem: ET.Element, **kwargs) -> MeshFilter:

translation = get_elem_list(elem, "translation", float) or []
if translation:
out.translation = [float(x) for x in translation.split()]
rotation = elem.get('rotation')
out.translation = translation

rotation = get_elem_list(elem, 'rotation', float) or []
if rotation:
values = [float(x) for x in rotation.split()]
if len(values) == 3:
out.rotation = [float(x) for x in values]
elif len(values) == 9:
out.rotation = np.array(values).reshape(3, 3)
if len(rotation) == 3:
out.rotation = rotation
elif len(rotation) == 9:
out.rotation = np.array(rotation).reshape(3, 3)
return out


Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.