MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / excludeFullySelectedComponents

Function excludeFullySelectedComponents

source/MRMesh/MRMeshComponents.cpp:777–797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776
777void excludeFullySelectedComponents( const Mesh& mesh, VertBitSet& selection )
778{
779 MR_TIMER;
780
781 auto unionFindStruct = getUnionFindStructureVerts( mesh );
782 const auto& allRoots = unionFindStruct.roots();
783 auto [uniqueRootsMap, k] = getUniqueRootIds( allRoots, mesh.topology.getValidVerts() );
784 RegionBitSet remainKeysBitSets( k );
785 for ( VertId v( 0 ); v < uniqueRootsMap.size(); ++v )
786 {
787 if ( selection.test( v ) )
788 continue;
789 if ( auto rId = uniqueRootsMap[v] )
790 remainKeysBitSets.set( rId );
791 }
792 for ( auto v : selection )
793 {
794 if ( !remainKeysBitSets.test( uniqueRootsMap[v] ) )
795 selection.reset( v );
796 }
797}
798
799BaseUnionFind<FaceId> getUnionFindStructureFacesPerEdge( const MeshTopology& topology, const FaceBitSet* region, const UndirectedEdgeBitSet * isCompBd )
800{

Callers 1

smoothFillingNicelyFunction · 0.85

Calls 6

getUniqueRootIdsFunction · 0.70
sizeMethod · 0.45
testMethod · 0.45
setMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected