Handle non-cardinal major-axis arcs when importing DXF.
(cherry picked from commit a946f7ab1b
)
This commit is contained in:
parent
bfdbf969c2
commit
82ed223b02
|
@ -601,7 +601,9 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
|
||||||
if( startAngle > endAngle )
|
if( startAngle > endAngle )
|
||||||
endAngle += ANGLE_360;
|
endAngle += ANGLE_360;
|
||||||
|
|
||||||
// TODO: testcases for negative extrusion vector; handle it here
|
// Angles are relative to major axis
|
||||||
|
startAngle -= EDA_ANGLE( major );
|
||||||
|
endAngle -= EDA_ANGLE( major );
|
||||||
|
|
||||||
if( aData.ratio == 1.0 )
|
if( aData.ratio == 1.0 )
|
||||||
{
|
{
|
||||||
|
@ -622,6 +624,8 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: testcases for negative extrusion vector; handle it here
|
||||||
|
|
||||||
std::vector<BEZIER<double>> splines;
|
std::vector<BEZIER<double>> splines;
|
||||||
ELLIPSE<double> ellipse( center, major, aData.ratio, startAngle, endAngle );
|
ELLIPSE<double> ellipse( center, major, aData.ratio, startAngle, endAngle );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue