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

Function debugSortingInfo

source/MRMesh/MRContoursCut.cpp:457–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457[[maybe_unused]] void debugSortingInfo( EdgeId baseE,
458 const EdgeData& edgeData,
459 const std::vector<int>& res,
460 const std::vector<float>& dotProds,
461 const SortIntersectionsData* sortData )
462{
463 if ( edgeData.size() > 1 )
464 {
465 bool edgeInfoPrinted{false};
466 for ( int i = 0; i + 1 < res.size(); ++i )
467 //if ( dotProds[res[i]] == dotProds[res[i + 1]] )
468 {
469 if ( !edgeInfoPrinted )
470 {
471 spdlog::info( "Edge {}", (int)baseE );
472 edgeInfoPrinted = true;
473 }
474 if ( sortData )
475 {
476 FaceId f1 = sortData->contours[edgeData[res[i]].interOnEdge.contourId][edgeData[res[i]].interOnEdge.intersectionId].tri();
477 FaceId f2 = sortData->contours[edgeData[res[i + 1]].interOnEdge.contourId][edgeData[res[i + 1]].interOnEdge.intersectionId].tri();
478
479 auto sharedEdge = sortData->otherMesh.topology.sharedEdge( f1, f2 );
480 spdlog::info( " {}", dotProds[res[i + 1]] - dotProds[res[i]] );
481 spdlog::info( " shared: ", (int)sharedEdge );
482 }
483 }
484 }
485}
486
487enum class CompareResult
488{

Callers

nothing calls this directly

Calls 3

triMethod · 0.80
sharedEdgeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected