Repository navigation
Drop triangles with coincident vertices from Shape.tessellate - #2122
Open
LiShuochen wants to merge 1 commit into
Open
LiShuochen wants to merge 1 commit into
LiShuochen wants to merge 1 commit into
Conversation
Where a surface collapses to a point (sphere poles, a cone apex, a revolved profile ending on its axis, the center of a horn torus, the corner patches of a filleted box), BRepMesh creates several nodes with identical coordinates. The triangles between them have zero area and were passed on to the AMF, 3MF and TJS exports. Skip them; the vertex list is unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2122 +/- ##
==========================================
+ Coverage 95.81% 95.82% +0.01%
==========================================
Files 30 30
Lines 9605 9606 +1
Branches 1443 1443
==========================================
+ Hits 9203 9205 +2
+ Misses 247 246 -1
Partials 155 155 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Where a surface collapses to a point (sphere poles, a cone apex, a revolved profile ending on its axis, the center of a horn torus, the corner patches of a filleted box), BRepMesh creates several nodes with identical coordinates. The triangles spanning two of them have zero area and no normal, and
tessellatepassed them on to the AMF, 3MF and TJS exports.tessellatenow skips these triangles; the vertex list is unchanged, so vertex indices stay the same. STL export does not go throughtessellateand still contains them. Only exact coincidence is checked, so triangles with distinct but collinear or nearly coincident vertices, such as a few next to the straight edges of a half cone or at the center of a horn torus, are left as they are.Reading nodes with
Coord()and triangles withGet()offsets the cost of the check, sotessellateis about as fast as before.