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

Function getUnionFindStructureFaces

source/MRMesh/MRMeshComponents.cpp:821–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819}
820
821BaseUnionFind<FaceId> getUnionFindStructureFaces( const MeshTopology& topology, const FaceBitSet* region0, FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd )
822{
823 if ( incidence == FaceIncidence::PerEdge )
824 return getUnionFindStructureFacesPerEdge( topology, region0, isCompBd );
825
826 MR_TIMER;
827 assert( !isCompBd );
828 assert ( incidence == FaceIncidence::PerVertex );
829 const FaceBitSet& region = topology.getFaceIds( region0 );
830 UnionFind<FaceId> res( region.find_last() + 1 );
831 VertBitSet store;
832 for ( auto v : getIncidentVerts( topology, region0, store ) )
833 {
834 FaceId f0;
835 for ( auto edge : orgRing( topology, v ) )
836 {
837 FaceId f1 = topology.left( edge );
838 if ( !contains( region0, f1 ) )
839 continue;
840 if ( !f0 )
841 {
842 f0 = f1;
843 continue;
844 }
845 res.unite( f0, f1 );
846 }
847 }
848 return res;
849}
850
851BaseUnionFind<FaceId> getUnionFindStructureFaces( const MeshPart& meshPart, FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd )
852{

Callers 7

getComponentFunction · 0.85
getLargestComponentFunction · 0.85
getComponentsFunction · 0.85
getNumComponentsFunction · 0.85
getAllComponentsMapFunction · 0.85
getFacePairRegionMapFunction · 0.85
findMeshPartFunction · 0.85

Calls 7

getIncidentVertsFunction · 0.85
orgRingFunction · 0.85
leftMethod · 0.80
uniteMethod · 0.80
containsFunction · 0.70
find_lastMethod · 0.45

Tested by

no test coverage detected