router: remove unused LINE::Is45Degree()

This commit is contained in:
Tomasz Wlostowski 2022-06-07 23:22:01 +02:00
parent dc6c27b686
commit e90ab055b9
2 changed files with 0 additions and 32 deletions

View File

@ -533,36 +533,6 @@ const SHAPE_LINE_CHAIN SEGMENT::Hull( int aClearance, int aWalkaroundThickness,
return SegmentHull( m_seg, aClearance, aWalkaroundThickness );
}
bool LINE::Is45Degree() const
{
for( int i = 0; i < m_line.SegmentCount(); i++ )
{
const SEG& s = m_line.CSegment( i );
if( m_line.IsArcSegment( i ) )
continue;
if( s.Length() < 10 )
continue;
double angle = 180.0 / M_PI *
atan2( (double) s.B.y - (double) s.A.y,
(double) s.B.x - (double) s.A.x );
if( angle < 0 )
angle += 360.0;
double angle_a = fabs( fmod( angle, 45.0 ) );
if( angle_a > 1.0 && angle_a < 44.0 )
return false;
}
return true;
}
const LINE LINE::ClipToNearestObstacle( NODE* aNode ) const
{
const int IterationLimit = 5;

View File

@ -183,8 +183,6 @@ public:
bool Walkaround( const SHAPE_LINE_CHAIN& aObstacle, SHAPE_LINE_CHAIN& aPath, bool aCw ) const;
bool Is45Degree() const;
///< Print out all linked segments.
void ShowLinks() const;