Sync changes from upstream repository

This commit is contained in:
Bozo the Builder
2024-04-11 06:51:54 -07:00
parent 9a4f7435dd
commit 56a6ee60fa
22 changed files with 66 additions and 3072 deletions

View File

@@ -38,21 +38,16 @@ bool ON_Polyline::IsValid( double tolerance ) const
{
for ( i = 1; rc && i < m_count; i++ )
{
if (false == m_a[i].IsValid() || false == m_a[i-1].IsValid())
rc = false;
else if ( m_a[i].DistanceTo(m_a[i-1]) <= tolerance )
if ( m_a[i].DistanceTo(m_a[i-1]) <= tolerance )
rc = false;
}
if ( rc && m_count < 4 && m_a[0].DistanceTo(m_a[m_count-1]) <= tolerance )
rc = false;
}
else
{
else {
for ( i = 1; rc && i < m_count && rc; i++ )
{
if (false == m_a[i].IsValid() || false == m_a[i - 1].IsValid())
rc = false;
else if ( m_a[i] == m_a[i-1] )
if ( m_a[i] == m_a[i-1] )
rc = false;
}
if ( rc && m_count < 4 && m_a[0] == m_a[m_count-1] )