-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper)
{
- return ::HashCode( f.myInitFace->GetID(), upper );
+ return ::HashCode( FromSmIdType<int>(f.myInitFace->GetID()), upper );
}
static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 )
{
for ( ; cutFacesIt != myCutFaces.cend(); ++cutFacesIt )
{
const CutFace& cf = *cutFacesIt;
- int index = cf.myInitFace->GetID(); // index in theNew2OldFaces
- if ((int) theNew2OldFaces.size() <= index )
+ smIdType index = cf.myInitFace->GetID(); // index in theNew2OldFaces
+ if ((smIdType) theNew2OldFaces.size() <= index )
theNew2OldFaces.resize( index + 1 );
theNew2OldFaces[ index ] = std::make_pair( cf.myInitFace, index );
}
// erase loops that are cut off by face intersections
cf.CutOffLoops( loopSet, theSign, myNormals, cutOffLinks, cutOffCoplanarLinks );
- int index = cf.myInitFace->GetID(); // index in theNew2OldFaces
+ smIdType index = cf.myInitFace->GetID(); // index in theNew2OldFaces
const SMDS_MeshElement* tria;
for ( size_t iL = 0; iL < loopSet.myNbLoops; ++iL )
{
if ( nodes[i] == nodes[i+1] || nodes[i] == nodes[i+2] || nodes[i+1] == nodes[i+2] )
{
-#ifdef _DEBUG_
- std::cerr << "BAD tria" << std::endl;
- cf.Dump();
-#else
- if ( i < 0 ) cf.Dump(); // avoid "CutFace::Dump() unused in release mode"
-#endif
+ if (SALOME::VerbosityActivated())
+ {
+ std::cerr << "BAD tria" << std::endl;
+ cf.Dump();
+ }
+ else
+ {
+ if ( i < 0 ) cf.Dump(); // avoid "CutFace::Dump() unused in release mode"
+ }
continue;
}
if (!( tria = myMesh->FindFace( nodes[i], nodes[i+1], nodes[i+2] )))
continue;
for ( size_t iF = 0; iF < faces.size(); ++iF )
{
- int index = faces[iF]->GetID();
+ smIdType index = faces[iF]->GetID();
// if ( //faces[iF]->isMarked() || // kept part of cutFace
// !theNew2OldFaces[ index ].first ) // already removed
// continue;
if ( cf.myInitFace->IsNull() )
continue;
- int index = cf.myInitFace->GetID(); // index in theNew2OldFaces
+ smIdType index = cf.myInitFace->GetID(); // index in theNew2OldFaces
if ( !theNew2OldFaces[ index ].first )
continue; // already cut off
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
- const int faceIndex = newFace->GetID();
+ const smIdType faceIndex = newFace->GetID();
const gp_XYZ& oldNorm = normals[ faceIndex ];
const gp_XYZ newXYZ = oldXYZ + oldNorm * theOffset;
if ( multiPos.empty() )
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
- const int faceIndex = newFace->GetID();
+ const smIdType faceIndex = newFace->GetID();
const gp_XYZ& oldNorm = normals[ faceIndex ];
if ( !SMESH_MeshAlgos::FaceNormal( newFace, faceNorm, /*normalize=*/false ) ||
//faceNorm * moveVec < 0 )