X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMDS%2FSMDS_UnstructuredGrid.hxx;h=5936e9759d70ad06f890330e8c93c2cf5be0a93f;hb=ccb5e3c25bf204e839c0094f50f543eacedba5e6;hp=4c1cc7b80934ba768daedd1f73e4287421c11831;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index 4c1cc7b80..5936e9759 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.hxx +++ b/src/SMDS/SMDS_UnstructuredGrid.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2016 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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; @@ -54,8 +61,8 @@ class SMDS_MeshVolume; class SMDS_EXPORT SMDS_CellLinks: public vtkCellLinks { public: - vtkCellLinks::Link* ResizeL(vtkIdType sz); - vtkIdType GetLinksSize(); + void ResizeForPoint(vtkIdType vtkID); + void BuildLinks(vtkDataSet *data, vtkCellArray *Connectivity, vtkUnsignedCharArray* types); static SMDS_CellLinks* New(); protected: SMDS_CellLinks(); @@ -70,34 +77,30 @@ public: int newNodeSize, std::vector& idCellsOldToNew, int newCellSize); - virtual unsigned long GetMTime(); - 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); void CleanDownwardConnectivity(); void BuildDownwardConnectivity(bool withEdges); - int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId); + int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId, bool getSkin=false); int GetParentVolumes(int* volVtkIds, int vtkId); int GetParentVolumes(int* volVtkIds, int downId, unsigned char downType); 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]; @@ -108,6 +111,7 @@ public: static SMDS_UnstructuredGrid* New(); SMDS_Mesh *_mesh; + protected: SMDS_UnstructuredGrid(); ~SMDS_UnstructuredGrid();