Open3D
Open3D copied to clipboard
How to use VisualizerWithEditing to show a mesh with its wireframe, and then add a callback to remove selected triangles?
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
mainbranch).
My Question
I have a concave triangulated mesh that I want to manually clean up, meaning that I want to select which triangles from the triangulation should be removed from the final result (as I couldn't get good results with alpha shapes).
I want to do the following:
Step A: Triangulation
- Get the triangulation done with Delauney triangulation.
- Draw the resulting mesh with
VisualizerWithEditingshowing the wireframe of the mesh.
Step B: First cleanup
- Use the circumradius of the triangles for a first step cleanup (delete all triangules above a
max_accepted_radius) - Use a callback to update the plot on the visualizer for different levels of
max_accepted_radius(maybe with a slider). - Use some key to accept and save.
Step C: Manual cleanup
- Use another callback to manually select triangles that should be removed.
- Add callback key for "undo" last triangle removal.
- Use some key to accept and save.
Basically, I have no idea how to plot the triangle wireframe with VisualizerWithEditing, but I suspect it's possible since it can be done easily with draw_geometries.
I also did not find how to use a callback to change the plotted geometry.
Any help is welcome!