gcode预览测试

This commit is contained in:
2026-05-14 20:21:16 +08:00
parent 65f221a5d8
commit 837996c436
17 changed files with 1363 additions and 296 deletions

15
refer/test_qmat.py Normal file
View File

@@ -0,0 +1,15 @@
from PyQt6.QtGui import QMatrix4x4
import numpy as np
mat = QMatrix4x4()
mat.translate(0.0, 0.0, -250.0)
mat.rotate(30.0, 1.0, 0.0, 0.0)
mat.rotate(45.0, 0.0, 0.0, 1.0)
# If QMatrix4x4 passes list to uniformMatrix4fv, does it need column-major or row-major?
# When I used numpy: ``mvp.flatten().tolist()`` -> it gave row-major. And it WORKED.
# Let's check QMatrix4x4 data.
data = mat.data()
print("QMatrix4x4 data (length %d):" % len(data))
print(data)