Eeschema Eagle Import: corrected arc radius size

This commit is contained in:
Maciej Suminski 2017-08-07 11:25:15 +02:00
parent 2a96f26b7e
commit 37445042ed
1 changed files with 4 additions and 2 deletions

View File

@ -1501,7 +1501,8 @@ LIB_ITEM* SCH_EAGLE_PLUGIN::loadSymbolWire( std::unique_ptr< LIB_PART >& aPart,
arc->SetWidth(ewire.width*EUNIT_TO_MIL);
double radius = sqrt( abs( ( (center.x-begin.x)*(center.x-begin.x) ) + ( (center.y-begin.y)*(center.y-begin.y) ) ) );
double radius = sqrt( abs( ( ( center.x - begin.x ) * ( center.x - begin.x ) )
+ ( ( center.y - begin.y ) * ( center.y - begin.y ) ) ) ) * 2;
arc->SetRadius(radius);
arc->CalcRadiusAngles();
@ -1525,7 +1526,8 @@ LIB_ITEM* SCH_EAGLE_PLUGIN::loadSymbolWire( std::unique_ptr< LIB_PART >& aPart,
begin = center + centerStartVector;
end = center + centerEndVector;
radius = sqrt( abs( ( (center.x-begin.x)*(center.x-begin.x) ) + ( (center.y-begin.y)*(center.y-begin.y) ) ) );
radius = sqrt( abs( ( ( center.x - begin.x ) * ( center.x - begin.x ) )
+ ( ( center.y - begin.y ) * ( center.y - begin.y ) ) ) ) * 2;
arc->SetPosition(center);