X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_UnstructuredGrid.hxx;h=6cf909263b5f0816926342962623dfc3d0ee8246;hp=f969cab10ce20e0fcb663b462857b3a0980fa8d0;hb=d4a710ce52f6e76786a7b3845e2f7975dc9a00b1;hpb=9f36bbc95a1a1726f938bd0a09bfa734c36ad80e diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index f969cab10..6cf909263 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" @@ -18,7 +36,7 @@ //#define VTK_HAVE_POLYHEDRON //#ifdef VTK_HAVE_POLYHEDRON - #define VTK_MAXTYPE VTK_POLYHEDRON +#define VTK_MAXTYPE VTK_POLYHEDRON //#else // #define VTK_MAXTYPE VTK_QUADRATIC_PYRAMID //#endif @@ -30,8 +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); @@ -42,7 +62,7 @@ protected: ~SMDS_CellLinks(); }; -class SMDS_UnstructuredGrid: public vtkUnstructuredGrid +class SMDS_EXPORT SMDS_UnstructuredGrid: public vtkUnstructuredGrid { public: void setSMDS_mesh(SMDS_Mesh *mesh); @@ -54,26 +74,24 @@ public: virtual void UpdateInformation(); virtual vtkPoints *GetPoints(); -//#ifdef VTK_HAVE_POLYHEDRON + //#ifdef VTK_HAVE_POLYHEDRON int InsertNextLinkedCell(int type, int npts, vtkIdType *pts); -//#endif + //#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 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(); - bool 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;