public void SquareInCircle_ReturnsTrue() { List <Brep> TestEnv = BrepFactory.SquareInCircle(); bool result = Logic.Relationships.Confirm.RegionsIntersect(TestEnv[0], TestEnv[1]); Assert.IsTrue(result); }
public void SquareInCircle_SelectsOne() { List <Brep> TestEnv = BrepFactory.SquareInCircle(); Brep testSquare = TestEnv[0]; Brep testCircle = TestEnv[1]; List <Brep> allRegions = Breps.SplitTwoBreps(testCircle, testSquare); List <Brep> resultGeometry = Logic.Relationships.Select.FloorFromCore(allRegions, testSquare); Assert.AreEqual(resultGeometry.Count, 1); }
public void SquareInCircle_SelectsOne() { List <Brep> TestEnv = BrepFactory.SquareInCircle(); List <Brep> testSquare = new List <Brep>(); testSquare.Add(TestEnv[0]); List <Brep> testCircle = new List <Brep>(); testCircle.Add(TestEnv[1]); List <Brep> resultGeometry = Logic.Relationships.Select.NotExemptRegions(testCircle, testSquare); Assert.AreEqual(resultGeometry.Count, 1); }
public void SquareInCircle_SelectsCircle() { List <Brep> TestEnv = BrepFactory.SquareInCircle(); List <Brep> testSquare = new List <Brep>(); testSquare.Add(TestEnv[0]); List <Brep> testCircle = new List <Brep>(); testCircle.Add(TestEnv[1]); List <Brep> resultGeometry = Logic.Relationships.Select.NotExemptRegions(testCircle, testSquare); bool result = (resultGeometry[0].GetArea() > TestEnv[0].GetArea()) ? true : false; Assert.IsTrue(result); }
public void SquareInCircle_NotCore() { List <Brep> TestEnv = BrepFactory.SquareInCircle(); Brep testSquare = TestEnv[0]; Brep testCircle = TestEnv[1]; List <Brep> allRegions = Breps.SplitTwoBreps(testCircle, testSquare); List <Brep> resultGeometry = Logic.Relationships.Select.FloorFromCore(allRegions, testSquare); double resultArea = resultGeometry[0].GetArea(); double profileArea = testCircle.GetArea(); double coreArea = testSquare.GetArea(); double difference = (profileArea - coreArea) - resultArea; bool tolerated = (difference < 0.01) ? true : false; Assert.IsTrue(tolerated); }
public void SquareInCircle_RemovesAreaFromCircle() { List <Brep> TestEnv = BrepFactory.SquareInCircle(); List <Brep> testSquare = new List <Brep>(); testSquare.Add(TestEnv[0]); List <Brep> testCircle = new List <Brep>(); testCircle.Add(TestEnv[1]); List <Brep> resultGeometry = Logic.Relationships.Select.NotExemptRegions(testCircle, testSquare); double calculated = TestEnv[1].GetArea() - TestEnv[0].GetArea(); double actual = resultGeometry[0].GetArea(); bool result = (actual - calculated < 0.1) ? true : false; Assert.IsTrue(result); }