Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Libs/Mesh/MeshUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,12 @@ vtkSmartPointer<vtkPolyData> MeshUtils::recreate_mesh(vtkSmartPointer<vtkPolyDat

//---------------------------------------------------------------------------
vtkSmartPointer<vtkPolyData> MeshUtils::repair_mesh(vtkSmartPointer<vtkPolyData> mesh, bool extract_largest) {
// Line-only / vertex-only polydata (e.g. contours) has no polygons to repair;
// the triangulation and cleanup steps below would discard its cells.
if (mesh->GetNumberOfPolys() == 0) {
return mesh;
}

auto triangle_filter = vtkSmartPointer<vtkTriangleFilter>::New();
triangle_filter->SetInputData(mesh);
triangle_filter->PassLinesOff();
Expand Down
Loading