X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_UnstructuredGrid.hxx;h=774c54e2780ce100982b60448ff76e38da556eb4;hb=1f2c6e16a49021a97ce23ae5c54080b1d5aa073b;hp=2afe37800ecc6863c6c6d8ad40cc20cd2b848a55;hpb=4ac8d075849b2ff7d0934a811dda5b6972873540;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index 2afe37800..774c54e27 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.hxx +++ b/src/SMDS/SMDS_UnstructuredGrid.hxx @@ -1,13 +1,31 @@ -/* - * File: SMDS_UnstructuredGrid.hxx - * Author: prascle - * - * Created on September 16, 2009, 10:28 PM - */ +// 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// File: SMDS_UnstructuredGrid.hxx +// Author: prascle +// Created: September 16, 2009, 10:28 PM #ifndef _SMDS_UNSTRUCTUREDGRID_HXX #define _SMDS_UNSTRUCTUREDGRID_HXX +#include "SMESH_SMDS.hxx" + #include #include #include "chrono.hxx" @@ -30,9 +48,10 @@ 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); @@ -43,13 +62,14 @@ protected: ~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(); @@ -61,17 +81,19 @@ public: 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, 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; @@ -80,6 +102,10 @@ 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: