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

Function getLargeByAreaSmoothComponents

source/MRMesh/MRMeshComponents.cpp:295–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295FaceBitSet getLargeByAreaSmoothComponents( const MeshPart& mp, float minArea, float angleFromPlanar,
296 UndirectedEdgeBitSet * outBdEdgesBetweenLargeComps )
297{
298 const float critCos = std::cos( angleFromPlanar );
299 UndirectedEdgeBitSet bdEdges( mp.mesh.topology.undirectedEdgeSize() );
300 BitSetParallelForAll( bdEdges, [&]( UndirectedEdgeId ue )
301 {
302 if ( mp.mesh.topology.isLoneEdge( ue ) )
303 return;
304 if ( mp.mesh.dihedralAngleCos( ue ) < critCos )
305 bdEdges.set( ue );
306 } );
307 auto unionFind = MeshComponents::getUnionFindStructureFacesPerEdge( mp, &bdEdges );
308 return MeshComponents::getLargeByAreaComponents( mp, unionFind, minArea, outBdEdgesBetweenLargeComps );
309}
310
311FaceBitSet getLargeByAreaComponents( const MeshPart& mp, BaseUnionFind<FaceId> & unionFind, float minArea,
312 UndirectedEdgeBitSet * outBdEdgesBetweenLargeComps )

Callers

nothing calls this directly

Calls 7

BitSetParallelForAllFunction · 0.85
getLargeByAreaComponentsFunction · 0.85
dihedralAngleCosMethod · 0.80
undirectedEdgeSizeMethod · 0.45
isLoneEdgeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected