Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

How to use VisualizerWithEditing to show a mesh with its wireframe, and then add a callback to remove selected triangles?

Open evbernardes opened this issue 1 year ago • 0 comments

Checklist

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

  1. Get the triangulation done with Delauney triangulation.
  2. Draw the resulting mesh with VisualizerWithEditing showing the wireframe of the mesh.

Step B: First cleanup

  1. Use the circumradius of the triangles for a first step cleanup (delete all triangules above a max_accepted_radius)
  2. Use a callback to update the plot on the visualizer for different levels of max_accepted_radius (maybe with a slider).
  3. Use some key to accept and save.

Step C: Manual cleanup

  1. Use another callback to manually select triangles that should be removed.
  2. Add callback key for "undo" last triangle removal.
  3. 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!

evbernardes avatar Feb 06 '24 10:02 evbernardes