X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_2D_Algo.cxx;h=a2a18202a4ab57903116e98b2ea7a504f9ac1a08;hp=90102e5edd6e4cf2de794c0194b855dd0e3b7d2d;hb=984c4ffdd7df62aeaedc544cd0b8e64ff8f53f1a;hpb=4791f5b30ea7a9c1247aa551750dc71cb83b99aa diff --git a/src/SMESH/SMESH_2D_Algo.cxx b/src/SMESH/SMESH_2D_Algo.cxx index 90102e5ed..a2a18202a 100644 --- a/src/SMESH/SMESH_2D_Algo.cxx +++ b/src/SMESH/SMESH_2D_Algo.cxx @@ -17,7 +17,7 @@ // 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -26,10 +26,10 @@ // Module : SMESH // $Header$ -using namespace std; using namespace std; #include "SMESH_2D_Algo.hxx" #include "SMESH_Gen.hxx" +#include #include "utilities.h" @@ -63,50 +63,6 @@ SMESH_2D_Algo::~SMESH_2D_Algo() */ //============================================================================= -ostream & SMESH_2D_Algo::SaveTo(ostream & save) -{ - return save << this; -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -istream & SMESH_2D_Algo::LoadFrom(istream & load) -{ - return load >> (*this); -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -ostream& operator << (ostream & save, SMESH_2D_Algo & hyp) -{ - return save; -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -istream& operator >> (istream & load, SMESH_2D_Algo & hyp) -{ - return load; -} - -//============================================================================= -/*! - * - */ -//============================================================================= - int SMESH_2D_Algo::NumberOfWires(const TopoDS_Shape& S) { int i = 0; @@ -124,13 +80,14 @@ int SMESH_2D_Algo::NumberOfWires(const TopoDS_Shape& S) int SMESH_2D_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W) { int nbPoints = 0; - for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) - { - const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); - int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes(); - //SCRUTE(nb); - nbPoints += nb +1; // internal points plus 1 vertex of 2 (last point ?) - } - //SCRUTE(nbPoints); + for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) { + const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); + int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes(); + if(_quadraticMesh) + nb = nb/2; + nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?) + } return nbPoints; } + +