isl-org / isl-org/Open3D

[bug]fill_holes: wrong triangle direction

Open
#6,681 2 comments 1 reaction 0 assignees View on GitHub
bug
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).

### Describe the issue

Using `fill_holes` in `open3d.t.geometry.TriangleMesh` is simple and effective, but the result of filled triangles were create with wrong directions, e.g.:
![Screenshot 2024-03-07 at 16 15 56](https://github.com/isl-org/Open3D/assets/3398981/dfed9b50-84b3-438e-87b6-b3243de88c40)
and cannot be fixed by `compute_vertex_normals`:
![Screenshot 2024-03-07 at 16 18 33](https://github.com/isl-org/Open3D/assets/3398981/8fd3861d-6085-4661-9160-1ef39688a09f)

is this a bug? can we configure the triangle direction in `fill_holes`?
Or how to flip the directions of the filled holes?

### Steps to reproduce the bug

```python
import open3d as o3d

mesh = o3d.io.read_triangle_mesh('path')
# ....

# try fill holes
filled = o3d.t.geometry.TriangleMesh.from_legacy(mesh)
final = filled.fill_holes()
final.compute_vertex_normals()

o3d.visualization.draw(final)
```

### Error message

_No response_

### Expected behavior

_No response_

### Open3D, Python and System information

```markdown
- Operating system: macOS 10.15
- Python version: Python 3.11.4
- Open3D version: 0.18
- System architecture: apple-silicon
- How did you install Open3D?: pip
```

### Additional information

The similar functions/filter in other software such as MeshLab, MeshFix would fix holes with right normal/direction

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.