Eagle PCB import: code formatting
This commit is contained in:
parent
9d0cd1a188
commit
133b681006
|
@ -127,6 +127,7 @@ void ERULES::parse( wxXmlNode* aRules )
|
||||||
rlMinPadTop = parseEagle( value );
|
rlMinPadTop = parseEagle( value );
|
||||||
else if( name == "rlMaxPadTop" )
|
else if( name == "rlMaxPadTop" )
|
||||||
rlMaxPadTop = parseEagle( value );
|
rlMaxPadTop = parseEagle( value );
|
||||||
|
|
||||||
else if( name == "rvViaOuter" )
|
else if( name == "rvViaOuter" )
|
||||||
value.ToDouble( &rvViaOuter );
|
value.ToDouble( &rvViaOuter );
|
||||||
else if( name == "rlMinViaOuter" )
|
else if( name == "rlMinViaOuter" )
|
||||||
|
@ -1289,7 +1290,6 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, wxXmlNode* aTree ) const
|
||||||
// whereas Pos0 is relative to the module's but is the unrotated coordinate.
|
// whereas Pos0 is relative to the module's but is the unrotated coordinate.
|
||||||
|
|
||||||
wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) );
|
wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) );
|
||||||
|
|
||||||
pad->SetPos0( padpos );
|
pad->SetPos0( padpos );
|
||||||
|
|
||||||
RotatePoint( &padpos, aModule->GetOrientation() );
|
RotatePoint( &padpos, aModule->GetOrientation() );
|
||||||
|
@ -1303,13 +1303,13 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, wxXmlNode* aTree ) const
|
||||||
switch( *e.shape )
|
switch( *e.shape )
|
||||||
{
|
{
|
||||||
case EPAD::ROUND:
|
case EPAD::ROUND:
|
||||||
wxASSERT( pad->GetShape()==PAD_SHAPE_CIRCLE ); // verify set in D_PAD constructor
|
wxASSERT( pad->GetShape() == PAD_SHAPE_CIRCLE ); // verify set in D_PAD constructor
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPAD::OCTAGON:
|
case EPAD::OCTAGON:
|
||||||
// no KiCad octagonal pad shape, use PAD_CIRCLE for now.
|
// no KiCad octagonal pad shape, use PAD_CIRCLE for now.
|
||||||
// pad->SetShape( PAD_OCTAGON );
|
// pad->SetShape( PAD_OCTAGON );
|
||||||
wxASSERT( pad->GetShape()==PAD_SHAPE_CIRCLE ); // verify set in D_PAD constructor
|
wxASSERT( pad->GetShape() == PAD_SHAPE_CIRCLE ); // verify set in D_PAD constructor
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPAD::LONG:
|
case EPAD::LONG:
|
||||||
|
@ -1635,9 +1635,7 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, wxXmlNode* aTree ) const
|
||||||
PCB_LAYER_ID layer = kicad_layer( e.layer );
|
PCB_LAYER_ID layer = kicad_layer( e.layer );
|
||||||
|
|
||||||
if( !IsCopperLayer( layer ) )
|
if( !IsCopperLayer( layer ) )
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
D_PAD* pad = new D_PAD( aModule );
|
D_PAD* pad = new D_PAD( aModule );
|
||||||
aModule->PadsList().PushBack( pad );
|
aModule->PadsList().PushBack( pad );
|
||||||
|
@ -1650,19 +1648,15 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, wxXmlNode* aTree ) const
|
||||||
// whereas Pos0 is relative to the module's but is the unrotated coordinate.
|
// whereas Pos0 is relative to the module's but is the unrotated coordinate.
|
||||||
|
|
||||||
wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) );
|
wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) );
|
||||||
|
|
||||||
pad->SetPos0( padpos );
|
pad->SetPos0( padpos );
|
||||||
|
|
||||||
RotatePoint( &padpos, aModule->GetOrientation() );
|
RotatePoint( &padpos, aModule->GetOrientation() );
|
||||||
|
|
||||||
pad->SetPosition( padpos + aModule->GetPosition() );
|
pad->SetPosition( padpos + aModule->GetPosition() );
|
||||||
|
|
||||||
pad->SetSize( wxSize( e.dx.ToPcbUnits(), e.dy.ToPcbUnits() ) );
|
pad->SetSize( wxSize( e.dx.ToPcbUnits(), e.dy.ToPcbUnits() ) );
|
||||||
|
|
||||||
pad->SetLayer( layer );
|
pad->SetLayer( layer );
|
||||||
|
|
||||||
static const LSET front( 3, F_Cu, F_Paste, F_Mask );
|
const LSET front( 3, F_Cu, F_Paste, F_Mask );
|
||||||
static const LSET back( 3, B_Cu, B_Paste, B_Mask );
|
const LSET back( 3, B_Cu, B_Paste, B_Mask );
|
||||||
|
|
||||||
if( layer == F_Cu )
|
if( layer == F_Cu )
|
||||||
pad->SetLayerSet( front );
|
pad->SetLayerSet( front );
|
||||||
|
|
|
@ -46,6 +46,7 @@ struct ERULES
|
||||||
|
|
||||||
int psElongationOffset; ///< the offset of the hole within the "long" pad.
|
int psElongationOffset; ///< the offset of the hole within the "long" pad.
|
||||||
|
|
||||||
|
|
||||||
double rvPadTop; ///< top pad size as percent of drill size
|
double rvPadTop; ///< top pad size as percent of drill size
|
||||||
// double rvPadBottom; ///< bottom pad size as percent of drill size
|
// double rvPadBottom; ///< bottom pad size as percent of drill size
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue