Skip to content

Commit f27883d

Browse files
Avoid updating of the original loc
1 parent 50832f1 commit f27883d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cadquery/occ_impl/exporters/assembly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ def exportGLTF(
164164

165165
# map from CadQuery's right-handed +Z up coordinate system to glTF's right-handed +Y up coordinate system
166166
# https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#coordinate-system-and-units
167-
coordinate_system_relation = Location((0, 0, 0), (1, 0, 0), -90)
168-
assy.loc *= coordinate_system_relation
167+
orig_loc = assy.loc
168+
assy.loc *= Location((0, 0, 0), (1, 0, 0), -90)
169169

170170
# mesh all the shapes
171171
for _, el in assy.traverse():
@@ -180,6 +180,6 @@ def exportGLTF(
180180
)
181181

182182
# restore coordinate system after exporting
183-
assy.loc *= coordinate_system_relation.inverse
183+
assy.loc = orig_loc
184184

185185
return result

0 commit comments

Comments
 (0)