Skip very short segments in MEANDER_SHAPE::forward.

This commit is contained in:
Alex Shvartzkop 2023-10-07 03:41:42 +03:00
parent da5f5536c8
commit e4e769493c
1 changed files with 4 additions and 0 deletions

View File

@ -297,6 +297,10 @@ void MEANDER_SHAPE::start( SHAPE_LINE_CHAIN* aTarget, const VECTOR2D& aWhere, co
void MEANDER_SHAPE::forward( int aLength ) void MEANDER_SHAPE::forward( int aLength )
{ {
// Very small segments cause problems.
if( aLength < 5 )
return;
m_currentPos += m_currentDir.Resize( aLength ); m_currentPos += m_currentDir.Resize( aLength );
m_currentTarget->Append( m_currentPos ); m_currentTarget->Append( m_currentPos );
} }