src/Geometry/clipConvexFacetedVolumeByPlanes3d.cc
//------------------------------------------------------------------------------
// When we edit a face in place we may flip the orientation required -- this 
// method is used to fix that orientation in the other face using the edge.
//------------------------------------------------------------------------------
When we edit a face in place we may flip the orientation required -- this
method is used to fix that orientation in the other face using the edge.
When we edit a face in place we may flip the orientation required -- this method is used to fix that orientation in the other face using the edge .
inline
void fixOtherFaceEdgeOrientation(vector<vector<int>>& faces,
                                 const vector<pair<int, int>>& edgeFaces,
                                 const int faceID,
                                 const int edgeID,
                                 const int newEdgeOrientation) {
  REQUIRE(faceID >= 0 and faceID < faces.size());
  REQUIRE(edgeID >= 0 and edgeID < edgeFaces.size());
  REQUIRE(edgeFaces[edgeID].first == faceID or edgeFaces[edgeID].second == faceID);
  auto otherFaceID = (edgeFaces[edgeID].first == faceID ? edgeFaces[edgeID].second : edgeFaces[edgeID].first);
  auto k = 0;
  while (k < faces[otherFaceID].size() and posID(faces[otherFaceID][k]) != edgeID) ++k;
  CHECK(k < faces[otherFaceID].size());
  faces[otherFaceID][k] = newEdgeOrientation;
}
inline void fixOtherFaceEdgeOrientation ( vector < vector < int > > & faces , const vector < pair < int , int > > & edgeFaces , const int faceID , const int edgeID , const int newEdgeOrientation ) { REQUIRE ( faceID >= 0 and faceID < faces . size ( ) ) ; REQUIRE ( edgeID >= 0 and edgeID < edgeFaces . size ( ) ) ; REQUIRE ( edgeFaces [ edgeID ] . first == faceID or edgeFaces [ edgeID ] . second == faceID ) ; auto otherFaceID = ( edgeFaces [ edgeID ] . first == faceID ? edgeFaces [ edgeID ] . second : edgeFaces [ edgeID ] . first ) ; auto k = 0 ; while ( k < faces [ otherFaceID ] . size ( ) and posID ( faces [ otherFaceID ] [ k ] ) != edgeID ) ++ k ; CHECK ( k < faces [ otherFaceID ] . size ( ) ) ; faces [ otherFaceID ] [ k ] = newEdgeOrientation ; }
When we edit a face in place we may flip the orientation required -- this
method is used to fix that orientation in the other face using the edge.
When we edit a face in place we may flip the orientation required -- this method is used to fix that orientation in the other face using the edge .
// CHECK(otherFaceID > faceID);   // We should be the first to visit this edge.