From: abk Date: Fri, 10 Jul 2015 14:00:40 +0000 (+0300) Subject: refs #623: Fatal error as result of splitting polyline X-Git-Tag: BR_quadtree_20150925~2^2~4^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=625de8e2fa2e24b21a1b5c74ca6bdf0cec63c2f5;p=modules%2Fhydro.git refs #623: Fatal error as result of splitting polyline The reason of the error - the incorrect cutting of a topological curve by parameters - was corrected. --- diff --git a/src/HYDROData/HYDROData_TopoCurve.cxx b/src/HYDROData/HYDROData_TopoCurve.cxx index 9183b355..86c0cf82 100644 --- a/src/HYDROData/HYDROData_TopoCurve.cxx +++ b/src/HYDROData/HYDROData_TopoCurve.cxx @@ -567,8 +567,9 @@ void HYDROData_TopoCurve::Cut( std::list::iterator aEIt = aCurves[0].myEdges.begin(); std::deque >::const_iterator aPLIt = theParameters.begin(); for (std::deque >::const_iterator aLastPLIt = - theParameters.end(); aPLIt != aLastPLIt; ++aEIt, ++aPLIt) + theParameters.end(); aPLIt != aLastPLIt; ++aPLIt) { + const int aSize = aCurves[aCI].myEdges.size(); for (Iterator, std::list::const_iterator> aPIt( *aPLIt, (aEIt->Orientation() != TopAbs_REVERSED)); aPIt.More(); ++aPIt) { @@ -586,6 +587,10 @@ void HYDROData_TopoCurve::Cut( aEIt = aCurves[aCI].myEdges.begin(); } } + if (aCurves[aCI].myEdges.size() == aSize) + { + ++aEIt; + } } theCurves.push_back(aCurves[aCI]); }