X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Regular_1D.cxx;h=da5abc3ecb096f0562999b5ecf6d89ec31139633;hb=066f625a46b60642f228a0c10fc6c2dcdc20d304;hp=a7e67cfeb6fc3c1e2db18cd06ef0acb49c57c714;hpb=54f2672f6a599bcec8ad6eb11ac8c01a073cfacd;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index a7e67cfeb..da5abc3ec 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 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 @@ -968,13 +968,13 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, { if ( Abs( param - Un ) < 0.2 * Abs( param - theParams.back() )) { - compensateError( a1, eltSize, U1, Un, theLength, theC3d, theParams ); + compensateError( a1, Abs(eltSize), U1, Un, theLength, theC3d, theParams ); } else if ( Abs( Un - theParams.back() ) < - 0.2 * Abs( theParams.back() - *(--theParams.rbegin()))) + 0.2 * Abs( theParams.back() - *(++theParams.rbegin()))) { theParams.pop_back(); - compensateError( a1, an, U1, Un, theLength, theC3d, theParams ); + compensateError( a1, Abs(an), U1, Un, theLength, theC3d, theParams ); } } if (theReverse) theParams.reverse(); // NPAL18025 @@ -1170,10 +1170,13 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t } if ( !_mainEdge.IsNull() ) { // take into account reversing the edge the hypothesis is propagated from + // (_mainEdge.Orientation() marks mutual orientation of EDGEs in propagation chain) reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED ); - int mainID = meshDS->ShapeToIndex(_mainEdge); - if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end()) - reversed = !reversed; + if ( !_isPropagOfDistribution ) { + int mainID = meshDS->ShapeToIndex(_mainEdge); + if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end()) + reversed = !reversed; + } } // take into account this edge reversing if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), shapeID) != _revEdgesIDs.end())