Added some exceptions for bad profile cut parameters

0.6.0-stable
Dahlia Trimble 2008-08-28 06:41:32 +00:00
parent 53f78a1087
commit 49f9bd8b68
1 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,12 @@ namespace OpenSim.Region.Physics.Meshing
{
angles = new List<Angle>();
double twoPi = System.Math.PI * 2.0;
if (sides < 1)
throw new Exception("number of sides not greater than zero");
if (stopAngle <= startAngle)
throw new Exception("stopAngle not greater than startAngle");
double stepSize = twoPi / sides;
int startStep = (int) (startAngle / stepSize);