X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshEdge.cxx;h=d381349414e581a4f9fa3cbec62509994b3a566a;hp=c6d6b787929562c435bb4c8eb35d9a07b3172940;hb=6bac08c1a81f34d3f21c550bd92f83654b2546a5;hpb=4791f5b30ea7a9c1247aa551750dc71cb83b99aa diff --git a/src/SMDS/SMDS_MeshEdge.cxx b/src/SMDS/SMDS_MeshEdge.cxx index c6d6b7879..d38134941 100644 --- a/src/SMDS/SMDS_MeshEdge.cxx +++ b/src/SMDS/SMDS_MeshEdge.cxx @@ -1,74 +1,30 @@ -// SMESH SMDS : implementaion of Salome mesh data structure +// Copyright (C) 2010-2015 CEA/DEN, EDF R&D, OPEN CASCADE // -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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, or (at your option) any later version. // +// 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_MeshEdge.cxx -// Author : Jean-Michel BOULCOURT -// Module : SMESH - -using namespace std; -#include "SMDS_MeshEdge.ixx" -//======================================================================= -//function : SMDS_MeshEdge -//purpose : -//======================================================================= +#include "SMDS_MeshEdge.hxx" -SMDS_MeshEdge::SMDS_MeshEdge(const Standard_Integer ID, - const Standard_Integer idnode1, - const Standard_Integer idnode2) : -SMDS_MeshElement(ID,2,SMDSAbs_Edge) +SMDSAbs_ElementType SMDS_MeshEdge::GetType() const { - SetConnections(idnode1,idnode2); - ComputeKey(); + return SMDSAbs_Edge; } -//======================================================================= -//function : SetConnections -//purpose : -//======================================================================= -void SMDS_MeshEdge::SetConnections(const Standard_Integer idnode1, - const Standard_Integer idnode2) +vtkIdType SMDS_MeshEdge::GetVtkType() const { - Standard_Integer idmin = (idnode1 < idnode2? idnode1 : idnode2); - - myNodes[0] = idmin; - if (idmin == idnode1) { - myNodes[1] = idnode2; - } else { - myNodes[1] = idnode1; - } + return VTK_POLY_VERTEX; // --- must be reimplemented in derived classes } - -//======================================================================= -//function : Print -//purpose : -//======================================================================= - -void SMDS_MeshEdge::Print(Standard_OStream& OS) const -{ - OS << "edge <" << myID <<"> : (" << myNodes[0] << " , " << myNodes[1] << ") " << endl; -} - - - -