From e90ab055b9293843e544412947503024a3e5865a Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Tue, 7 Jun 2022 23:22:01 +0200 Subject: [PATCH] router: remove unused LINE::Is45Degree() --- pcbnew/router/pns_line.cpp | 30 ------------------------------ pcbnew/router/pns_line.h | 2 -- 2 files changed, 32 deletions(-) diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index 8253943a4b..6ad97e7cb1 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -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; diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h index 7003e03792..1a60c81869 100644 --- a/pcbnew/router/pns_line.h +++ b/pcbnew/router/pns_line.h @@ -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;