trimesh icon indicating copy to clipboard operation
trimesh copied to clipboard

Coordinate systems problem

Open CCCCTX opened this issue 2 years ago • 2 comments

I exported a model file from Blender and want to further process it using Trimesh, but I found that the coordinate systems of the two are different. Is there any way to solve this problem?

mesh = trimesh.load_mesh(r"C:\Users\Administrator\Desktop\cube.glb")
translation = np.array([-30, 20, 10])
transform_matrix = trimesh.transformations.translation_matrix(translation)
transformed_mesh = mesh.apply_transform(transform_matrix)
mesh.export(r"C:\Users\Administrator\Desktop\cube1.glb")

I imported a cube located at the origin, and after applying a transformation matrix, it should theoretically be positioned at (-30, 20, 10). However, it is actually located at (-30, -10, 20).

CCCCTX avatar Aug 08 '23 07:08 CCCCTX

Hey, is it possibly related to this issue https://github.com/mikedh/trimesh/issues/1938?

mikedh avatar Aug 09 '23 02:08 mikedh

Hey, is it possibly related to this issue #1938?

Thanks! it works!

CCCCTX avatar Aug 09 '23 07:08 CCCCTX