diff --git a/src/app/tools/drawTools/vtoolcutsplinepath.cpp b/src/app/tools/drawTools/vtoolcutsplinepath.cpp index 7ab4339fd..92678b185 100644 --- a/src/app/tools/drawTools/vtoolcutsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolcutsplinepath.cpp @@ -171,16 +171,7 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString splPath1->append(VSplinePoint(splP1.P(), splP1.KAsm1(), spl1.GetAngle1()+180, spl1.GetKasm1(), spl1.GetAngle1())); VSplinePoint cutPoint; -// if (typeCreation == Source::FromGui) -// { -// cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl1.GetAngle2(), spl2.GetKasm1(), -// spl1.GetAngle2()); -// } -// else -// { - cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl1.GetAngle2(), spl2.GetKasm1(), - spl1.GetAngle2()+180); -// } + cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl1.GetAngle2(), spl2.GetKasm1(), spl1.GetAngle2()+180); splPath1->append(cutPoint); continue; } @@ -200,6 +191,8 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString splPath2->append(splPath->at(i)); } } + splPath1->setKCurve(splPath->getKCurve()); + splPath2->setKCurve(splPath->getKCurve()); splPath1->setMaxCountPoints(splPath->CountPoint()); splPath2->setMaxCountPoints(splPath->CountPoint()); diff --git a/src/app/visualization/vistoolcutsplinepath.cpp b/src/app/visualization/vistoolcutsplinepath.cpp index 59566ac58..fcea7e2ee 100644 --- a/src/app/visualization/vistoolcutsplinepath.cpp +++ b/src/app/visualization/vistoolcutsplinepath.cpp @@ -61,6 +61,7 @@ void VisToolCutSplinePath::RefreshGeometry() QPointF spl1p2, spl1p3, spl2p2, spl2p3; qint32 p1 = 0, p2 = 0; + // TODO make refactoring. CutSplPath repeat twice. Here and in VToolCutSpline. const QPointF cutPoint = splPath->CutSplinePath(length, p1, p2, spl1p2, spl1p3, spl2p2, spl2p3); VPointF p = VPointF(cutPoint); @@ -103,6 +104,9 @@ void VisToolCutSplinePath::RefreshGeometry() } } + spPath1.setKCurve(splPath->getKCurve()); + spPath2.setKCurve(splPath->getKCurve()); + DrawPoint(point, cutPoint, mainColor); DrawPath(splPath1, spPath1.GetPath(PathDirection::Show), Qt::darkGreen, Qt::SolidLine, Qt::RoundCap);