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

Function findShortEdges

source/MRMesh/MRMeshFixer.cpp:450–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450Expected<UndirectedEdgeBitSet> findShortEdges( const MeshPart& mp, float criticalLength, ProgressCallback cb )
451{
452 MR_TIMER;
453 const auto criticalLengthSq = sqr( criticalLength );
454 UndirectedEdgeBitSet res( mp.mesh.topology.undirectedEdgeSize() );
455 auto completed = BitSetParallelForAll( res, [&] ( UndirectedEdgeId ue )
456 {
457 if ( !mp.mesh.topology.isInnerOrBdEdge( ue, mp.region ) )
458 return;
459 if ( mp.mesh.edgeLengthSq( ue ) <= criticalLengthSq )
460 res.set( ue );
461 }, cb );
462
463 if ( !completed )
464 return unexpectedOperationCanceled();
465
466 return res;
467}
468
469bool isEdgeBetweenDoubleTris( const MeshTopology& topology, EdgeId e )
470{

Callers 3

TestShortEdgesMethod · 0.85
EMSCRIPTEN_BINDINGSFunction · 0.85
fixMeshDegeneraciesFunction · 0.85

Calls 7

BitSetParallelForAllFunction · 0.85
isInnerOrBdEdgeMethod · 0.80
sqrFunction · 0.70
undirectedEdgeSizeMethod · 0.45
edgeLengthSqMethod · 0.45
setMethod · 0.45

Tested by 1

TestShortEdgesMethod · 0.68