X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_UnstructuredGrid.hxx;h=89ba29445ea1019e25515112d05eb29e4bdd8ca8;hp=4ea6c64189add089bef00be29d08a6266c12b870;hb=b09372829929f8f561495d6c16527134971a1909;hpb=db78f3625cd06f5ffa06fa137487b7ca2f618e8c diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index 4ea6c6418..89ba29445 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.hxx +++ b/src/SMDS/SMDS_UnstructuredGrid.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -45,13 +46,14 @@ // allow very huge polyhedrons in tests #define NBMAXNODESINCELL 5000 -// Keep compatibility with paraview 5.0.1 -#ifndef VTK_HAS_MTIME_TYPE -#define VTK_HAS_MTIME_TYPE -typedef unsigned long int vtkMTimeType; +// Keep compatibility with paraview 5.0.1 on Linux +#ifndef WIN32 + #ifndef VTK_HAS_MTIME_TYPE + #define VTK_HAS_MTIME_TYPE + typedef unsigned long int vtkMTimeType; + #endif #endif - class SMDS_Downward; class SMDS_Mesh; class SMDS_MeshCell; @@ -72,17 +74,17 @@ class SMDS_EXPORT SMDS_UnstructuredGrid: public vtkUnstructuredGrid { public: void setSMDS_mesh(SMDS_Mesh *mesh); - void compactGrid(std::vector& idNodesOldToNew, - int newNodeSize, - std::vector& idCellsOldToNew, - int newCellSize); + void compactGrid(std::vector& idNodesOldToNew, + smIdType newNodeSize, + std::vector& idCellsOldToNew, + smIdType newCellSize); virtual vtkMTimeType GetMTime(); virtual vtkPoints *GetPoints(); - int InsertNextLinkedCell(int type, int npts, vtkIdType *pts); + vtkIdType InsertNextLinkedCell(int type, int npts, vtkIdType *pts); - int CellIdToDownId(int vtkCellId); - void setCellIdToDownId(int vtkCellId, int downId); + int CellIdToDownId(vtkIdType vtkCellId); + void setCellIdToDownId(vtkIdType vtkCellId, int downId); void CleanDownwardConnectivity(); void BuildDownwardConnectivity(bool withEdges); int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId, bool getSkin=false); @@ -114,10 +116,13 @@ public: protected: SMDS_UnstructuredGrid(); ~SMDS_UnstructuredGrid(); - void copyNodes(vtkPoints *newPoints, std::vector& idNodesOldToNew, int& alreadyCopied, int start, int end); - void copyBloc(vtkUnsignedCharArray *newTypes, std::vector& idCellsOldToNew, std::vector& idNodesOldToNew, - vtkCellArray* newConnectivity, vtkIdTypeArray* newLocations, vtkIdType* pointsCell, int& alreadyCopied, - int start, int end); + void copyNodes(vtkPoints *newPoints, std::vector& idNodesOldToNew, vtkIdType& alreadyCopied, vtkIdType start, vtkIdType end); + void copyBloc(vtkUnsignedCharArray *newTypes, + const std::vector& idCellsOldToNew, + const std::vector& idNodesOldToNew, + vtkCellArray* newConnectivity, + vtkIdTypeArray* newLocations, + std::vector& pointsCell); std::vector _cellIdToDownId; //!< convert vtk Id to downward[vtkType] id, initialized with -1 std::vector _downTypes;