Eagle PCB import: rounded rectangle pad support
This commit is contained in:
parent
9d98fe1b80
commit
9d0cd1a188
|
@ -1669,16 +1669,12 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, wxXmlNode* aTree ) const
|
||||||
else if( layer == B_Cu )
|
else if( layer == B_Cu )
|
||||||
pad->SetLayerSet( back );
|
pad->SetLayerSet( back );
|
||||||
|
|
||||||
// Optional according to DTD
|
// Rounded rectangle pads
|
||||||
if( e.roundness ) // set set shape to PAD_SHAPE_RECT above, in case roundness is not present
|
if( e.roundness )
|
||||||
{
|
{
|
||||||
if( *e.roundness >= 75 ) // roundness goes from 0-100% as integer
|
// Eagle uses a different definition of roundness, hence division by 200
|
||||||
{
|
pad->SetRoundRectRadiusRatio( *e.roundness / 200.0 );
|
||||||
if( e.dy == e.dx )
|
pad->SetShape( PAD_SHAPE_ROUNDRECT );
|
||||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
|
||||||
else
|
|
||||||
pad->SetShape( PAD_SHAPE_OVAL );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( e.rot )
|
if( e.rot )
|
||||||
|
|
Loading…
Reference in New Issue