diff --git a/OSCADSharp/OSCADSharp.UnitTests/Solids/Text3DTests.cs b/OSCADSharp/OSCADSharp.UnitTests/Solids/Text3DTests.cs
index 429593c..a9116ac 100644
--- a/OSCADSharp/OSCADSharp.UnitTests/Solids/Text3DTests.cs
+++ b/OSCADSharp/OSCADSharp.UnitTests/Solids/Text3DTests.cs
@@ -20,12 +20,10 @@ namespace OSCADSharp.UnitTests
}
[TestMethod]
- public void Text_BoundsBasedOnFontSize()
+ [ExpectedException(typeof(NotSupportedException))]
+ public void Text_BoundsNotSupported()
{
- var obj = new Text3D("BBBB", 16);
-
- Assert.AreEqual(new Vector3(32, 8, 0.5), obj.Bounds().TopRight);
- Assert.AreEqual(new Vector3(-32, -8, -0.5), obj.Bounds().BottomLeft);
+ var obj = new Text3D("BBBB", 16).Bounds();
}
}
}
diff --git a/OSCADSharp/OSCADSharp/Solids/Text3D.cs b/OSCADSharp/OSCADSharp/Solids/Text3D.cs
index 180cfd4..888da34 100644
--- a/OSCADSharp/OSCADSharp/Solids/Text3D.cs
+++ b/OSCADSharp/OSCADSharp/Solids/Text3D.cs
@@ -145,18 +145,10 @@ namespace OSCADSharp.Solids
///
/// Returns the approximate boundaries of this OpenSCAD object
- ///
- /// Disclaimer: The bounds for text are particularly inaccurate, since
- /// OSCADSharp doesn't have all font data necessary to calculate the
- /// boundaries for all the possible fonts that could be used
- ///
///
public override Bounds Bounds()
{
- double fontSize = this.Size ?? 8;
- double xAmount = fontSize * this.Text.Length;
-
- return new Bounds(new Vector3(-xAmount/2, -fontSize/2, -.5), new Vector3(xAmount / 2, fontSize / 2, .5));
+ throw new NotSupportedException("Bounds are not supported for objects using Text3D");
}
#endregion
}