X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_FaceSide.cxx;h=e474f5bf7f671fbbd5dcd8087bf8b6bdc2f52bff;hb=fd81210cdafee9f9efa8379c394d617a0637aa4c;hp=3e1780299028effdfa56ea4ad8932b119fa9f442;hpb=80933572967cc980a8ee44704f117402f88b6af2;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index 3e1780299..e474f5bf7 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 @@ -6,7 +6,7 @@ // 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. +// 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 @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +52,7 @@ #include #include +#include #include "utilities.h" @@ -150,21 +152,26 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, myMissingVertexNodes = true; // check if the edge has a non-uniform parametrization (issue 0020705) - if ( !myC2d[i].IsNull() && myEdgeLength[i] > DBL_MIN) + if ( !myC2d[i].IsNull() ) { - Geom2dAdaptor_Curve A2dC( myC2d[i], - std::min( myFirst[i], myLast[i] ), - std::max( myFirst[i], myLast[i] )); - double p2 = myFirst[i]+(myLast[i]-myFirst[i])/2., p4 = myFirst[i]+(myLast[i]-myFirst[i])/4.; - double d2 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p2 ); - double d4 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p4 ); - //cout<<"len = "<IsSame( wireEdges.front() )) { + theError = TError + ( new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH,"No nodes on vertices")); + return TSideVector(0); + } } - } } else if ( *nbE > 1 ) // Issue 0020676 (Face_pb_netgen.brep) - several internal edges in a wire {