Fix Fix triangle removal issues when using full narrow band of interior
This commit is contained in:
parent
39a47e91f7
commit
610e971373
2 changed files with 54 additions and 49 deletions
|
@ -68,6 +68,11 @@ openvdb::FloatGrid::Ptr mesh_to_grid(const indexed_triangle_set & mesh,
|
|||
else if (subgrid) grid = std::move(subgrid);
|
||||
}
|
||||
|
||||
if (meshparts.size() > 1) {
|
||||
// This is needed to avoid various artefacts on multipart meshes.
|
||||
// TODO: replace with something faster
|
||||
grid = openvdb::tools::levelSetRebuild(*grid, 0., 1.f, 1.f);
|
||||
}
|
||||
if(meshparts.empty()) {
|
||||
// Splitting failed, fall back to hollow the original mesh
|
||||
grid = openvdb::tools::meshToVolume<openvdb::FloatGrid>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue