-
|
Beta Was this translation helpful? Give feedback.
Answered by
CEXT-Dan
Jun 5, 2025
Replies: 1 comment 2 replies
-
You can use Matrix3d.getCoordSystem, then get the scale of the vectors, something like def get_non_uniform_scale(mat: Ge.Matrix3d):
pnt = Ge.Point3d()
x = Ge.Vector3d()
y = Ge.Vector3d()
z = Ge.Vector3d()
mat.getCoordSystem(pnt, x, y, z)
return Ge.Scale3d(x.length(), y.length(), z.length())
@command()
def doit():
mat = Ge.Matrix3d()
mat.setCoordSystem(
Ge.Point3d.kOrigin,
Ge.Vector3d.kXAxis * 10,
Ge.Vector3d.kYAxis * 100,
Ge.Vector3d.kZAxis * 1000,
)
print(get_non_uniform_scale(mat))
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
gswifort
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use Matrix3d.getCoordSystem, then get the scale of the vectors, something like
(10.00000000000000,100.00000000000000,1000.00000000000000)