From 49f9bd8b68243c7824c8e70de38a62bd856e468d Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Thu, 28 Aug 2008 06:41:32 +0000 Subject: Added some exceptions for bad profile cut parameters --- OpenSim/Region/Physics/Meshing/PrimMesher.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Physics/Meshing') diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 1e4efcb..53cc443 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs @@ -105,6 +105,12 @@ namespace OpenSim.Region.Physics.Meshing { angles = new List(); 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); -- cgit v1.1