Skip to content

Commit

Permalink
Add in the trimesh solid check to validate Manifold output
Browse files Browse the repository at this point in the history
In principle Manifold shouldn't be producing outputs that would be a
problem for this test, if I'm understanding what it does correctly, but
since it's a new library and we have the check for the CM/SPSR methods
already, go ahead and add it to the mix.
  • Loading branch information
starseeker committed Oct 31, 2023
1 parent 2cf3573 commit cb5bfb0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/libged/facetize/facetize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,19 @@ bool_meshes(
*o_ccnt = (int)rmesh.vertPos.size();
*o_tricnt = (int)rmesh.triVerts.size();


int not_solid = bg_trimesh_solid2(*o_ccnt, *o_tricnt, (fastf_t *)*o_coords, (int *)*o_tris, NULL);
if (not_solid) {
*o_ccnt = 0;
*o_tricnt = 0;
bu_free(*o_coords, "coords");
*o_coords = NULL;
bu_free(*o_tris, "tris");
*o_tris = NULL;
bu_log("Error: Manifold boolean succeeded, but result reports as non-solid: failure.");
return 0;
}

return rmesh.triVerts.size();
}
#endif
Expand Down

0 comments on commit cb5bfb0

Please sign in to comment.