public void CircleInSquare_ReturnsTwo()
        {
            List <Brep> TestEnv = BrepFactory.CircleInSquare();

            List <Brep> resultGeometry = Logic.Transformations.Breps.SplitTwoBreps(TestEnv[1], TestEnv[0]);

            Assert.AreEqual(resultGeometry.Count, 2);
        }
Exemple #2
0
        public void CircleInSquare_ReturnsTrue()
        {
            List <Brep> TestEnv = BrepFactory.CircleInSquare();

            bool result = Logic.Relationships.Confirm.RegionsIntersect(TestEnv[0], TestEnv[1]);

            Assert.IsTrue(result);
        }
Exemple #3
0
        public void UnitCircle_ReturnsQuad()
        {
            var testBrep = BrepFactory.CircleInSquare()[0];

            var resultGeometry = Logic.Utils.GetBoundingBoxCurve(testBrep);

            Assert.AreEqual(4, resultGeometry.SpanCount);
        }
Exemple #4
0
        public void UnitCircle_ReturnsValue()
        {
            var testBrep = BrepFactory.CircleInSquare()[0];

            var resultGeometry = Logic.Utils.GetBoundingBoxCurve(testBrep);

            Assert.IsNotNull(resultGeometry);
        }
Exemple #5
0
        public void CircleInSquare_SelectsOne()
        {
            List <Brep> TestEnv    = BrepFactory.CircleInSquare();
            Brep        testCircle = TestEnv[0];
            Brep        testSquare = TestEnv[1];

            List <Brep> allRegions     = Breps.SplitTwoBreps(testSquare, testCircle);
            List <Brep> resultGeometry = Logic.Relationships.Select.FloorFromCore(allRegions, testCircle);

            Assert.AreEqual(resultGeometry.Count, 1);
        }
Exemple #6
0
        public void CircleInSquare_NotCore()
        {
            List <Brep> TestEnv    = BrepFactory.CircleInSquare();
            Brep        testCircle = TestEnv[0];
            Brep        testSquare = TestEnv[1];

            List <Brep> allRegions     = Breps.SplitTwoBreps(testSquare, testCircle);
            List <Brep> resultGeometry = Logic.Relationships.Select.FloorFromCore(allRegions, testCircle);

            double resultArea  = resultGeometry[0].GetArea();
            double profileArea = testSquare.GetArea();
            double coreArea    = testCircle.GetArea();

            double difference = (profileArea - coreArea) - resultArea;
            bool   tolerated  = (difference < 0.01) ? true : false;

            Assert.IsTrue(tolerated);
        }