aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs4
-rw-r--r--OpenSim/Region/Physics/Meshing/PrimMesher.cs21
2 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 72dc70f..306eab4 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -269,6 +269,10 @@ namespace OpenSim.Region.Physics.Meshing
269 269
270 primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides); 270 primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides);
271 271
272 if (primMesh.errorMessage != null)
273 if (primMesh.errorMessage.Length > 0)
274 m_log.Error("[ERROR] " + primMesh.errorMessage);
275
272 primMesh.topShearX = pathShearX; 276 primMesh.topShearX = pathShearX;
273 primMesh.topShearY = pathShearY; 277 primMesh.topShearY = pathShearY;
274 primMesh.pathCutBegin = pathBegin; 278 primMesh.pathCutBegin = pathBegin;
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
index 86c9c08..962041b 100644
--- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs
+++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
@@ -29,8 +29,6 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using System.IO; 31using System.IO;
32using log4net;
33using System.Reflection;
34 32
35namespace PrimMesher 33namespace PrimMesher
36{ 34{
@@ -578,9 +576,10 @@ namespace PrimMesher
578 /// </summary> 576 /// </summary>
579 internal class Profile 577 internal class Profile
580 { 578 {
581 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
582 private const float twoPi = 2.0f * (float)Math.PI; 579 private const float twoPi = 2.0f * (float)Math.PI;
583 580
581 internal string errorMessage = null;
582
584 internal List<Coord> coords; 583 internal List<Coord> coords;
585 internal List<Face> faces; 584 internal List<Face> faces;
586 internal List<Coord> vertexNormals; 585 internal List<Coord> vertexNormals;
@@ -646,8 +645,10 @@ namespace PrimMesher
646 try { angles.makeAngles(sides, startAngle, stopAngle); } 645 try { angles.makeAngles(sides, startAngle, stopAngle); }
647 catch (Exception ex) 646 catch (Exception ex)
648 { 647 {
649 m_log.Error("makeAngles failed: Exception: " + ex.ToString()); 648
650 m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString()); 649 errorMessage = "makeAngles failed: Exception: " + ex.ToString()
650 + "\nsides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString();
651
651 return; 652 return;
652 } 653 }
653 654
@@ -666,8 +667,9 @@ namespace PrimMesher
666 try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); } 667 try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); }
667 catch (Exception ex) 668 catch (Exception ex)
668 { 669 {
669 m_log.Error("makeAngles failed: Exception: " + ex.ToString()); 670 errorMessage = "makeAngles failed: Exception: " + ex.ToString()
670 m_log.Error("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString()); 671 + "\nsides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString();
672
671 return; 673 return;
672 } 674 }
673 } 675 }
@@ -1127,6 +1129,7 @@ namespace PrimMesher
1127 1129
1128 public class PrimMesh 1130 public class PrimMesh
1129 { 1131 {
1132 public string errorMessage = "";
1130 private const float twoPi = 2.0f * (float)Math.PI; 1133 private const float twoPi = 2.0f * (float)Math.PI;
1131 1134
1132 public List<Coord> coords; 1135 public List<Coord> coords;
@@ -1314,6 +1317,8 @@ namespace PrimMesher
1314 hollow *= 1.414f; 1317 hollow *= 1.414f;
1315 1318
1316 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, true, calcVertexNormals); 1319 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, true, calcVertexNormals);
1320 this.errorMessage = profile.errorMessage;
1321
1317 this.numPrimFaces = profile.numPrimFaces; 1322 this.numPrimFaces = profile.numPrimFaces;
1318 1323
1319 int cut1Vert = -1; 1324 int cut1Vert = -1;
@@ -1694,6 +1699,8 @@ namespace PrimMesher
1694 needEndFaces = true; 1699 needEndFaces = true;
1695 1700
1696 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, needEndFaces, calcVertexNormals); 1701 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, needEndFaces, calcVertexNormals);
1702 this.errorMessage = profile.errorMessage;
1703
1697 this.numPrimFaces = profile.numPrimFaces; 1704 this.numPrimFaces = profile.numPrimFaces;
1698 1705
1699 int cut1Vert = -1; 1706 int cut1Vert = -1;