00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // SMESH SMDS : implementation of Salome mesh data structure 00024 // 00025 #ifndef _SMDS_FaceOfEdges_HeaderFile 00026 #define _SMDS_FaceOfEdges_HeaderFile 00027 00028 #include "SMESH_SMDS.hxx" 00029 00030 #include "SMDS_MeshFace.hxx" 00031 #include "SMDS_MeshEdge.hxx" 00032 #include "SMDS_Iterator.hxx" 00033 00034 #include <iostream> 00035 00036 00037 class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace 00038 { 00039 public: 00040 void Print(std::ostream & OS) const; 00041 SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1, 00042 const SMDS_MeshEdge* edge2, 00043 const SMDS_MeshEdge* edge3); 00044 SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1, 00045 const SMDS_MeshEdge* edge2, 00046 const SMDS_MeshEdge* edge3, 00047 const SMDS_MeshEdge* edge4); 00048 00049 SMDSAbs_ElementType GetType() const; 00050 virtual SMDSAbs_EntityType GetEntityType() const; 00051 virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) {return false;}; 00052 int NbNodes() const; 00053 int NbEdges() const; 00054 int NbFaces() const; 00055 // friend bool operator<(const SMDS_FaceOfEdges& e1, const SMDS_FaceOfEdges& e2); 00056 00057 00063 virtual const SMDS_MeshNode* GetNode(const int ind) const; 00064 00065 protected: 00066 SMDS_ElemIteratorPtr 00067 elementsIterator(SMDSAbs_ElementType type) const; 00068 00069 private: 00070 const SMDS_MeshEdge* myEdges[4]; 00071 int myNbEdges; 00072 00073 }; 00074 00075 #endif