You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
.origin property changes without any rotation/translation when difference() is applied.
However, if I assign an identity matrix explicitly as a separate handle, it performs the expected behavior (that is, the handle stays as identity matrix when no rotation/translation is applied to the solid).
To Reproduce
Run the following code and observe the stdout prints.
fromopenscadimport*importcopy# Clone a identity matrix constant.IDENT=copy.deepcopy(cube(1).origin)
c=cube([3, 3, 3])
# This is identity matrix.print(f"{c.origin=}")
c.artificial_origin=IDENT# This is also an identity matrixprint(f"{c.artificial_origin=}")
# Engraving + align it to a face on X-Z plane.txt=text('oops', halign='center', valign='center', size=0.5).linear_extrude(1).rotx(90).up(1).right(2)
# Apply the engravingc-=txt# c.origin is no longer the identity matrix.print(f"Unexpected behavior. No longer same as identity matrix {c.origin=}")
print(f"Expected behavior. Still the same as identity matrix {c.artificial_origin=}")
res= [c]
show(res)
Expected behavior
I would expect c.origin to behave exactly the same as c.artificial_origin. The only operation applied to the solid was difference(), which should not change the 4x4 matrix.
Code reproducing the issue
See above.
Screenshots
Environment and Version info (please complete the following information):
OS: Windows 10
System: Intel PC 64-bit
OpenSCAD Version: OpenSCAD 2025.01.02, from pythonscad.org
Describe the bug
.origin property changes without any rotation/translation when difference() is applied.
However, if I assign an identity matrix explicitly as a separate handle, it performs the expected behavior (that is, the handle stays as identity matrix when no rotation/translation is applied to the solid).
To Reproduce
Run the following code and observe the stdout prints.
stdout:
Expected behavior
I would expect c.origin to behave exactly the same as c.artificial_origin. The only operation applied to the solid was difference(), which should not change the 4x4 matrix.
Code reproducing the issue
See above.
Screenshots
Environment and Version info (please complete the following information):
Library & Graphics card information
The text was updated successfully, but these errors were encountered: