I need to make a GTK3 application in Python that includes a mesh visualized with Trimesh.
mesh = trimesh.load(filename)
mesh.is_watertight
mesh.euler_number
np.divide(mesh.volume, mesh.convex_hull.volume)
mesh.vertices -= mesh.center_mass
mesh.moment_inertia
mesh.split()
try:
for facet in mesh.facets:
mesh.visual.face_colors[facet] = trimesh.visual.random_color()
except ValueError:
pass
# preview mesh in an opengl window if you installed pyglet with pip
mesh.show()
This opens a new window. I would like instead of opening a new window to be displayed in an area of the GTK app. Thanks in advance.