X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_VolumeTool.cxx;h=ff41083c96b9bba89014cc33944d3a0975126b04;hp=be3370ae05461308e7fd06dc5136d934f63cbc42;hb=b09372829929f8f561495d6c16527134971a1909;hpb=16a07c876163e3c993e41db77e9181789b7324b8 diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index be3370ae0..ff41083c9 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -969,7 +969,7 @@ bool SMDS_VolumeTool::GetFaceNodes (int faceIndex, namespace { - struct NLink : public std::pair + struct NLink : public std::pair { int myOri; NLink(const SMDS_MeshNode* n1=0, const SMDS_MeshNode* n2=0, int ori=1 ) @@ -1488,10 +1488,10 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index, case QUAD_TETRA: { switch ( minInd ) { - case 0: if( maxInd==4 || maxInd==6 || maxInd==7 ) return true; // fall through - case 1: if( maxInd==4 || maxInd==5 || maxInd==8 ) return true; // fall through - case 2: if( maxInd==5 || maxInd==6 || maxInd==9 ) return true; // fall through - case 3: if( maxInd==7 || maxInd==8 || maxInd==9 ) return true; // fall through + case 0: return ( maxInd==4 || maxInd==6 || maxInd==7 ); + case 1: return ( maxInd==4 || maxInd==5 || maxInd==8 ); + case 2: return ( maxInd==5 || maxInd==6 || maxInd==9 ); + case 3: return ( maxInd==7 || maxInd==8 || maxInd==9 ); default:; } break; @@ -1499,14 +1499,14 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index, case QUAD_HEXA: { switch ( minInd ) { - case 0: if( maxInd==8 || maxInd==11 || maxInd==16 ) return true; // fall through - case 1: if( maxInd==8 || maxInd==9 || maxInd==17 ) return true; // fall through - case 2: if( maxInd==9 || maxInd==10 || maxInd==18 ) return true; // fall through - case 3: if( maxInd==10 || maxInd==11 || maxInd==19 ) return true; // fall through - case 4: if( maxInd==12 || maxInd==15 || maxInd==16 ) return true; // fall through - case 5: if( maxInd==12 || maxInd==13 || maxInd==17 ) return true; // fall through - case 6: if( maxInd==13 || maxInd==14 || maxInd==18 ) return true; // fall through - case 7: if( maxInd==14 || maxInd==15 || maxInd==19 ) return true; // fall through + case 0: return ( maxInd==8 || maxInd==11 || maxInd==16 ); + case 1: return ( maxInd==8 || maxInd==9 || maxInd==17 ); + case 2: return ( maxInd==9 || maxInd==10 || maxInd==18 ); + case 3: return ( maxInd==10 || maxInd==11 || maxInd==19 ); + case 4: return ( maxInd==12 || maxInd==15 || maxInd==16 ); + case 5: return ( maxInd==12 || maxInd==13 || maxInd==17 ); + case 6: return ( maxInd==13 || maxInd==14 || maxInd==18 ); + case 7: return ( maxInd==14 || maxInd==15 || maxInd==19 ); default:; } break; @@ -1514,11 +1514,11 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index, case QUAD_PYRAM: { switch ( minInd ) { - case 0: if( maxInd==5 || maxInd==8 || maxInd==9 ) return true; // fall through - case 1: if( maxInd==5 || maxInd==6 || maxInd==10 ) return true; // fall through - case 2: if( maxInd==6 || maxInd==7 || maxInd==11 ) return true; // fall through - case 3: if( maxInd==7 || maxInd==8 || maxInd==12 ) return true; // fall through - case 4: if( maxInd==9 || maxInd==10 || maxInd==11 || maxInd==12 ) return true; + case 0: return ( maxInd==5 || maxInd==8 || maxInd==9 ); + case 1: return ( maxInd==5 || maxInd==6 || maxInd==10 ); + case 2: return ( maxInd==6 || maxInd==7 || maxInd==11 ); + case 3: return ( maxInd==7 || maxInd==8 || maxInd==12 ); + case 4: return ( maxInd==9 || maxInd==10 || maxInd==11 || maxInd==12 ); default:; } break; @@ -1526,12 +1526,12 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index, case QUAD_PENTA: { switch ( minInd ) { - case 0: if( maxInd==6 || maxInd==8 || maxInd==12 ) return true; // fall through - case 1: if( maxInd==6 || maxInd==7 || maxInd==13 ) return true; // fall through - case 2: if( maxInd==7 || maxInd==8 || maxInd==14 ) return true; // fall through - case 3: if( maxInd==9 || maxInd==11 || maxInd==12 ) return true; // fall through - case 4: if( maxInd==9 || maxInd==10 || maxInd==13 ) return true; // fall through - case 5: if( maxInd==10 || maxInd==11 || maxInd==14 ) return true; // fall through + case 0: return ( maxInd==6 || maxInd==8 || maxInd==12 ); + case 1: return ( maxInd==6 || maxInd==7 || maxInd==13 ); + case 2: return ( maxInd==7 || maxInd==8 || maxInd==14 ); + case 3: return ( maxInd==9 || maxInd==11 || maxInd==12 ); + case 4: return ( maxInd==9 || maxInd==10 || maxInd==13 ); + case 5: return ( maxInd==10 || maxInd==11 || maxInd==14 ); default:; } break; @@ -2210,7 +2210,7 @@ const SMDS_MeshVolume* SMDS_VolumeTool::Element() const //purpose : return element ID //======================================================================= -int SMDS_VolumeTool::ID() const +smIdType SMDS_VolumeTool::ID() const { return myVolume ? myVolume->GetID() : 0; }