From 625de8e2fa2e24b21a1b5c74ca6bdf0cec63c2f5 Mon Sep 17 00:00:00 2001 From: abk Date: Fri, 10 Jul 2015 17:00:40 +0300 Subject: [PATCH] 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. --- src/HYDROData/HYDROData_TopoCurve.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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]); } -- 2.39.2