-// 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
#include "SMESH_subMeshEventListener.hxx"
#include "utilities.h"
-#include "OpUtil.hxx"
#include "Basics_Utils.hxx"
#include <BRep_Builder.hxx>
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() ; )
{
bool ret = true;
if (_subShape.ShapeType() == TopAbs_VERTEX) {
- vector<int> aVec(SMDSEntity_Last,0);
+ vector<smIdType> aVec(SMDSEntity_Last,0);
aVec[SMDSEntity_Node] = 1;
aResMap.insert(make_pair(this,aVec));
return ret;
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<int> & nbs = aResMap[ sm ];
+ const vector<smIdType> & nbs = aResMap[ sm ];
subMeshEvaluated = (std::accumulate( nbs.begin(), nbs.end(), 0 ) > 0 );
}
if ( !subMeshEvaluated )
if ( IsMeshComputed() )
{
- vector<int> & nbEntities = aResMap[ this ];
+ vector<smIdType> & nbEntities = aResMap[ this ];
nbEntities.resize( SMDSEntity_Last, 0 );
if ( SMESHDS_SubMesh* sm = GetSubMeshDS() )
{
{
ret = algo->Evaluate((*_father), _subShape, aResMap);
}
- aResMap.insert( make_pair( this,vector<int>(0)));
+ aResMap.insert( make_pair( this,vector<smIdType>(0)));
}
return ret;
}
}
- return aCompound;
+ return theSubs.size() == 1 ? theSubs[0]->GetSubShape() : aCompound;
}
//=======================================================================
//=======================================================================
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;
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 ))