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

Function getFacePairRegionMap

source/MRMesh/MRMeshComponents.cpp:594–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592}
593
594std::pair<Face2RegionMap, int> getFacePairRegionMap( const Mesh& mesh, const std::vector<FaceFace>& facePairs,
595 FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd )
596{
597 MR_TIMER;
598
599 FaceBitSet fs( mesh.topology.faceSize() );
600 for ( const auto & f : facePairs )
601 {
602 fs.set( f.aFace );
603 fs.set( f.bFace );
604 }
605
606 UnionFind<FaceId> unionFindStruct( getUnionFindStructureFaces( { mesh, &fs }, incidence, isCompBd ) );
607
608 for ( const auto & f : facePairs )
609 unionFindStruct.unite( f.aFace, f.bFace );
610
611 const auto& allRoots = unionFindStruct.roots();
612 return getUniqueRootIds( allRoots, fs );
613}
614
615Vector<double, RegionId> getRegionAreas( const MeshPart& meshPart,
616 const Face2RegionMap & regionMap, int numRegions )

Callers

nothing calls this directly

Calls 5

faceSizeMethod · 0.80
uniteMethod · 0.80
getUniqueRootIdsFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected