From a944ef4947ee4a8999347cd685786786e3774385 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Mon, 30 Jun 2008 02:08:27 +0000 Subject: [PATCH] Corrects meshmerizer profile cut angle orientation for tube type prims --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 161f4e15e1..b770d68fff 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -1580,6 +1580,13 @@ namespace OpenSim.Region.Physics.Meshing Console.WriteLine("Sphere dimple: fProfileBeginAngle: " + fProfileBeginAngle.ToString() + " fProfileEndAngle: " + fProfileEndAngle.ToString()); #endif } + else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) + { // tube cut is offset 45 degrees from other prim types + fProfileBeginAngle += 45.0f; + fProfileEndAngle += 45.0f; + if (fProfileBeginAngle < fProfileEndAngle) + fProfileEndAngle -= 360.0; + } // Note, that we don't want to cut out a triangle, even if this is a // good approximation for small cuts. Indeed we want to cut out an arc