Fixed the code to handle a radius of zero during the curve calculations

This commit is contained in:
John Jenko 2014-01-14 17:28:11 +00:00
parent 581c437861
commit 3ddc7dfd41

View File

@ -1202,7 +1202,7 @@ namespace XYPlots
{ {
double tprime; double tprime;
tprime = FixAngle(thetaa); tprime = FixAngle(thetaa);
if (Math.Abs(tprime - t3) < ANGLELIMIT) if (Math.Abs(tprime - t3) <= ANGLELIMIT)
{ {
MoveTo(pt1.APoint); MoveTo(pt1.APoint);
DrawTo(pt2.APoint, pg, vgOutput); DrawTo(pt2.APoint, pg, vgOutput);
@ -1374,7 +1374,7 @@ namespace XYPlots
//DebugOutput("DrawArc5"); VG_Arc.iColor = 5; //DebugOutput("DrawArc5"); VG_Arc.iColor = 5;
//VG_Arc.iColor = 6; //VG_Arc.iColor = 6;
//#endif //#endif
DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput); if (r2 != 0) DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput);
DebugShowLocation("DrawArc5"); DebugShowLocation("DrawArc5");
} }
//DebugOutput(""); VG_Arc.iColor = 6; //DebugOutput(""); VG_Arc.iColor = 6;