SHAPE_ARC: Fix bug introduced in 5813164d1
.
This fixes the bug exposed in the previous commit. The tests which exposed it now pass and expected failures removed.
This commit is contained in:
parent
183f4fe9a5
commit
d89d0e6b74
|
@ -259,7 +259,7 @@ const SHAPE_LINE_CHAIN SHAPE_ARC::ConvertToPolyline( double aAccuracy ) const
|
||||||
double a = sa;
|
double a = sa;
|
||||||
|
|
||||||
if( n != 0 )
|
if( n != 0 )
|
||||||
a = m_centralAngle * (double) i / (double) n;
|
a += m_centralAngle * (double) i / (double) n;
|
||||||
|
|
||||||
double x = c.x + r * cos( a * M_PI / 180.0 );
|
double x = c.x + r * cos( a * M_PI / 180.0 );
|
||||||
double y = c.y + r * sin( a * M_PI / 180.0 );
|
double y = c.y + r * sin( a * M_PI / 180.0 );
|
||||||
|
|
|
@ -337,10 +337,8 @@ bool ArePolylineMidPointsNearCircle(
|
||||||
return GEOM_TEST::ArePointsNearCircle( points, aCentre, aRad, aTolMidPts );
|
return GEOM_TEST::ArePointsNearCircle( points, aCentre, aRad, aTolMidPts );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_EXPECTED_FAILURES
|
|
||||||
|
|
||||||
// Start and end point check fail for the 3 non-zero radius cases
|
BOOST_AUTO_TEST_CASE( ArcToPolyline )
|
||||||
BOOST_AUTO_TEST_CASE( ArcToPolyline, *boost::unit_test::expected_failures( 3 * 2 ) )
|
|
||||||
{
|
{
|
||||||
const std::vector<ARC_TO_POLYLINE_CASE> cases = {
|
const std::vector<ARC_TO_POLYLINE_CASE> cases = {
|
||||||
{
|
{
|
||||||
|
@ -416,6 +414,5 @@ BOOST_AUTO_TEST_CASE( ArcToPolyline, *boost::unit_test::expected_failures( 3 * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
Loading…
Reference in New Issue