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

Function invalidateFace

source/MRMesh/MRContoursCut.cpp:87–112  ·  view source on GitHub ↗

sets left face of given edge invalid and saves info about its old left ring

Source from the content-addressed store, hash-verified

85
86// sets left face of given edge invalid and saves info about its old left ring
87void invalidateFace( MeshTopology& topology, FullRemovedFacesInfo& removedFaceInfo, int contId, int interId, EdgeId leftEdge, size_t oldEdgesSize )
88{
89 auto thisFace = topology.left( leftEdge );
90 if ( !thisFace.valid() )
91 return;
92 // fill removed tris
93 auto& removedInfo = removedFaceInfo[contId][interId];
94 removedInfo.f = thisFace;
95 int leftEdgesCount = 0;
96 for ( auto e : leftRing( topology, thisFace ) )
97 {
98 // we don't want to add new edges to this info structure
99 // still they can be present in because of splices done before
100 if ( e < oldEdgesSize )
101 {
102 if ( leftEdgesCount > 2 )
103 {
104 assert( false );
105 break;
106 }
107 removedInfo.leftRing[leftEdgesCount] = e;
108 ++leftEdgesCount;
109 }
110 }
111 topology.setLeft( leftEdge, {} );
112}
113
114void iterateFindRemovedFaceInfo( FullRemovedFacesInfo& removedFaces, int contId, int interId, EdgeId leftEdge )
115{

Callers 1

doPreCutMeshFunction · 0.85

Calls 4

leftRingFunction · 0.85
leftMethod · 0.80
setLeftMethod · 0.80
validMethod · 0.45

Tested by

no test coverage detected