Fix a bug in RebuildBezierToSegmentsPointsList.
(cherry picked from commit 9f63820ed4
)
This commit is contained in:
parent
c7a4ea97c3
commit
c11ae8bd02
|
@ -417,11 +417,11 @@ void EDA_SHAPE::RebuildBezierToSegmentsPointsList( int aMinSegLen )
|
||||||
// Ensure last point respects aMinSegLen parameter
|
// Ensure last point respects aMinSegLen parameter
|
||||||
if( m_bezierPoints.size() > 2 )
|
if( m_bezierPoints.size() > 2 )
|
||||||
{
|
{
|
||||||
int idx = m_bezierPoints.size()-1;
|
int idx = m_bezierPoints.size() - 1;
|
||||||
|
|
||||||
if( VECTOR2I( m_bezierPoints[idx] - m_bezierPoints[idx]-1 ).EuclideanNorm() < aMinSegLen )
|
if( VECTOR2I( m_bezierPoints[idx] - m_bezierPoints[idx] - 1 ).EuclideanNorm() < aMinSegLen )
|
||||||
{
|
{
|
||||||
m_bezierPoints[idx]-1 = m_bezierPoints[idx];
|
m_bezierPoints[idx - 1] = m_bezierPoints[idx];
|
||||||
m_bezierPoints.pop_back();
|
m_bezierPoints.pop_back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue