| 448 | } |
| 449 | |
| 450 | Expected<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 | |
| 469 | bool isEdgeBetweenDoubleTris( const MeshTopology& topology, EdgeId e ) |
| 470 | { |