fix after BOURCIER Christophe test

This commit is contained in:
eap 2021-04-19 18:01:57 +03:00
parent 3c30ea2bb6
commit 22c97c3bc8
6 changed files with 18 additions and 18 deletions

View File

@ -30,7 +30,7 @@
void SMDS_BallElement::init(const SMDS_MeshNode * node, double diameter ) void SMDS_BallElement::init(const SMDS_MeshNode * node, double diameter )
{ {
vtkIdType nodeVtkID = node->GetVtkID(); vtkIdType nodeVtkID = node->GetVtkID();
int vtkID = getGrid()->InsertNextLinkedCell( toVtkType( SMDSEntity_Ball ), 1, &nodeVtkID ); vtkIdType vtkID = getGrid()->InsertNextLinkedCell( toVtkType( SMDSEntity_Ball ), 1, &nodeVtkID );
setVtkID( vtkID ); setVtkID( vtkID );
getGrid()->SetBallDiameter( GetVtkID(), diameter ); getGrid()->SetBallDiameter( GetVtkID(), diameter );
} }

View File

@ -73,7 +73,7 @@ void SMDS_ElementHolder::beforeCompacting()
else else
{ {
myExternalElems.push_back( e ); myExternalElems.push_back( e );
myVtkIDs.push_back( -1 * (int)myExternalElems.size() ); myVtkIDs.push_back( -1 * (vtkIdType)myExternalElems.size() );
} }
} }
} }

View File

@ -462,7 +462,7 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, int theNbNodes, ... )
va_end( vl ); va_end( vl );
int vtkType = toVtkType( theEntity ); int vtkType = toVtkType( theEntity );
int vtkID = getGrid()->InsertNextLinkedCell( vtkType, theNbNodes, vtkIds ); vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, theNbNodes, vtkIds );
setVtkID( vtkID ); setVtkID( vtkID );
} }
@ -474,7 +474,7 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity,
vtkIds[i] = nodes[i]->GetVtkID(); vtkIds[i] = nodes[i]->GetVtkID();
int vtkType = toVtkType( theEntity ); int vtkType = toVtkType( theEntity );
int vtkID = getGrid()->InsertNextLinkedCell( vtkType, nodes.size(), &vtkIds[0] ); vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, nodes.size(), &vtkIds[0] );
setVtkID( vtkID ); setVtkID( vtkID );
} }
@ -482,7 +482,7 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity,
const std::vector<vtkIdType>& vtkNodeIds ) const std::vector<vtkIdType>& vtkNodeIds )
{ {
int vtkType = toVtkType( theEntity ); int vtkType = toVtkType( theEntity );
int vtkID = getGrid()->InsertNextLinkedCell( vtkType, vtkNodeIds.size(), vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, vtkNodeIds.size(),
const_cast< vtkIdType* > ( &vtkNodeIds[0] )); const_cast< vtkIdType* > ( &vtkNodeIds[0] ));
setVtkID( vtkID ); setVtkID( vtkID );
} }

View File

@ -50,7 +50,7 @@ void SMDS_MeshVolume::init( const std::vector<const SMDS_MeshNode*>& nodes,
ptIds.push_back( nodes[ iN++ ]->GetVtkID() ); 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 ); setVtkID( vtkID );
} }

View File

@ -25,7 +25,7 @@
_GetVtkNodes::_GetVtkNodes( TVtkIdList& vtkIds, _GetVtkNodes::_GetVtkNodes( TVtkIdList& vtkIds,
SMDS_Mesh* mesh, SMDS_Mesh* mesh,
int vtkCellId, vtkIdType vtkCellId,
SMDSAbs_EntityType type ) SMDSAbs_EntityType type )
{ {
vtkUnstructuredGrid* grid = mesh->GetGrid(); vtkUnstructuredGrid* grid = mesh->GetGrid();
@ -47,7 +47,7 @@ _GetVtkNodes::_GetVtkNodes( TVtkIdList& vtkIds,
_GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList& vtkIds, _GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList& vtkIds,
SMDS_Mesh* mesh, SMDS_Mesh* mesh,
int vtkCellId, vtkIdType vtkCellId,
SMDSAbs_EntityType type ) SMDSAbs_EntityType type )
{ {
vtkUnstructuredGrid* grid = mesh->GetGrid(); vtkUnstructuredGrid* grid = mesh->GetGrid();
@ -133,7 +133,7 @@ _GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList& vtkIds,
_GetVtkNodesPolyh::_GetVtkNodesPolyh( TVtkIdList& vtkIds, _GetVtkNodesPolyh::_GetVtkNodesPolyh( TVtkIdList& vtkIds,
SMDS_Mesh* mesh, SMDS_Mesh* mesh,
int vtkCellId, vtkIdType vtkCellId,
SMDSAbs_EntityType type ) SMDSAbs_EntityType type )
{ {
vtkUnstructuredGrid* grid = mesh->GetGrid(); vtkUnstructuredGrid* grid = mesh->GetGrid();

View File

@ -34,15 +34,15 @@ typedef std::vector< vtkIdType > TVtkIdList;
*/ */
struct _GetVtkNodes 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 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 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: public:
typedef typename SMDS_ITERATOR::value_type result_type; 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) : _mesh(mesh), _index(0)
{ {
GET_VTK_NODES getNodes( _vtkIdList, mesh, vtkCellId, aType ); 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; typedef SMDS_VtkCellIterator< SMDS_ITERATOR, _GetVtkNodesToUNV > parent_t;
public: 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 ) {} 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; typedef SMDS_VtkCellIterator< SMDS_ITERATOR, _GetVtkNodesPolyh > parent_t;
public: 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 ) {} parent_t( mesh, vtkCellId, type ) {}
}; };