Eagle octagonal pads are regular (~29% chamfered).
Also cleans up setting of KeepTopBottom (which is ignored unless
we're doing optional flahing -- which we're not for Eagle imports).
Fixes https://gitlab.com/kicad/code/kicad/issues/11664
(cherry picked from commit 4afca58ce7
)
This commit is contained in:
parent
ab70124b68
commit
781e98acbc
|
@ -1857,8 +1857,7 @@ void EAGLE_PLUGIN::packageWire( FOOTPRINT* aFootprint, wxXmlNode* aTree ) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: the cap attribute is ignored because KiCad can't create lines
|
// FIXME: the cap attribute is ignored because KiCad can't create lines with flat ends.
|
||||||
// with flat ends.
|
|
||||||
FP_SHAPE* dwg;
|
FP_SHAPE* dwg;
|
||||||
|
|
||||||
if( !w.curve )
|
if( !w.curve )
|
||||||
|
@ -1926,12 +1925,9 @@ void EAGLE_PLUGIN::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPAD::OCTAGON:
|
case EPAD::OCTAGON:
|
||||||
// no KiCad octagonal pad shape, use PAD_CIRCLE for now.
|
|
||||||
// pad->SetShape( PAD_OCTAGON );
|
|
||||||
wxASSERT( pad->GetShape() == PAD_SHAPE::CIRCLE ); // verify set in PAD constructor
|
|
||||||
pad->SetShape( PAD_SHAPE::CHAMFERED_RECT );
|
pad->SetShape( PAD_SHAPE::CHAMFERED_RECT );
|
||||||
pad->SetChamferPositions( RECT_CHAMFER_ALL );
|
pad->SetChamferPositions( RECT_CHAMFER_ALL );
|
||||||
pad->SetChamferRectRatio( 0.25 );
|
pad->SetChamferRectRatio( 1 - M_SQRT1_2 ); // Regular polygon
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPAD::LONG:
|
case EPAD::LONG:
|
||||||
|
@ -1968,8 +1964,7 @@ void EAGLE_PLUGIN::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree )
|
||||||
|
|
||||||
if( pad->GetShape() == PAD_SHAPE::OVAL )
|
if( pad->GetShape() == PAD_SHAPE::OVAL )
|
||||||
{
|
{
|
||||||
// The Eagle "long" pad is wider than it is tall,
|
// The Eagle "long" pad is wider than it is tall; m_elongation is percent elongation
|
||||||
// m_elongation is percent elongation
|
|
||||||
wxSize sz = pad->GetSize();
|
wxSize sz = pad->GetSize();
|
||||||
sz.x = ( sz.x * ( 100 + m_rules->psElongationLong ) ) / 100;
|
sz.x = ( sz.x * ( 100 + m_rules->psElongationLong ) ) / 100;
|
||||||
pad->SetSize( sz );
|
pad->SetSize( sz );
|
||||||
|
|
Loading…
Reference in New Issue