Search code examples
pythonmeshpyglet

How to remove smoothing on trimesh viewer SceneWidget


I have a detailed mesh (my_mesh) created with trimesh (python package). I can visualize it with my_mesh.show(smooth=False), and the option to remove smoothness and obtain a detailed view is clear.

Now I want to do view the mesh in a glooey and pyglet gui, and therefore use trimesh.viewer.SceneWidget(). Here I cannot find the way to remove the smoothness from the resulting visualization of my_mesh.

relevant code snippet:

scene = trimesh.Scene()
scene.add_geometry(my_mesh)
self.scene_widget1 = trimesh.viewer.SceneWidget(scene)
hbox.add(self.scene_widget1)

Solution

  • Trimesh package had to be modified. I have contributed to the open source project and it will be included in the next release.