Fixed combine and subtract tests

Improved GetLongHashCode for vectors
Make sure CreatHulMesh does not crash on 0 size meshes
Upgraded MIConvexHull
This commit is contained in:
Lars Brubaker 2019-01-15 13:08:41 -08:00
parent 6fd27777e9
commit bc6ef317ad
4 changed files with 10 additions and 5 deletions

View file

@ -86,7 +86,7 @@
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.9.11" />
<PackageReference Include="Markdig" Version="0.15.2" />
<PackageReference Include="MIConvexHull" Version="1.1.17.1019" />
<PackageReference Include="MIConvexHull" Version="1.1.18.1016" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />

@ -1 +1 @@
Subproject commit ded9aeabe383f8a06a53c66219b2ce7fb963477f
Subproject commit abd613e3e82c8af0fa60fed9b5a509af573f3924

@ -1 +1 @@
Subproject commit 7e70801c003906a47ba8e2de31e637c409914ea7
Subproject commit c7f95927d2ded956426acf5ff891d47d9a962cd7

View file

@ -48,7 +48,6 @@ namespace MatterControl.Tests.MatterControl
[Test, Category("InteractiveScene")]
public void CombineTests()
{
return;
AggContext.StaticData = new FileSystemStaticData(TestContext.CurrentContext.ResolveProjectPath(4, "StaticData"));
MatterControlUtilities.OverrideAppDataLocation(TestContext.CurrentContext.ResolveProjectPath(4));
@ -64,6 +63,9 @@ namespace MatterControl.Tests.MatterControl
var cubeA = new CubeObject3D(20, 20, 20);
var cubeB = new CubeObject3D(20, 20, 20);
var offsetCubeB = new TranslateObject3D(cubeB, 10);
Assert.IsTrue(offsetCubeB.GetAxisAlignedBoundingBox().Equals(new AxisAlignedBoundingBox(
0, -10, -10,
20, 10, 10), .001));
var union = new CombineObject3D();
union.Children.Add(cubeA);
@ -71,6 +73,10 @@ namespace MatterControl.Tests.MatterControl
root.Children.Add(union);
union.Combine();
Assert.IsTrue(union.GetAxisAlignedBoundingBox().Equals(new AxisAlignedBoundingBox(
-10, -10, -10,
20, 10, 10), .001));
union.Flatten(null);
Assert.AreEqual(1, root.Children.Count());
@ -264,7 +270,6 @@ namespace MatterControl.Tests.MatterControl
[Test, Category("InteractiveScene")]
public void SubtractTests()
{
return;
// Subtract has correct number of results
{
var root = new Object3D();