X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_Mesh.hxx;h=4c1398fef9a982bd7fdd9bc9cd272dd3f42c1c07;hb=f4ba12e4603932bf250717988519db4dedce4b28;hp=dac69c0204b0eee73a462d9c4124cf198e420640;hpb=79b1ac2b6df9117f16f11d444b1f165d477a1813;p=modules%2Fsmesh.git diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index dac69c020..4c1398fef 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -1,29 +1,28 @@ -// SMESH SMESHDS : management of mesh data and SMESH document +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 +// 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 +// +// SMESH SMESHDS : management of mesh data and SMESH document // File : SMESHDS_Mesh.hxx // Module : SMESH - +// #ifndef _SMESHDS_Mesh_HeaderFile #define _SMESHDS_Mesh_HeaderFile @@ -31,6 +30,7 @@ #include "SMDS_Mesh.hxx" #include "SMDS_MeshNode.hxx" +#include "SMDS_Mesh0DElement.hxx" #include "SMDS_MeshEdge.hxx" #include "SMDS_MeshFace.hxx" #include "SMDS_MeshVolume.hxx" @@ -67,7 +67,11 @@ public: bool RemoveHypothesis(const TopoDS_Shape & S, const SMESHDS_Hypothesis * H); virtual SMDS_MeshNode* AddNodeWithID(double x, double y, double z, int ID); - virtual SMDS_MeshNode * AddNode(double x, double y, double z); + virtual SMDS_MeshNode* AddNode(double x, double y, double z); + + virtual SMDS_Mesh0DElement* Add0DElementWithID(int nodeID, int ID); + virtual SMDS_Mesh0DElement* Add0DElementWithID(const SMDS_MeshNode * node, int ID); + virtual SMDS_Mesh0DElement* Add0DElement (const SMDS_MeshNode * node); virtual SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int ID); virtual SMDS_MeshEdge* AddEdgeWithID(const SMDS_MeshNode * n1, @@ -379,8 +383,10 @@ public: * Methods do not work for meshes with descendants. * Implemented for fast cleaning of meshes. */ - void RemoveFreeNode(const SMDS_MeshNode *, SMESHDS_SubMesh *); - void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *); + void RemoveFreeNode (const SMDS_MeshNode *, SMESHDS_SubMesh *, bool fromGroups=true); + void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *, bool fromGroups=true); + + void ClearMesh(); bool ChangeElementNodes(const SMDS_MeshElement * elem, const SMDS_MeshNode * nodes[], @@ -438,9 +444,9 @@ private: void addNodeToSubmesh( const SMDS_MeshNode* aNode, int Index ) { //Update or build submesh - map::iterator it = myShapeIndexToSubMesh.find( Index ); + std::map::iterator it = myShapeIndexToSubMesh.find( Index ); if ( it == myShapeIndexToSubMesh.end() ) - it = myShapeIndexToSubMesh.insert( make_pair(Index, new SMESHDS_SubMesh() )).first; + it = myShapeIndexToSubMesh.insert( std::make_pair(Index, new SMESHDS_SubMesh() )).first; it->second->AddNode( aNode ); // add aNode to submesh }