parent
0e949432c5
commit
64b5427a15
|
@ -1,3 +1,6 @@
|
||||||
|
# Version 0.6.2 (unreleased)
|
||||||
|
- [#903] Bug in tool Cut Spline path.
|
||||||
|
|
||||||
# Version 0.6.1 October 23, 2018
|
# Version 0.6.1 October 23, 2018
|
||||||
- [#885] Regression. Broken support for multi size measurements.
|
- [#885] Regression. Broken support for multi size measurements.
|
||||||
- Fixed issues with seam allowance.
|
- Fixed issues with seam allowance.
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "vabstractcubicbezierpath.h"
|
#include "vabstractcubicbezierpath.h"
|
||||||
|
#include "vsplinepoint.h"
|
||||||
|
|
||||||
#include <QPainterPath>
|
#include <QPainterPath>
|
||||||
|
|
||||||
|
@ -203,7 +204,38 @@ QPointF VAbstractCubicBezierPath::CutSplinePath(qreal length, qint32 &p1, qint32
|
||||||
{
|
{
|
||||||
p1 = i-1;
|
p1 = i-1;
|
||||||
p2 = i;
|
p2 = i;
|
||||||
return spl.CutSpline(length - (fullLength - splLength), spl1p2, spl1p3, spl2p2, spl2p3);
|
const QPointF point = spl.CutSpline(length - (fullLength - splLength), spl1p2, spl1p3, spl2p2, spl2p3);
|
||||||
|
|
||||||
|
const QVector<VSplinePoint> points = GetSplinePath();
|
||||||
|
|
||||||
|
if (p1 > 0)
|
||||||
|
{
|
||||||
|
const VSplinePoint splP1 = points.at(p1);
|
||||||
|
QLineF line(splP1.P().toQPointF(), spl1p2);
|
||||||
|
if (qFuzzyIsNull(line.length()))
|
||||||
|
{
|
||||||
|
spl1p2.rx() += ToPixel(0.1, Unit::Mm);
|
||||||
|
QLineF line(splP1.P().toQPointF(), spl1p2);
|
||||||
|
line.setLength(ToPixel(0.1, Unit::Mm));
|
||||||
|
line.setAngle(splP1.Angle1()+180);
|
||||||
|
spl1p2 = line.p2();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (p2 < points.size() - 1)
|
||||||
|
{
|
||||||
|
const VSplinePoint splP2 = points.at(p2);
|
||||||
|
QLineF line(splP2.P().toQPointF(), spl2p3);
|
||||||
|
if (qFuzzyIsNull(line.length()))
|
||||||
|
{
|
||||||
|
spl2p3.rx() += ToPixel(0.1, Unit::Mm);
|
||||||
|
QLineF line(splP2.P().toQPointF(), spl2p3);
|
||||||
|
line.setAngle(splP2.Angle2()+180);
|
||||||
|
spl2p3 = line.p2();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return point;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p1 = p2 = -1;
|
p1 = p2 = -1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user