X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_UnstructuredGrid.hxx;h=4cd1dae371aefb52bae9e7af4b2397d098548efd;hb=20c126bc220757c06b5576f71ed6f34ae85e3e40;hp=02bbf5f85446d4da6564b636d652dec91d670724;hpb=2c607013a23bd4e7ba07e72e0c04dee2c1209cff;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index 02bbf5f85..4cd1dae37 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.hxx +++ b/src/SMDS/SMDS_UnstructuredGrid.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2011 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2012 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 @@ -24,6 +24,8 @@ #ifndef _SMDS_UNSTRUCTUREDGRID_HXX #define _SMDS_UNSTRUCTUREDGRID_HXX +#include "SMESH_SMDS.hxx" + #include #include #include "chrono.hxx" @@ -46,26 +48,27 @@ class SMDS_Downward; class SMDS_Mesh; +class SMDS_MeshCell; class SMDS_MeshVolume; -class SMDS_CellLinks: public vtkCellLinks +class SMDS_EXPORT SMDS_CellLinks: public vtkCellLinks { public: - vtkCellLinks::Link* ResizeL(vtkIdType sz); - vtkIdType GetLinksSize(); + void ResizeForPoint(vtkIdType vtkID); static SMDS_CellLinks* New(); protected: SMDS_CellLinks(); ~SMDS_CellLinks(); }; -class SMDS_UnstructuredGrid: public vtkUnstructuredGrid +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, + int newNodeSize, + std::vector& idCellsOldToNew, + int newCellSize); virtual unsigned long GetMTime(); virtual void Update(); virtual void UpdateInformation(); @@ -79,16 +82,17 @@ public: 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, std::vector& orderedNodes); + int getOrderedNodesOfFace(int vtkVolId, int& dim, std::vector& orderedNodes); void BuildLinks(); - SMDS_MeshVolume* extrudeVolumeFromFace(int vtkVolId, int domain1, int domain2, std::set& originalNodes, - std::map >& nodeDomains, - std::map >& nodeQuadDomains); + SMDS_MeshCell* extrudeVolumeFromFace(int vtkVolId, int domain1, int domain2, + std::set& originalNodes, + std::map >& nodeDomains, + std::map >& nodeQuadDomains); vtkCellLinks* GetLinks() { return Links; @@ -97,8 +101,13 @@ public: { return _downArray[vtkType]; } + void AllocateDiameters( vtkIdType maxVtkID ); + void SetBallDiameter( vtkIdType vtkID, double diameter ); + double GetBallDiameter( vtkIdType vtkID ) const; + static SMDS_UnstructuredGrid* New(); SMDS_Mesh *_mesh; + protected: SMDS_UnstructuredGrid(); ~SMDS_UnstructuredGrid();