X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_UnstructuredGrid.hxx;h=50fd849351a69050a73ebe098f5b7be0b8eb3fc6;hp=5063adc21762b29c35f778e92a2fbfe6b3351880;hb=a274ade365bd0f0e19d56c577acc4a13aa1972a7;hpb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54 diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index 5063adc21..50fd84935 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.hxx +++ b/src/SMDS/SMDS_UnstructuredGrid.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2014 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,7 +28,6 @@ #include #include -#include "chrono.hxx" #include #include @@ -46,6 +45,14 @@ // allow very huge polyhedrons in tests #define NBMAXNODESINCELL 5000 +// 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; @@ -55,6 +62,7 @@ class SMDS_EXPORT SMDS_CellLinks: public vtkCellLinks { public: void ResizeForPoint(vtkIdType vtkID); + void BuildLinks(vtkDataSet *data, vtkCellArray *Connectivity, vtkUnsignedCharArray* types); static SMDS_CellLinks* New(); protected: SMDS_CellLinks(); @@ -69,15 +77,10 @@ public: int newNodeSize, std::vector& idCellsOldToNew, int newCellSize); - virtual unsigned long GetMTime(); - // OUV_PORTING_VTK6: seems to be useless - //virtual void Update(); - //virtual void UpdateInformation(); + virtual vtkMTimeType GetMTime(); virtual vtkPoints *GetPoints(); - //#ifdef VTK_HAVE_POLYHEDRON int InsertNextLinkedCell(int type, int npts, vtkIdType *pts); - //#endif int CellIdToDownId(int vtkCellId); void setCellIdToDownId(int vtkCellId, int downId); @@ -89,15 +92,15 @@ public: void GetNodeIds(std::set& nodeSet, int downId, unsigned char downType); void ModifyCellNodes(int vtkVolId, std::map localClonedNodeIds); int getOrderedNodesOfFace(int vtkVolId, int& dim, std::vector& orderedNodes); - void BuildLinks(); SMDS_MeshCell* extrudeVolumeFromFace(int vtkVolId, int domain1, int domain2, std::set& originalNodes, std::map >& nodeDomains, std::map >& nodeQuadDomains); - vtkCellLinks* GetLinks() - { - return Links; - } + void BuildLinks(); + void DeleteLinks(); + SMDS_CellLinks* GetLinks(); + bool HasLinks() const { return this->Links; } + SMDS_Downward* getDownArray(unsigned char vtkType) { return _downArray[vtkType]; @@ -113,9 +116,12 @@ 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 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;