diff --git a/pcbnew/drc/drc_test_provider_library_parity.cpp b/pcbnew/drc/drc_test_provider_library_parity.cpp index 61484c22b8..ceacce57c4 100644 --- a/pcbnew/drc/drc_test_provider_library_parity.cpp +++ b/pcbnew/drc/drc_test_provider_library_parity.cpp @@ -266,8 +266,8 @@ bool padNeedsUpdate( const PAD* a, const PAD* b, REPORTER* aReporter ) wxString::Format( _( "%s fabrication property differs." ), PAD_DESC( a ) ) ); // The pad orientation, for historical reasons is the pad rotation + parent rotation. - TEST_D( ( a->GetOrientation() - a->GetParentFootprint()->GetOrientation() ).Normalize().AsDegrees(), - ( b->GetOrientation() - b->GetParentFootprint()->GetOrientation() ).Normalize().AsDegrees(), + TEST_D( a->GetFPRelativeOrientation().Normalize().AsDegrees(), + b->GetFPRelativeOrientation().Normalize().AsDegrees(), wxString::Format( _( "%s orientation differs." ), PAD_DESC( a ) ) ); TEST( a->GetSize(), b->GetSize(), @@ -275,27 +275,14 @@ bool padNeedsUpdate( const PAD* a, const PAD* b, REPORTER* aReporter ) TEST( a->GetDelta(), b->GetDelta(), wxString::Format( _( "%s trapezoid delta differs." ), PAD_DESC( a ) ) ); - if( a->GetRoundRectCornerRadius() != b->GetRoundRectCornerRadius() - || a->GetRoundRectRadiusRatio() != b->GetRoundRectRadiusRatio() ) - { - diff = true; + TEST_D( a->GetRoundRectRadiusRatio(), b->GetRoundRectRadiusRatio(), + wxString::Format( _( "%s rounded corners differ." ), PAD_DESC( a ) ) ); - if( aReporter ) - aReporter->Report( wxString::Format( _( "%s rounded corners differ." ), PAD_DESC( a ) ) ); - else - return true; - } + TEST_D( a->GetChamferRectRatio(), b->GetChamferRectRatio(), + wxString::Format( _( "%s chamfered corner sizes differ." ), PAD_DESC( a ) ) ); - if( a->GetChamferRectRatio() != b->GetChamferRectRatio() - || a->GetChamferPositions() != b->GetChamferPositions() ) - { - diff = true; - - if( aReporter ) - aReporter->Report( wxString::Format( _( "%s chamfered corners differ." ), PAD_DESC( a ) ) ); - else - return true; - } + TEST( a->GetChamferPositions(), b->GetChamferPositions(), + wxString::Format( _( "%s chamfered corners differ." ), PAD_DESC( a ) ) ); TEST_PT( a->GetOffset(), b->GetOffset(), wxString::Format( _( "%s shape offset from hole differs." ), PAD_DESC( a ) ) ); diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index 56e5bfc27f..1fac7ce53f 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -719,7 +719,7 @@ void PAD::SetFPRelativeOrientation( const EDA_ANGLE& aAngle ) } -EDA_ANGLE PAD::GetFPRelativeOrientation() +EDA_ANGLE PAD::GetFPRelativeOrientation() const { if( FOOTPRINT* parentFP = GetParentFootprint() ) return GetOrientation() - parentFP->GetOrientation(); diff --git a/pcbnew/pad.h b/pcbnew/pad.h index e0b78e7bf6..247cc34314 100644 --- a/pcbnew/pad.h +++ b/pcbnew/pad.h @@ -340,7 +340,7 @@ public: * Return the rotation angle of the pad. */ EDA_ANGLE GetOrientation() const { return m_orient; } - EDA_ANGLE GetFPRelativeOrientation(); + EDA_ANGLE GetFPRelativeOrientation() const; // For property system void SetOrientationDegrees( double aOrientation )