Skip to content

MeshBuilder redesigned to use less space and have interface similar t…#343

Merged
Fedr merged 6 commits intomasterfrom
feature/meshbuilder
Aug 8, 2022
Merged

MeshBuilder redesigned to use less space and have interface similar t…#343
Fedr merged 6 commits intomasterfrom
feature/meshbuilder

Conversation

@Fedr
Copy link
Contributor

@Fedr Fedr commented Aug 8, 2022

…o other places

@Fedr Fedr requested a review from Grantim August 8, 2022 19:05
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 = {} );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
} );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getLocalRegion func here?

@Fedr Fedr merged commit 50a76c4 into master Aug 8, 2022
@Fedr Fedr deleted the feature/meshbuilder branch August 8, 2022 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants