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

Function findSpikeVertices

source/MRMesh/MRMeshMath.cpp:579–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579Expected<VertBitSet> findSpikeVertices( const MeshTopology & topology, const VertCoords & points, float minSumAngle, const VertBitSet * region, const ProgressCallback& cb )
580{
581 MR_TIMER;
582 const VertBitSet & testVerts = topology.getVertIds( region );
583 VertBitSet res( testVerts.size() );
584 auto completed = BitSetParallelFor( testVerts, [&]( VertId v )
585 {
586 bool boundaryVert = false;
587 auto a = sumAngles( topology, points, v, &boundaryVert );
588 if ( !boundaryVert && a < minSumAngle )
589 res.set( v );
590 }, cb );
591
592 if ( !completed )
593 return unexpectedOperationCanceled();
594
595 return res;
596}
597
598float dihedralAngleSin( const MeshTopology & topology, const VertCoords & points, UndirectedEdgeId ue )
599{

Callers 2

findSpikeVerticesMethod · 0.85
removeSpikesFunction · 0.85

Calls 5

BitSetParallelForFunction · 0.85
sumAnglesFunction · 0.85
sizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected