isl-org / isl-org/Open3D

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

Open
#6,638 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).

### 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!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the `VisualizerWithEditing` and `draw_geometries` entry points in the release and latest documentation. Determine whether the requested wireframe display, geometry updates, sliders, selection callbacks, undo behavior, and save actions are supported; done means documenting the available path or defining the missing functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.