diff --git a/pcbnew/router/pns_meander.cpp b/pcbnew/router/pns_meander.cpp index 5e46394367..284aea45fb 100644 --- a/pcbnew/router/pns_meander.cpp +++ b/pcbnew/router/pns_meander.cpp @@ -206,29 +206,9 @@ SHAPE_LINE_CHAIN MEANDER_SHAPE::makeMiterShape( VECTOR2D aP, VECTOR2D aDir, bool { case MEANDER_STYLE_ROUND: { - const int ArcSegments = Settings().m_cornerArcSegments; + VECTOR2D center = aP + dir_v * ( aSide ? -1.0 : 1.0 ); - double radius = (double) aDir.EuclideanNorm(); - double angleStep = M_PI / 2.0 / (double) ArcSegments; - - double correction = 12.0 * radius * ( 1.0 - cos( angleStep / 2.0 ) ); - - if( !m_dual ) - correction = 0.0; - else if( radius < m_meanCornerRadius ) - correction = 0.0; - - VECTOR2D dir_uu = dir_u.Resize( radius - correction ); - VECTOR2D dir_vv = dir_v.Resize( radius - correction ); - - VECTOR2D shift = dir_u.Resize( correction ); - - for( int i = ArcSegments - 1; i >= 0; i-- ) - { - double alpha = (double) i / (double) ( ArcSegments - 1 ) * M_PI / 2.0; - p = aP + shift + dir_uu * cos( alpha ) + dir_vv * ( aSide ? -1.0 : 1.0 ) * ( 1.0 - sin( alpha ) ); - lc.Append( ( int ) p.x, ( int ) p.y ); - } + lc.Append( SHAPE_ARC( center, aP, ( aSide ? -90 : 90 ) ) ); } break; diff --git a/pcbnew/router/pns_meander.h b/pcbnew/router/pns_meander.h index 8e3965bfea..1969a2e68a 100644 --- a/pcbnew/router/pns_meander.h +++ b/pcbnew/router/pns_meander.h @@ -70,7 +70,6 @@ public: m_cornerStyle = MEANDER_STYLE_ROUND; m_cornerRadiusPercentage = 100; m_lengthTolerance = 100000; - m_cornerArcSegments = 8; } ///< Minimum meandering amplitude. @@ -91,8 +90,6 @@ public: int m_cornerRadiusPercentage; ///< Allowable tuning error. int m_lengthTolerance; - ///< Number of line segments for arc approximation. - int m_cornerArcSegments; ///< Target skew value for diff pair de-skewing. int m_targetSkew; };