From: eap Date: Mon, 16 Jan 2012 13:53:29 +0000 (+0000) Subject: 0021469: EDF 2074 SMESH: Body fitting algo leads to crash of salome X-Git-Tag: V6_5_0a1~203 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fcf879a78b76fca4f9dd482aadbcc4054ad95454;p=modules%2Fsmesh.git 0021469: EDF 2074 SMESH: Body fitting algo leads to crash of salome fix RemoveExcessIntPoints() --- diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index 9fb64deb3..800a9735d 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -402,10 +402,11 @@ namespace if ( _intPoints.size() < 2 ) return; set< Transition > tranSet; - multiset< IntersectionPoint >::iterator ip2 = _intPoints.begin(), ip1 = ip2++; - for ( ; ip2 != _intPoints.end(); ip1 = ip2++ ) + multiset< IntersectionPoint >::iterator ip1, ip2 = _intPoints.begin(); + while ( ip2 != _intPoints.end() ) { tranSet.clear(); + ip1 = ip2++; while ( ip2->_paramOnLine - ip1->_paramOnLine <= tol && ip2 != _intPoints.end()) { tranSet.insert( ip1->_transition ); @@ -426,7 +427,7 @@ namespace } //================================================================================ /* - * Return "is OUT" state for nodes before the given intersention point + * Return "is OUT" state for nodes before the given intersection point */ bool GridLine::GetIsOutBefore( multiset< IntersectionPoint >::iterator ip, bool prevIsOut ) {