From: eap Date: Mon, 19 Apr 2021 15:01:57 +0000 (+0300) Subject: fix after BOURCIER Christophe test X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fvuzlov%2F20256;p=modules%2Fsmesh.git fix after BOURCIER Christophe test --- diff --git a/src/SMDS/SMDS_BallElement.cxx b/src/SMDS/SMDS_BallElement.cxx index 1b912adc8..5315eeb3f 100644 --- a/src/SMDS/SMDS_BallElement.cxx +++ b/src/SMDS/SMDS_BallElement.cxx @@ -30,7 +30,7 @@ void SMDS_BallElement::init(const SMDS_MeshNode * node, double diameter ) { vtkIdType nodeVtkID = node->GetVtkID(); - int vtkID = getGrid()->InsertNextLinkedCell( toVtkType( SMDSEntity_Ball ), 1, &nodeVtkID ); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell( toVtkType( SMDSEntity_Ball ), 1, &nodeVtkID ); setVtkID( vtkID ); getGrid()->SetBallDiameter( GetVtkID(), diameter ); } diff --git a/src/SMDS/SMDS_ElementHolder.cxx b/src/SMDS/SMDS_ElementHolder.cxx index 1f06ff5aa..d5e40d6a6 100644 --- a/src/SMDS/SMDS_ElementHolder.cxx +++ b/src/SMDS/SMDS_ElementHolder.cxx @@ -73,7 +73,7 @@ void SMDS_ElementHolder::beforeCompacting() else { myExternalElems.push_back( e ); - myVtkIDs.push_back( -1 * (int)myExternalElems.size() ); + myVtkIDs.push_back( -1 * (vtkIdType)myExternalElems.size() ); } } } diff --git a/src/SMDS/SMDS_MeshCell.cxx b/src/SMDS/SMDS_MeshCell.cxx index 2cec46a8c..4096b1f38 100644 --- a/src/SMDS/SMDS_MeshCell.cxx +++ b/src/SMDS/SMDS_MeshCell.cxx @@ -461,8 +461,8 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, int theNbNodes, ... ) } va_end( vl ); - int vtkType = toVtkType( theEntity ); - int vtkID = getGrid()->InsertNextLinkedCell( vtkType, theNbNodes, vtkIds ); + int vtkType = toVtkType( theEntity ); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, theNbNodes, vtkIds ); setVtkID( vtkID ); } @@ -473,8 +473,8 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, for ( size_t i = 0; i < nodes.size(); ++i ) vtkIds[i] = nodes[i]->GetVtkID(); - int vtkType = toVtkType( theEntity ); - int vtkID = getGrid()->InsertNextLinkedCell( vtkType, nodes.size(), &vtkIds[0] ); + int vtkType = toVtkType( theEntity ); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, nodes.size(), &vtkIds[0] ); setVtkID( vtkID ); } @@ -482,8 +482,8 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, const std::vector& vtkNodeIds ) { int vtkType = toVtkType( theEntity ); - int vtkID = getGrid()->InsertNextLinkedCell( vtkType, vtkNodeIds.size(), - const_cast< vtkIdType* > ( &vtkNodeIds[0] )); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, vtkNodeIds.size(), + const_cast< vtkIdType* > ( &vtkNodeIds[0] )); setVtkID( vtkID ); } diff --git a/src/SMDS/SMDS_MeshVolume.cxx b/src/SMDS/SMDS_MeshVolume.cxx index 67b3c773d..e24f18b66 100644 --- a/src/SMDS/SMDS_MeshVolume.cxx +++ b/src/SMDS/SMDS_MeshVolume.cxx @@ -50,7 +50,7 @@ void SMDS_MeshVolume::init( const std::vector& nodes, ptIds.push_back( nodes[ iN++ ]->GetVtkID() ); } - int vtkID = getGrid()->InsertNextLinkedCell(VTK_POLYHEDRON, nbFaces, &ptIds[0]); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell(VTK_POLYHEDRON, nbFaces, &ptIds[0]); setVtkID( vtkID ); } diff --git a/src/SMDS/SMDS_VtkCellIterator.cxx b/src/SMDS/SMDS_VtkCellIterator.cxx index 87e4830c3..15fc994ac 100644 --- a/src/SMDS/SMDS_VtkCellIterator.cxx +++ b/src/SMDS/SMDS_VtkCellIterator.cxx @@ -25,7 +25,7 @@ _GetVtkNodes::_GetVtkNodes( TVtkIdList& vtkIds, SMDS_Mesh* mesh, - int vtkCellId, + vtkIdType vtkCellId, SMDSAbs_EntityType type ) { vtkUnstructuredGrid* grid = mesh->GetGrid(); @@ -47,7 +47,7 @@ _GetVtkNodes::_GetVtkNodes( TVtkIdList& vtkIds, _GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList& vtkIds, SMDS_Mesh* mesh, - int vtkCellId, + vtkIdType vtkCellId, SMDSAbs_EntityType type ) { vtkUnstructuredGrid* grid = mesh->GetGrid(); @@ -133,7 +133,7 @@ _GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList& vtkIds, _GetVtkNodesPolyh::_GetVtkNodesPolyh( TVtkIdList& vtkIds, SMDS_Mesh* mesh, - int vtkCellId, + vtkIdType vtkCellId, SMDSAbs_EntityType type ) { vtkUnstructuredGrid* grid = mesh->GetGrid(); diff --git a/src/SMDS/SMDS_VtkCellIterator.hxx b/src/SMDS/SMDS_VtkCellIterator.hxx index 683f678a2..808411483 100644 --- a/src/SMDS/SMDS_VtkCellIterator.hxx +++ b/src/SMDS/SMDS_VtkCellIterator.hxx @@ -34,15 +34,15 @@ typedef std::vector< vtkIdType > TVtkIdList; */ struct _GetVtkNodes { - _GetVtkNodes( TVtkIdList& nodeIds, SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType type); + _GetVtkNodes( TVtkIdList& nodeIds, SMDS_Mesh* mesh, vtkIdType vtkCellId, SMDSAbs_EntityType type); }; struct _GetVtkNodesToUNV { - _GetVtkNodesToUNV( TVtkIdList& nodeIds, SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType type); + _GetVtkNodesToUNV( TVtkIdList& nodeIds, SMDS_Mesh* mesh, vtkIdType vtkCellId, SMDSAbs_EntityType type); }; struct _GetVtkNodesPolyh { - _GetVtkNodesPolyh( TVtkIdList& nodeIds, SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType type); + _GetVtkNodesPolyh( TVtkIdList& nodeIds, SMDS_Mesh* mesh, vtkIdType vtkCellId, SMDSAbs_EntityType type); }; //-------------------------------------------------------------------------------- @@ -55,7 +55,7 @@ class SMDS_VtkCellIterator: public SMDS_ITERATOR public: typedef typename SMDS_ITERATOR::value_type result_type; - SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType aType) + SMDS_VtkCellIterator(SMDS_Mesh* mesh, vtkIdType vtkCellId, SMDSAbs_EntityType aType) : _mesh(mesh), _index(0) { GET_VTK_NODES getNodes( _vtkIdList, mesh, vtkCellId, aType ); @@ -78,7 +78,7 @@ class SMDS_VtkCellIteratorToUNV: public SMDS_VtkCellIterator< SMDS_ITERATOR, _Ge { typedef SMDS_VtkCellIterator< SMDS_ITERATOR, _GetVtkNodesToUNV > parent_t; public: - SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType type): + SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, vtkIdType vtkCellId, SMDSAbs_EntityType type): parent_t( mesh, vtkCellId, type ) {} }; @@ -88,7 +88,7 @@ class SMDS_VtkCellIteratorPolyH: public SMDS_VtkCellIterator< SMDS_ITERATOR, _Ge { typedef SMDS_VtkCellIterator< SMDS_ITERATOR, _GetVtkNodesPolyh > parent_t; public: - SMDS_VtkCellIteratorPolyH(SMDS_Mesh* mesh, int vtkCellId, SMDSAbs_EntityType type): + SMDS_VtkCellIteratorPolyH(SMDS_Mesh* mesh, vtkIdType vtkCellId, SMDSAbs_EntityType type): parent_t( mesh, vtkCellId, type ) {} };