X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_subMesh.cxx;h=0b697d7a0b9eeaafb6d6a37a3cd2aa5898edfb5d;hb=dad744364c27f488c40d4357699ac6cd9d779330;hp=911d01298326f7ff6070db545d0e57cc075ad412;hpb=b24a2d1b7692bdb21cf037b026e0273ba547cef4;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 911d01298..0b697d7a0 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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 @@ -39,7 +39,6 @@ #include "SMESH_subMeshEventListener.hxx" #include "utilities.h" -#include "OpUtil.hxx" #include "Basics_Utils.hxx" #include @@ -1331,12 +1330,12 @@ static void cleanSubMesh( SMESH_subMesh * subMesh ) if (SMESHDS_SubMesh * subMeshDS = subMesh->GetSubMeshDS()) { SMESHDS_Mesh * meshDS = subMesh->GetFather()->GetMeshDS(); - int nbElems = subMeshDS->NbElements(); + smIdType nbElems = subMeshDS->NbElements(); if ( nbElems > 0 ) for ( SMDS_ElemIteratorPtr ite = subMeshDS->GetElements(); ite->more(); ) meshDS->RemoveFreeElement( ite->next(), subMeshDS ); - int nbNodes = subMeshDS->NbNodes(); + smIdType nbNodes = subMeshDS->NbNodes(); if ( nbNodes > 0 ) for ( SMDS_NodeIteratorPtr itn = subMeshDS->GetNodes(); itn->more() ; ) { @@ -1917,7 +1916,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap) bool ret = true; if (_subShape.ShapeType() == TopAbs_VERTEX) { - vector aVec(SMDSEntity_Last,0); + vector aVec(SMDSEntity_Last,0); aVec[SMDSEntity_Node] = 1; aResMap.insert(make_pair(this,aVec)); return ret; @@ -1944,7 +1943,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap) SMESH_subMesh* sm = smIt->next(); int dim = SMESH_Gen::GetShapeDim( sm->GetSubShape() ); if (dim < dimToCheck) break; // the rest subMeshes are all of less dimension - const vector & nbs = aResMap[ sm ]; + const vector & nbs = aResMap[ sm ]; subMeshEvaluated = (std::accumulate( nbs.begin(), nbs.end(), 0 ) > 0 ); } if ( !subMeshEvaluated ) @@ -1954,7 +1953,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap) if ( IsMeshComputed() ) { - vector & nbEntities = aResMap[ this ]; + vector & nbEntities = aResMap[ this ]; nbEntities.resize( SMDSEntity_Last, 0 ); if ( SMESHDS_SubMesh* sm = GetSubMeshDS() ) { @@ -1968,7 +1967,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap) { ret = algo->Evaluate((*_father), _subShape, aResMap); } - aResMap.insert( make_pair( this,vector(0))); + aResMap.insert( make_pair( this,vector(0))); } return ret; @@ -2209,7 +2208,7 @@ TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * /*theGen*/, } } - return aCompound; + return theSubs.size() == 1 ? theSubs[0]->GetSubShape() : aCompound; } //======================================================================= @@ -2248,10 +2247,10 @@ const SMESH_Hypothesis* SMESH_subMesh::getSimilarAttached(const TopoDS_Shape& //======================================================================= SMESH_Hypothesis::Hypothesis_Status - SMESH_subMesh::CheckConcurrentHypothesis (const int theHypType) + SMESH_subMesh::CheckConcurrentHypothesis( SMESH_Hypothesis* theHypothesis) { // is there local hypothesis on me? - if ( getSimilarAttached( _subShape, 0, theHypType ) ) + if ( getSimilarAttached( _subShape, theHypothesis ) ) return SMESH_Hypothesis::HYP_OK; @@ -2261,7 +2260,7 @@ SMESH_Hypothesis::Hypothesis_Status for (; it.More(); it.Next()) { const TopoDS_Shape& ancestor = it.Value(); - const SMESH_Hypothesis* hyp = getSimilarAttached( ancestor, 0, theHypType ); + const SMESH_Hypothesis* hyp = getSimilarAttached( ancestor, theHypothesis ); if ( hyp ) { if ( aPrevWithHyp.IsNull() || aPrevWithHyp.IsSame( ancestor ))