fix warnings SMESH_MeshEditor

This commit is contained in:
Viktor UZLOV 2021-02-11 13:52:18 +03:00
parent 6b9f5b0da6
commit f498480757
5 changed files with 71 additions and 71 deletions

View File

@ -391,12 +391,12 @@ SMESH_MeshEditor::AddElement(const vector<const SMDS_MeshNode*> & node,
*/ */
//======================================================================= //=======================================================================
SMDS_MeshElement* SMESH_MeshEditor::AddElement(const vector<int> & nodeIDs, SMDS_MeshElement* SMESH_MeshEditor::AddElement(const vector<smIdType> & nodeIDs,
const ElemFeatures& features) const ElemFeatures& features)
{ {
vector<const SMDS_MeshNode*> nodes; vector<const SMDS_MeshNode*> nodes;
nodes.reserve( nodeIDs.size() ); nodes.reserve( nodeIDs.size() );
vector<int>::const_iterator id = nodeIDs.begin(); vector<smIdType>::const_iterator id = nodeIDs.begin();
while ( id != nodeIDs.end() ) { while ( id != nodeIDs.end() ) {
if ( const SMDS_MeshNode* node = GetMeshDS()->FindNode( *id++ )) if ( const SMDS_MeshNode* node = GetMeshDS()->FindNode( *id++ ))
nodes.push_back( node ); nodes.push_back( node );
@ -412,7 +412,7 @@ SMDS_MeshElement* SMESH_MeshEditor::AddElement(const vector<int> & nodeIDs,
// Modify a compute state of sub-meshes which become empty // Modify a compute state of sub-meshes which become empty
//======================================================================= //=======================================================================
int SMESH_MeshEditor::Remove (const list< int >& theIDs, smIdType SMESH_MeshEditor::Remove (const list< smIdType >& theIDs,
const bool isNodes ) const bool isNodes )
{ {
ClearLastCreated(); ClearLastCreated();
@ -420,8 +420,8 @@ int SMESH_MeshEditor::Remove (const list< int >& theIDs,
SMESHDS_Mesh* aMesh = GetMeshDS(); SMESHDS_Mesh* aMesh = GetMeshDS();
set< SMESH_subMesh *> smmap; set< SMESH_subMesh *> smmap;
int removed = 0; smIdType removed = 0;
list<int>::const_iterator it = theIDs.begin(); list<smIdType>::const_iterator it = theIDs.begin();
for ( ; it != theIDs.end(); it++ ) { for ( ; it != theIDs.end(); it++ ) {
const SMDS_MeshElement * elem; const SMDS_MeshElement * elem;
if ( isNodes ) if ( isNodes )
@ -2207,7 +2207,7 @@ namespace
*/ */
//======================================================================= //=======================================================================
struct TVolumeFaceKey: pair< pair< int, int>, pair< int, int> > struct TVolumeFaceKey: pair< pair< smIdType, smIdType>, pair< smIdType, smIdType> >
{ {
TVolumeFaceKey( SMDS_VolumeTool& vol, int iF ) TVolumeFaceKey( SMDS_VolumeTool& vol, int iF )
{ {
@ -6470,7 +6470,7 @@ SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Offset( TIDSortedElemSet & theElem
// copy offsetMesh to theTgtMesh // copy offsetMesh to theTgtMesh
int idShift = meshDS->MaxNodeID(); smIdType idShift = meshDS->MaxNodeID();
for ( size_t i = 0; i < new2OldNodes.size(); ++i ) for ( size_t i = 0; i < new2OldNodes.size(); ++i )
if ( const SMDS_MeshNode* n = new2OldNodes[ i ].first ) if ( const SMDS_MeshNode* n = new2OldNodes[ i ].first )
{ {
@ -6840,7 +6840,7 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes,
TNodeNodeMap nodeNodeMap; // node to replace - new node TNodeNodeMap nodeNodeMap; // node to replace - new node
set<const SMDS_MeshElement*> elems; // all elements with changed nodes set<const SMDS_MeshElement*> elems; // all elements with changed nodes
list< int > rmElemIds, rmNodeIds; list< smIdType > rmElemIds, rmNodeIds;
vector< ElemFeatures > newElemDefs; vector< ElemFeatures > newElemDefs;
// Fill nodeNodeMap and elems // Fill nodeNodeMap and elems
@ -7435,12 +7435,12 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem,
// purpose : allow comparing elements basing on their nodes // purpose : allow comparing elements basing on their nodes
// ======================================================== // ========================================================
class ComparableElement : public boost::container::flat_set< int > class ComparableElement : public boost::container::flat_set< smIdType >
{ {
typedef boost::container::flat_set< int > int_set; typedef boost::container::flat_set< smIdType > int_set;
const SMDS_MeshElement* myElem; const SMDS_MeshElement* myElem;
int mySumID; smIdType mySumID;
mutable int myGroupID; mutable int myGroupID;
public: public:
@ -7451,7 +7451,7 @@ public:
this->reserve( theElem->NbNodes() ); this->reserve( theElem->NbNodes() );
for ( SMDS_ElemIteratorPtr nodeIt = theElem->nodesIterator(); nodeIt->more(); ) for ( SMDS_ElemIteratorPtr nodeIt = theElem->nodesIterator(); nodeIt->more(); )
{ {
int id = nodeIt->next()->GetID(); smIdType id = nodeIt->next()->GetID();
mySumID += id; mySumID += id;
this->insert( id ); this->insert( id );
} }
@ -7474,7 +7474,7 @@ public:
static int HashCode(const ComparableElement& se, int limit ) static int HashCode(const ComparableElement& se, int limit )
{ {
return ::HashCode( se.mySumID, limit ); return ::HashCode( FromIdType<int>(se.mySumID), limit );
} }
static Standard_Boolean IsEqual(const ComparableElement& se1, const ComparableElement& se2 ) static Standard_Boolean IsEqual(const ComparableElement& se1, const ComparableElement& se2 )
{ {
@ -7499,7 +7499,7 @@ void SMESH_MeshEditor::FindEqualElements( TIDSortedElemSet & theElements,
else elemIt = SMESHUtils::elemSetIterator( theElements ); else elemIt = SMESHUtils::elemSetIterator( theElements );
typedef NCollection_Map< ComparableElement, ComparableElement > TMapOfElements; typedef NCollection_Map< ComparableElement, ComparableElement > TMapOfElements;
typedef std::list<int> TGroupOfElems; typedef std::list<smIdType> TGroupOfElems;
TMapOfElements mapOfElements; TMapOfElements mapOfElements;
std::vector< TGroupOfElems > arrayOfGroups; std::vector< TGroupOfElems > arrayOfGroups;
TGroupOfElems groupOfElems; TGroupOfElems groupOfElems;
@ -7545,7 +7545,7 @@ void SMESH_MeshEditor::MergeElements(TListOfListOfElementsID & theGroupsOfElemen
{ {
ClearLastCreated(); ClearLastCreated();
typedef list<int> TListOfIDs; typedef list<smIdType> TListOfIDs;
TListOfIDs rmElemIds; // IDs of elems to remove TListOfIDs rmElemIds; // IDs of elems to remove
SMESHDS_Mesh* aMesh = GetMeshDS(); SMESHDS_Mesh* aMesh = GetMeshDS();
@ -8260,8 +8260,8 @@ SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
TListOfListOfElementsID::iterator itGroups = equalGroups.begin(); TListOfListOfElementsID::iterator itGroups = equalGroups.begin();
for ( ; itGroups != equalGroups.end(); ++itGroups ) for ( ; itGroups != equalGroups.end(); ++itGroups )
{ {
list< int >& group = *itGroups; list< smIdType >& group = *itGroups;
list< int >::iterator id = group.begin(); list< smIdType >::iterator id = group.begin();
for ( ++id; id != group.end(); ++id ) for ( ++id; id != group.end(); ++id )
if ( const SMDS_MeshElement* seg = GetMeshDS()->FindElement( *id )) if ( const SMDS_MeshElement* seg = GetMeshDS()->FindElement( *id ))
segments.erase( seg ); segments.erase( seg );
@ -8693,12 +8693,12 @@ namespace
*/ */
//======================================================================= //=======================================================================
int SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm, smIdType SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm,
SMESH_MesherHelper& theHelper, SMESH_MesherHelper& theHelper,
const bool theForce3d) const bool theForce3d)
{ {
//MESSAGE("convertElemToQuadratic"); //MESSAGE("convertElemToQuadratic");
int nbElem = 0; smIdType nbElem = 0;
if( !theSm ) return nbElem; if( !theSm ) return nbElem;
vector<int> nbNodeInFaces; vector<int> nbNodeInFaces;
@ -8846,7 +8846,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
aHelper.ToFixNodeParameters( true ); aHelper.ToFixNodeParameters( true );
// convert elements assigned to sub-meshes // convert elements assigned to sub-meshes
int nbCheckedElems = 0; smIdType nbCheckedElems = 0;
if ( myMesh->HasShapeToMesh() ) if ( myMesh->HasShapeToMesh() )
{ {
if ( SMESH_subMesh *aSubMesh = myMesh->GetSubMeshContaining(myMesh->GetShapeToMesh())) if ( SMESH_subMesh *aSubMesh = myMesh->GetSubMeshContaining(myMesh->GetShapeToMesh()))
@ -8863,7 +8863,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
} }
// convert elements NOT assigned to sub-meshes // convert elements NOT assigned to sub-meshes
int totalNbElems = meshDS->NbEdges() + meshDS->NbFaces() + meshDS->NbVolumes(); smIdType totalNbElems = meshDS->NbEdges() + meshDS->NbFaces() + meshDS->NbVolumes();
if ( nbCheckedElems < totalNbElems ) // not all elements are in sub-meshes if ( nbCheckedElems < totalNbElems ) // not all elements are in sub-meshes
{ {
aHelper.SetElementsOnShape(false); aHelper.SetElementsOnShape(false);
@ -8876,7 +8876,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
const SMDS_MeshEdge* edge = aEdgeItr->next(); const SMDS_MeshEdge* edge = aEdgeItr->next();
if ( !edge->IsQuadratic() ) if ( !edge->IsQuadratic() )
{ {
int id = edge->GetID(); smIdType id = edge->GetID();
const SMDS_MeshNode* n1 = edge->GetNode(0); const SMDS_MeshNode* n1 = edge->GetNode(0);
const SMDS_MeshNode* n2 = edge->GetNode(1); const SMDS_MeshNode* n2 = edge->GetNode(1);
@ -8917,7 +8917,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
if ( alreadyOK ) if ( alreadyOK )
continue; continue;
const int id = face->GetID(); const smIdType id = face->GetID();
vector<const SMDS_MeshNode *> nodes ( face->begin_nodes(), face->end_nodes()); vector<const SMDS_MeshNode *> nodes ( face->begin_nodes(), face->end_nodes());
meshDS->RemoveFreeElement(face, smDS, /*fromGroups=*/false); meshDS->RemoveFreeElement(face, smDS, /*fromGroups=*/false);
@ -8973,7 +8973,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
continue; continue;
} }
} }
const int id = volume->GetID(); const smIdType id = volume->GetID();
vector<const SMDS_MeshNode *> nodes (volume->begin_nodes(), volume->end_nodes()); vector<const SMDS_MeshNode *> nodes (volume->begin_nodes(), volume->end_nodes());
if ( type == SMDSEntity_Polyhedra ) if ( type == SMDSEntity_Polyhedra )
nbNodeInFaces = static_cast<const SMDS_MeshVolume* >(volume)->GetQuantities(); nbNodeInFaces = static_cast<const SMDS_MeshVolume* >(volume)->GetQuantities();
@ -9153,7 +9153,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d,
if ( alreadyOK ) continue; if ( alreadyOK ) continue;
const SMDSAbs_ElementType type = elem->GetType(); const SMDSAbs_ElementType type = elem->GetType();
const int id = elem->GetID(); const smIdType id = elem->GetID();
const int nbNodes = elem->NbCornerNodes(); const int nbNodes = elem->NbCornerNodes();
vector<const SMDS_MeshNode *> nodes ( elem->begin_nodes(), elem->end_nodes()); vector<const SMDS_MeshNode *> nodes ( elem->begin_nodes(), elem->end_nodes());
@ -9214,15 +9214,15 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d,
//======================================================================= //=======================================================================
/*! /*!
* \brief Convert quadratic elements to linear ones and remove quadratic nodes * \brief Convert quadratic elements to linear ones and remove quadratic nodes
* \return int - nb of checked elements * \return smIdType - nb of checked elements
*/ */
//======================================================================= //=======================================================================
int SMESH_MeshEditor::removeQuadElem(SMESHDS_SubMesh * theSm, smIdType SMESH_MeshEditor::removeQuadElem(SMESHDS_SubMesh * theSm,
SMDS_ElemIteratorPtr theItr, SMDS_ElemIteratorPtr theItr,
const int /*theShapeID*/) const int /*theShapeID*/)
{ {
int nbElem = 0; smIdType nbElem = 0;
SMESHDS_Mesh* meshDS = GetMeshDS(); SMESHDS_Mesh* meshDS = GetMeshDS();
ElemFeatures elemType; ElemFeatures elemType;
vector<const SMDS_MeshNode *> nodes; vector<const SMDS_MeshNode *> nodes;
@ -9267,7 +9267,7 @@ int SMESH_MeshEditor::removeQuadElem(SMESHDS_SubMesh * theSm,
bool SMESH_MeshEditor::ConvertFromQuadratic() bool SMESH_MeshEditor::ConvertFromQuadratic()
{ {
int nbCheckedElems = 0; smIdType nbCheckedElems = 0;
if ( myMesh->HasShapeToMesh() ) if ( myMesh->HasShapeToMesh() )
{ {
if ( SMESH_subMesh *aSubMesh = myMesh->GetSubMeshContaining(myMesh->GetShapeToMesh())) if ( SMESH_subMesh *aSubMesh = myMesh->GetSubMeshContaining(myMesh->GetShapeToMesh()))
@ -9281,7 +9281,7 @@ bool SMESH_MeshEditor::ConvertFromQuadratic()
} }
} }
int totalNbElems = smIdType totalNbElems =
GetMeshDS()->NbEdges() + GetMeshDS()->NbFaces() + GetMeshDS()->NbVolumes(); GetMeshDS()->NbEdges() + GetMeshDS()->NbFaces() + GetMeshDS()->NbVolumes();
if ( nbCheckedElems < totalNbElems ) // not all elements are in submeshes if ( nbCheckedElems < totalNbElems ) // not all elements are in submeshes
{ {
@ -9320,7 +9320,7 @@ void SMESH_MeshEditor::ConvertFromQuadratic(TIDSortedElemSet& theElements)
if ( theElements.empty() ) return; if ( theElements.empty() ) return;
// collect IDs of medium nodes of theElements; some of these nodes will be removed // collect IDs of medium nodes of theElements; some of these nodes will be removed
set<int> mediumNodeIDs; set<smIdType> mediumNodeIDs;
TIDSortedElemSet::iterator eIt = theElements.begin(); TIDSortedElemSet::iterator eIt = theElements.begin();
for ( ; eIt != theElements.end(); ++eIt ) for ( ; eIt != theElements.end(); ++eIt )
{ {
@ -9339,7 +9339,7 @@ void SMESH_MeshEditor::ConvertFromQuadratic(TIDSortedElemSet& theElements)
// get remaining medium nodes // get remaining medium nodes
TIDSortedNodeSet mediumNodes; TIDSortedNodeSet mediumNodes;
set<int>::iterator nIdsIt = mediumNodeIDs.begin(); set<smIdType>::iterator nIdsIt = mediumNodeIDs.begin();
for ( ; nIdsIt != mediumNodeIDs.end(); ++nIdsIt ) for ( ; nIdsIt != mediumNodeIDs.end(); ++nIdsIt )
if ( const SMDS_MeshNode* n = GetMeshDS()->FindNode( *nIdsIt )) if ( const SMDS_MeshNode* n = GetMeshDS()->FindNode( *nIdsIt ))
mediumNodes.insert( mediumNodes.end(), n ); mediumNodes.insert( mediumNodes.end(), n );
@ -9828,7 +9828,7 @@ SMESH_MeshEditor::SewSideElements (TIDSortedElemSet& theSide1,
if ( aResult != SEW_OK) if ( aResult != SEW_OK)
return aResult; return aResult;
list< int > nodeIDsToRemove; list< smIdType > nodeIDsToRemove;
vector< const SMDS_MeshNode*> nodes; vector< const SMDS_MeshNode*> nodes;
ElemFeatures elemType; ElemFeatures elemType;
@ -11148,7 +11148,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
const SMDS_MeshElement* anElem = *elemItr; const SMDS_MeshElement* anElem = *elemItr;
if (!anElem) if (!anElem)
continue; continue;
int vtkId = anElem->GetVtkID(); vtkIdType vtkId = anElem->GetVtkID();
//MESSAGE(" vtkId " << vtkId << " smdsId " << anElem->GetID()); //MESSAGE(" vtkId " << vtkId << " smdsId " << anElem->GetID());
int neighborsVtkIds[NBMAXNEIGHBORS]; int neighborsVtkIds[NBMAXNEIGHBORS];
int downIds[NBMAXNEIGHBORS]; int downIds[NBMAXNEIGHBORS];
@ -11156,7 +11156,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
int nbNeighbors = grid->GetNeighbors(neighborsVtkIds, downIds, downTypes, vtkId); int nbNeighbors = grid->GetNeighbors(neighborsVtkIds, downIds, downTypes, vtkId);
for (int n = 0; n < nbNeighbors; n++) for (int n = 0; n < nbNeighbors; n++)
{ {
int smdsId = meshDS->FromVtkToSmds(neighborsVtkIds[n]); smIdType smdsId = meshDS->FromVtkToSmds(neighborsVtkIds[n]);
const SMDS_MeshElement* elem = meshDS->FindElement(smdsId); const SMDS_MeshElement* elem = meshDS->FindElement(smdsId);
if (elem && ! domain.count(elem)) // neighbor is in another domain : face is shared if (elem && ! domain.count(elem)) // neighbor is in another domain : face is shared
{ {
@ -11385,7 +11385,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
const TIDSortedElemSet& domain = (idom == iRestDom) ? theRestDomElems : theElems[idom]; const TIDSortedElemSet& domain = (idom == iRestDom) ? theRestDomElems : theElems[idom];
for ( int ivol = 0; ivol < nbvol; ivol++ ) for ( int ivol = 0; ivol < nbvol; ivol++ )
{ {
int smdsId = meshDS->FromVtkToSmds(vtkVolIds[ivol]); smIdType smdsId = meshDS->FromVtkToSmds(vtkVolIds[ivol]);
const SMDS_MeshElement* elem = meshDS->FindElement(smdsId); const SMDS_MeshElement* elem = meshDS->FindElement(smdsId);
if (domain.count(elem)) if (domain.count(elem))
{ {
@ -12241,7 +12241,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
{ {
if (neighborsVtkIds[n]<0) // only smds faces are considered as neighbors here if (neighborsVtkIds[n]<0) // only smds faces are considered as neighbors here
continue; continue;
int smdsId = meshDS->FromVtkToSmds(neighborsVtkIds[n]); smIdType smdsId = meshDS->FromVtkToSmds(neighborsVtkIds[n]);
const SMDS_MeshElement* elem = meshDS->FindElement(smdsId); const SMDS_MeshElement* elem = meshDS->FindElement(smdsId);
if ( shapeIds.count(elem->getshapeId()) && !sgrps->Contains(elem)) // edge : neighbor in the set of shape, not in the group if ( shapeIds.count(elem->getshapeId()) && !sgrps->Contains(elem)) // edge : neighbor in the set of shape, not in the group
{ {

View File

@ -87,7 +87,7 @@ public:
{ {
SMDSAbs_ElementType myType; SMDSAbs_ElementType myType;
bool myIsPoly, myIsQuad; bool myIsPoly, myIsQuad;
int myID; smIdType myID;
double myBallDiameter; double myBallDiameter;
std::vector<int> myPolyhedQuantities; std::vector<int> myPolyhedQuantities;
std::vector<const SMDS_MeshNode*> myNodes; // not managed by ElemFeatures std::vector<const SMDS_MeshNode*> myNodes; // not managed by ElemFeatures
@ -113,7 +113,7 @@ public:
SMESH_EXPORT ElemFeatures& SetPoly(bool isPoly) { myIsPoly = isPoly; return *this; } SMESH_EXPORT ElemFeatures& SetPoly(bool isPoly) { myIsPoly = isPoly; return *this; }
SMESH_EXPORT ElemFeatures& SetQuad(bool isQuad) { myIsQuad = isQuad; return *this; } SMESH_EXPORT ElemFeatures& SetQuad(bool isQuad) { myIsQuad = isQuad; return *this; }
SMESH_EXPORT ElemFeatures& SetID (int ID) { myID = ID; return *this; } SMESH_EXPORT ElemFeatures& SetID (smIdType ID) { myID = ID; return *this; }
}; };
/*! /*!
@ -124,10 +124,10 @@ public:
/*! /*!
* \brief Add element * \brief Add element
*/ */
SMDS_MeshElement* AddElement(const std::vector<int> & nodeIDs, SMDS_MeshElement* AddElement(const std::vector<smIdType> & nodeIDs,
const ElemFeatures& features); const ElemFeatures& features);
int Remove (const std::list< int >& theElemIDs, const bool isNodes); smIdType Remove (const std::list< smIdType >& theElemIDs, const bool isNodes);
// Remove a node or an element. // Remove a node or an element.
// Modify a compute state of sub-meshes which become empty // Modify a compute state of sub-meshes which become empty
@ -501,7 +501,7 @@ public:
// In each group, the cdr of nodes are substituted by the first one // In each group, the cdr of nodes are substituted by the first one
// in all elements. // in all elements.
typedef std::list< std::list< int > > TListOfListOfElementsID; typedef std::list< std::list< smIdType > > TListOfListOfElementsID;
void FindEqualElements(TIDSortedElemSet & theElements, void FindEqualElements(TIDSortedElemSet & theElements,
TListOfListOfElementsID & theGroupsOfElementsID); TListOfListOfElementsID & theGroupsOfElementsID);
@ -735,19 +735,19 @@ public:
/*! /*!
* \brief Convert elements contained in a submesh to quadratic * \brief Convert elements contained in a submesh to quadratic
* \return int - nb of checked elements * \return smIdType - nb of checked elements
*/ */
int convertElemToQuadratic(SMESHDS_SubMesh * theSm, smIdType convertElemToQuadratic(SMESHDS_SubMesh * theSm,
SMESH_MesherHelper& theHelper, SMESH_MesherHelper& theHelper,
const bool theForce3d); const bool theForce3d);
/*! /*!
* \brief Convert quadratic elements to linear ones and remove quadratic nodes * \brief Convert quadratic elements to linear ones and remove quadratic nodes
* \return nb of checked elements * \return nb of checked elements
*/ */
int removeQuadElem( SMESHDS_SubMesh * theSm, smIdType removeQuadElem( SMESHDS_SubMesh * theSm,
SMDS_ElemIteratorPtr theItr, SMDS_ElemIteratorPtr theItr,
const int theShapeID); const int theShapeID);
/*! /*!
* \brief Create groups of elements made during transformation * \brief Create groups of elements made during transformation
* \param nodeGens - nodes making corresponding myLastCreatedNodes * \param nodeGens - nodes making corresponding myLastCreatedNodes

View File

@ -753,7 +753,7 @@ public:
SMESH_MesherHelper (const SMESH_MesherHelper& theOther); SMESH_MesherHelper (const SMESH_MesherHelper& theOther);
// key of a map of bi-quadratic face to it's central node // key of a map of bi-quadratic face to it's central node
struct TBiQuad: public std::pair<int, std::pair<int, int> > struct TBiQuad: public std::pair<smIdType, std::pair<smIdType, smIdType> >
{ {
TBiQuad(const SMDS_MeshNode* n1, TBiQuad(const SMDS_MeshNode* n1,
const SMDS_MeshNode* n2, const SMDS_MeshNode* n2,

View File

@ -4366,7 +4366,7 @@ void SMESH_Pattern::createElements(SMESH_Mesh* theMes
subMesh->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE ); subMesh->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
} }
if ( onMeshElements ) { if ( onMeshElements ) {
list< int > elemIDs; list< smIdType > elemIDs;
for ( size_t i = 0; i < theElements.size(); i++ ) for ( size_t i = 0; i < theElements.size(); i++ )
{ {
subMesh = theMesh->GetSubMeshContaining( shapeIDs[ i ] ); subMesh = theMesh->GetSubMeshContaining( shapeIDs[ i ] );

View File

@ -135,9 +135,9 @@ namespace MeshEditor_I {
{ {
// copy element nodes // copy element nodes
int anElemNbNodes = anElem->NbNodes(); int anElemNbNodes = anElem->NbNodes();
vector< int > anElemNodesID( anElemNbNodes ) ; vector< smIdType > anElemNodesID( anElemNbNodes ) ;
SMDS_ElemIteratorPtr itElemNodes = anElem->nodesIterator(); SMDS_ElemIteratorPtr itElemNodes = anElem->nodesIterator();
for ( int i = 0; itElemNodes->more(); i++) for ( smIdType i = 0; itElemNodes->more(); i++)
{ {
const SMDS_MeshNode* anElemNode = cast2Node( itElemNodes->next() ); const SMDS_MeshNode* anElemNode = cast2Node( itElemNodes->next() );
Copy( anElemNode ); Copy( anElemNode );
@ -787,9 +787,9 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::smIdType_array & IDsOfElements)
SMESH_TRY; SMESH_TRY;
initData(); initData();
list< int > IdList; list< smIdType > IdList;
for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ ) for ( SMESH::smIdType i = 0; i < IDsOfElements.length(); i++ )
IdList.push_back( IDsOfElements[i] ); IdList.push_back( IDsOfElements[i] );
// Update Python script // Update Python script
@ -816,8 +816,8 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::smIdType_array & IDs
SMESH_TRY; SMESH_TRY;
initData(); initData();
list< int > IdList; list< smIdType > IdList;
for ( CORBA::ULong i = 0; i < IDsOfNodes.length(); i++) for ( SMESH::smIdType i = 0; i < IDsOfNodes.length(); i++)
IdList.push_back( IDsOfNodes[i] ); IdList.push_back( IDsOfNodes[i] );
// Update Python script // Update Python script
@ -852,7 +852,7 @@ SMESH::smIdType SMESH_MeshEditor_i::RemoveOrphanNodes()
SMESH::Controls::Filter::GetElementsId( getMeshDS(), predicate, seq ); SMESH::Controls::Filter::GetElementsId( getMeshDS(), predicate, seq );
// remove orphan nodes (if there are any) // remove orphan nodes (if there are any)
list< int > IdList( seq.begin(), seq.end() ); list< smIdType > IdList( seq.begin(), seq.end() );
int nbNodesBefore = myMesh->NbNodes(); int nbNodesBefore = myMesh->NbNodes();
getEditor().Remove( IdList, true ); getEditor().Remove( IdList, true );
@ -4304,10 +4304,10 @@ void SMESH_MeshEditor_i::FindEqualElements(const SMESH::ListOfIDSources& theObj
for (CORBA::Long j = 0; arraysIt != aListOfListOfElementsID.end(); ++arraysIt, ++j) for (CORBA::Long j = 0; arraysIt != aListOfListOfElementsID.end(); ++arraysIt, ++j)
{ {
SMESH::long_array& aGroup = (*theGroupsOfElementsID)[ j ]; SMESH::long_array& aGroup = (*theGroupsOfElementsID)[ j ];
list<int>& listOfIDs = *arraysIt; list<smIdType>& listOfIDs = *arraysIt;
aGroup.length( listOfIDs.size() ); aGroup.length( listOfIDs.size() );
list<int>::iterator idIt = listOfIDs.begin(); list<smIdType>::iterator idIt = listOfIDs.begin();
for (int k = 0; idIt != listOfIDs.end(); ++idIt, ++k ) for (smIdType k = 0; idIt != listOfIDs.end(); ++idIt, ++k )
aGroup[ k ] = *idIt; aGroup[ k ] = *idIt;
} }
@ -4351,11 +4351,11 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& theGrou
for ( CORBA::ULong i = 0; i < theGroupsOfElementsID.length(); i++ ) for ( CORBA::ULong i = 0; i < theGroupsOfElementsID.length(); i++ )
{ {
const SMESH::long_array& anElemsIDGroup = theGroupsOfElementsID[ i ]; const SMESH::long_array& anElemsIDGroup = theGroupsOfElementsID[ i ];
aListOfListOfElementsID.push_back( list< int >() ); aListOfListOfElementsID.push_back( list< smIdType >() );
list< int >& aListOfElemsID = aListOfListOfElementsID.back(); list< smIdType >& aListOfElemsID = aListOfListOfElementsID.back();
for ( CORBA::ULong j = 0; j < anElemsIDGroup.length(); j++ ) for ( SMESH::smIdType j = 0; j < anElemsIDGroup.length(); j++ )
{ {
CORBA::Long id = anElemsIDGroup[ j ]; SMESH::smIdType id = anElemsIDGroup[ j ];
if ( idsToKeep.Contains( id )) aListOfElemsID.push_front( id ); if ( idsToKeep.Contains( id )) aListOfElemsID.push_front( id );
else aListOfElemsID.push_back( id ); else aListOfElemsID.push_back( id );
} }