pcbnew: Fix arc track length calculation

This commit is contained in:
Seth Hillbrand 2020-06-11 14:12:23 -07:00
parent f84406009b
commit 951eaa13fe
1 changed files with 5 additions and 3 deletions

View File

@ -313,13 +313,15 @@ public:
/**
* Function GetLength
* returns the length of the arc track using a series of segment approximations.
* returns the length of the arc track
* @return double - the length of the track
*/
virtual double GetLength() const override
{
//TODO(snh): Add proper arc length calc
return GetLineLength( m_Start, m_Mid ) + GetLineLength( m_Mid, m_End );
double radius = GetRadius();
double angle = GetAngle();
return radius * M_PI * angle / 180.0;
}
EDA_ITEM* Clone() const override;