geometry: SHAPE_LINE_CHAIN::Simplify() now correctly simplifies last 3 colinear vertices
This commit is contained in:
parent
028f209126
commit
f7f5e67f56
|
@ -1019,17 +1019,17 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify( bool aRemoveColinear )
|
|||
|| SEG( p0, p1 ).Collinear( SEG( p1, pts_unique[n + 2] ) ) ) )
|
||||
n++;
|
||||
}
|
||||
|
||||
|
||||
m_points.push_back( p0 );
|
||||
m_shapes.push_back( shapes_unique[i] );
|
||||
|
||||
if( n > i )
|
||||
i = n;
|
||||
|
||||
if( n == np )
|
||||
if( n == np - 2 )
|
||||
{
|
||||
m_points.push_back( pts_unique[n - 1] );
|
||||
m_shapes.push_back( shapes_unique[n - 1] );
|
||||
m_points.push_back( pts_unique[np - 1] );
|
||||
m_shapes.push_back( shapes_unique[np - 1] );
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue