marian42 / mesh_to_sdf

Calculate signed distance fields for arbitrary meshes
https://pypi.org/project/mesh-to-sdf/
MIT License
1.03k stars 109 forks source link

ImportError: The mesh_to_sdf package must be imported before OpenGL is imported. #50

Closed DONGTING98 closed 11 months ago

DONGTING98 commented 11 months ago

Hello!

I am trying to use mesh_to_voxels from mesh_to_sdf import mesh_to_voxels import trimesh import pyrender

mesh = trimesh.load(file) voxels = mesh_to_voxels(mesh, 64, pad=True) vv, ff, nn, _ = skimage.measure.marching_cubes(vv,level=0) mesh0 = trimesh.Trimesh(vv,ff,nn) mesh0.show()

and it shows some error image image what should I do?

Thanks a lot.

EricWang12 commented 4 months ago

How did you solve this problem?