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

Function fixMultipleEdges

source/MRMesh/MRMeshFixer.cpp:373–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void fixMultipleEdges( Mesh & mesh, const std::vector<MultipleEdge> & multipleEdges )
374{
375 if ( multipleEdges.empty() )
376 return;
377 MR_TIMER;
378 MR_WRITER( mesh )
379
380 for ( const auto & mE : multipleEdges )
381 {
382 int num = 0;
383 for ( auto e : orgRing( mesh.topology, mE.first ) )
384 {
385 if ( mesh.topology.dest( e ) != mE.second )
386 continue;
387 if ( num++ == 0 )
388 continue; // skip the first edge in the group
389 mesh.splitEdge( e.sym() );
390 }
391 assert( num > 1 ); //it was really multiply connected pair of vertices
392 }
393}
394
395void fixMultipleEdges( Mesh & mesh )
396{

Callers 1

EMSCRIPTEN_BINDINGSFunction · 0.85

Calls 7

orgRingFunction · 0.85
findMultipleEdgesFunction · 0.85
emptyMethod · 0.45
destMethod · 0.45
splitEdgeMethod · 0.45
symMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected