-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ComputeTriangleAreas, GetNonManifoldEdges and RemoveNonMani…
…foldEdges in t::geometry::TriangleMesh (#6657) Split the logic from ComputeSurfaceArea into a helper static function and introduce a new method which computes triangle areas and writes the resulting tensor into attributes of the mesh. t::geometry::TriangleMesh::GetNonManifoldEdges mimics the logic of the legacy method. t::geometry::TriangleMesh::RemoveNonManifoldEdges follows the logic of the legacy method but there are a few differences: * the main difference is that the outer while-loop is removed. I don't see how after the first iteration any edge can have more than 2 adjacent triangles, which makes the further iterations unnecessary. * I count triangles with non-negative areas immediately and do not rely on the total number of adjacent triangles (which would also include triangles marked for removal). * To choose a triangle with the minimal area out of the existing adjacent triangles I use a heap structure. * Use unordered / sorted comparison for GetNonManifoldEdges() test, return empty areas property if there are no triangles. --------- Co-authored-by: Sameer Sheorey <sameer.sheorey@intel.com>
- Loading branch information
Showing
5 changed files
with
412 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.