Fix handling of filled circle in eagle importer (was only partly fixed)
Partly fixed in4fc692f04b
, but missed that there is a loadPlain where I need to handle this case as well. (cherry picked from commit5f438b7a85
)
This commit is contained in:
parent
4b01f80e8d
commit
783b1cb611
|
@ -645,12 +645,22 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
||||||
DRAWSEGMENT* dseg = new DRAWSEGMENT( m_board );
|
DRAWSEGMENT* dseg = new DRAWSEGMENT( m_board );
|
||||||
m_board->Add( dseg, ADD_APPEND );
|
m_board->Add( dseg, ADD_APPEND );
|
||||||
|
|
||||||
|
int width = c.width.ToPcbUnits();
|
||||||
|
int radius = c.radius.ToPcbUnits();
|
||||||
|
|
||||||
|
// with == 0 means filled circle
|
||||||
|
if( width <= 0 )
|
||||||
|
{
|
||||||
|
width = radius;
|
||||||
|
radius = radius / 2;
|
||||||
|
}
|
||||||
|
|
||||||
dseg->SetShape( S_CIRCLE );
|
dseg->SetShape( S_CIRCLE );
|
||||||
dseg->SetTimeStamp( EagleTimeStamp( gr ) );
|
dseg->SetTimeStamp( EagleTimeStamp( gr ) );
|
||||||
dseg->SetLayer( layer );
|
dseg->SetLayer( layer );
|
||||||
dseg->SetStart( wxPoint( kicad_x( c.x ), kicad_y( c.y ) ) );
|
dseg->SetStart( wxPoint( kicad_x( c.x ), kicad_y( c.y ) ) );
|
||||||
dseg->SetEnd( wxPoint( kicad_x( c.x + c.radius ), kicad_y( c.y ) ) );
|
dseg->SetEnd( wxPoint( kicad_x( c.x ) + radius, kicad_y( c.y ) ) );
|
||||||
dseg->SetWidth( c.width.ToPcbUnits() );
|
dseg->SetWidth( width );
|
||||||
}
|
}
|
||||||
m_xpath->pop();
|
m_xpath->pop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue