MeshBuilder redesigned to use less space and have interface similar t…#343
Merged
MeshBuilder redesigned to use less space and have interface similar t…#343
Conversation
Grantim
reviewed
Aug 8, 2022
Comment on lines
-52
to
+55
| std::vector<Triangle> & tris, | ||
| Triangulation & t, | ||
| std::vector<VertDuplication> * dups = nullptr, | ||
| std::vector<Triangle> * skippedTris = nullptr ); | ||
| const BuildSettings & settings = {} ); |
Contributor
There was a problem hiding this comment.
Should Trianglulation be const? (we have settings with region, to show if some triangles have not been added)?
| // resolve non-manifold vertices by creating duplicate vertices | ||
| // return number of duplicated vertices | ||
| MRMESH_API size_t duplicateNonManifoldVertices( std::vector<Triangle>& tris, | ||
| MRMESH_API size_t duplicateNonManifoldVertices( Triangulation & t, FaceBitSet * region = nullptr, |
Contributor
There was a problem hiding this comment.
Shoult Trianglulation be const?
Comment on lines
+40
to
+51
| [&] ( const auto & range, FaceId currMax ) | ||
| { | ||
| for ( const Triangle & t : range ) | ||
| { | ||
| currMax = std::max( currMax, t.f ); | ||
| } | ||
| return currMax; | ||
| }, | ||
| [] ( FaceId a, FaceId b ) | ||
| { | ||
| return a > b ? a : b; | ||
| } ); |
Contributor
There was a problem hiding this comment.
Why use max in first lambda and not use it in second?
Comment on lines
+365
to
+368
| FaceBitSet region; | ||
| if ( settings0.region ) | ||
| region = std::move( *settings0.region ); | ||
| region.resize( t.size() ); |
Grantim
approved these changes
Aug 8, 2022
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.
…o other places