You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.:
and cannot be fixed by compute_vertex_normals:
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
importopen3daso3dmesh=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
- 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
The text was updated successfully, but these errors were encountered:
I was able to work around this issue by editing the open3d::t::geometry::TriangleMesh implementation as follows.
TriangleMesh TriangleMesh::FillHoles(double hole_size) const {
using namespace vtkutils;
// do not include triangle attributes because they will not be preserved by
// the hole filling algorithm
auto polydata = CreateVtkPolyDataFromGeometry(
*this, GetVertexAttr().GetKeySet(), {}, {}, {}, false);
vtkNew<vtkFillHolesFilter> fill_holes;
fill_holes->SetInputData(polydata);
fill_holes->SetHoleSize(hole_size);
// make the triangle winding order consistent
vtkNew<vtkPolyDataNormals> normals;
normals->SetInputConnection(fill_holes->GetOutputPort());
normals->SetConsistency(true);
normals->SetSplitting(false);
normals->Update();
auto result = normals->GetOutput();
return CreateTriangleMeshFromVtkPolyData(result);
}
Checklist
main
branch).Describe the issue
Using
fill_holes
inopen3d.t.geometry.TriangleMesh
is simple and effective, but the result of filled triangles were create with wrong directions, e.g.:and cannot be fixed by
compute_vertex_normals
: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
Error message
No response
Expected behavior
No response
Open3D, Python and System information
Additional information
The similar functions/filter in other software such as MeshLab, MeshFix would fix holes with right normal/direction
The text was updated successfully, but these errors were encountered: