{
aParamI ^= 1;
}
+ const bool isClosed = IsClosed();
if (aParamI < 0)
{
aEdge.Orientation(TopAbs_FORWARD);
InsertAfter(aEIt, aEParts[1 - aFirstPI], myEdges);
++aEIt;
}
- else if (aParamI > 0)
+ else
{
- ++aEIt;
+ TopoDS_Edge aNewEdge = ReplaceVertex(aEdge, (aParamI == 0) ? false : true);
+ *aEIt = aNewEdge;
+ if (aParamI > 0)
+ {
+ ++aEIt;
+ }
}
// Calculate the curve parts.
std::list<TopoDS_Edge>::iterator aLastEIt = myEdges.end();
if (aEIt != aFirstEIt && aEIt != aLastEIt)
{
- std::list<TopoDS_Edge>* aEdges = !IsClosed() ? &theCurve.myEdges : &myEdges;
+ std::list<TopoDS_Edge>* aEdges = !isClosed ? &theCurve.myEdges : &myEdges;
aEdges->splice(aEdges->begin(), myEdges, aEIt, aLastEIt);
}
}
for (std::deque<std::list<double> >::const_iterator aLastPLIt =
theParameters.end(); aPLIt != aLastPLIt; ++aPLIt)
{
- const int aSize = aCurves[aCI].myEdges.size();
+ TopoDS_Edge aNextEdge;
+ {
+ std::list<TopoDS_Edge>::iterator aNextEIt = aEIt;
+ ++aNextEIt;
+ if (aNextEIt != aCurves[aCI].myEdges.end())
+ {
+ aNextEdge = *aNextEIt;
+ }
+ }
+
for (Iterator<std::list<double>, std::list<double>::const_iterator> aPIt(
*aPLIt, (aEIt->Orientation() != TopAbs_REVERSED)); aPIt.More(); ++aPIt)
{
aEIt = aCurves[aCI].myEdges.begin();
}
}
- if (aCurves[aCI].myEdges.size() == aSize)
+
+ if (!aNextEdge.IsNull() && !aEIt->IsEqual(aNextEdge))
{
++aEIt;
}