skoch9 / meshplot

Plot 3D triangle meshes
GNU General Public License v3.0
148 stars 37 forks source link

Indices are mixed in `update_object` when coloring is `FaceColors` #14

Closed ilkedemir closed 4 years ago

ilkedemir commented 4 years ago

Please see this issue in lib-igl.

In update_object, even if the same vertices are passed as an argument, the mesh is broken as the face indices are lost. The quick fix in the aforementioned issue is not a real fix as it loses the face-coloring function -- as the tutorial focuses on the geometry, it is a special workaround.

Quick fix line: https://github.com/skoch9/meshplot/blob/b1be9210ee05b1af3431d4d1ad8768dbff85014c/meshplot/Viewer.py#L216

Actual line that breaks the mesh: https://github.com/skoch9/meshplot/blob/b1be9210ee05b1af3431d4d1ad8768dbff85014c/meshplot/Viewer.py#L374

skoch9 commented 4 years ago

This should be fixed now in release 0.4.0. Thanks for the report.