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
This commit is contained in:
parent
24ddf1ad20
commit
4afca58ce7
|
@ -1894,8 +1894,7 @@ void EAGLE_PLUGIN::packageWire( FOOTPRINT* aFootprint, wxXmlNode* aTree ) const
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: the cap attribute is ignored because KiCad can't create lines
|
||||
// with flat ends.
|
||||
// FIXME: the cap attribute is ignored because KiCad can't create lines with flat ends.
|
||||
FP_SHAPE* dwg;
|
||||
|
||||
if( !w.curve )
|
||||
|
@ -1941,8 +1940,6 @@ void EAGLE_PLUGIN::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree )
|
|||
else if( aFootprint->GetLayer() == B_Cu && m_rules->psBottom != EPAD::UNDEF )
|
||||
shape = m_rules->psBottom;
|
||||
|
||||
pad->SetKeepTopBottom( false ); // TODO: correct? This seems to be KiCad default on import
|
||||
|
||||
pad->SetDrillSize( wxSize( eagleDrillz, eagleDrillz ) );
|
||||
pad->SetLayerSet( LSET::AllCuMask() );
|
||||
|
||||
|
@ -1965,12 +1962,9 @@ void EAGLE_PLUGIN::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree )
|
|||
break;
|
||||
|
||||
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->SetChamferPositions( RECT_CHAMFER_ALL );
|
||||
pad->SetChamferRectRatio( 0.25 );
|
||||
pad->SetChamferRectRatio( 1 - M_SQRT1_2 ); // Regular polygon
|
||||
break;
|
||||
|
||||
case EPAD::LONG:
|
||||
|
@ -2007,8 +2001,7 @@ void EAGLE_PLUGIN::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree )
|
|||
|
||||
if( pad->GetShape() == PAD_SHAPE::OVAL )
|
||||
{
|
||||
// The Eagle "long" pad is wider than it is tall,
|
||||
// m_elongation is percent elongation
|
||||
// The Eagle "long" pad is wider than it is tall; m_elongation is percent elongation
|
||||
VECTOR2I sz = pad->GetSize();
|
||||
sz.x = ( sz.x * ( 100 + m_rules->psElongationLong ) ) / 100;
|
||||
pad->SetSize( sz );
|
||||
|
|
Loading…
Reference in New Issue