From 482dbcec541e8ec98038a1e1d67bf4c98f3cb5c2 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 22 Mar 2022 13:38:36 -0700 Subject: [PATCH] All triangular trapezoid pads A triangular trapezoid will have the deltaX/deltaY of the same size as the length of that axis. This creates a three-point polygon, which is perfectly valid for our use (cherry picked from commit 4e98ce87c716a0166295ca5ace8b2de4e870e15f) --- pcbnew/dialogs/dialog_pad_properties.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index e4a507cbf8..77a0ca5612 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -1765,25 +1765,25 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( PAD* aPad ) else delta.y = m_trapDelta.GetValue(); - if( delta.x < 0 && delta.x <= -aPad->GetSize().y ) + if( delta.x < 0 && delta.x < -aPad->GetSize().y ) { delta.x = -aPad->GetSize().y + 2; error = true; } - if( delta.x > 0 && delta.x >= aPad->GetSize().y ) + if( delta.x > 0 && delta.x > aPad->GetSize().y ) { delta.x = aPad->GetSize().y - 2; error = true; } - if( delta.y < 0 && delta.y <= -aPad->GetSize().x ) + if( delta.y < 0 && delta.y < -aPad->GetSize().x ) { delta.y = -aPad->GetSize().x + 2; error = true; } - if( delta.y > 0 && delta.y >= aPad->GetSize().x ) + if( delta.y > 0 && delta.y > aPad->GetSize().x ) { delta.y = aPad->GetSize().x - 2; error = true;