PNS: Fix DP gateway generation when pad distance < gap
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9306
This commit is contained in:
parent
152a583863
commit
8a0f8c329f
|
@ -496,19 +496,13 @@ void DP_GATEWAYS::BuildFromPrimitivePair( const DP_PRIMITIVE_PAIR& aPair, bool a
|
|||
VECTOR2I dir, dp, dv;
|
||||
|
||||
if( k == 0 )
|
||||
{
|
||||
dir = makeGapVector( majorDirection, orthoFanDistance );
|
||||
int d = ( padDist - m_gap );
|
||||
dp = makeGapVector( dir, d );
|
||||
dv = makeGapVector( p0_n - p0_p, d );
|
||||
}
|
||||
else
|
||||
{
|
||||
dir = makeGapVector( majorDirection, diagFanDistance );
|
||||
int d = ( padDist - m_gap );
|
||||
|
||||
int d = std::max( 0, padDist - m_gap );
|
||||
dp = makeGapVector( dir, d );
|
||||
dv = makeGapVector( p0_n - p0_p, d );
|
||||
}
|
||||
|
||||
for( int i = 0; i < 2; i++ )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue