Example #1
0
        public void SquareWithInscribedCircle_ReturnsTrue()
        {
            List <Brep> TestEnv = BrepFactory.SqaureWithInscribedCircle();

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

            Assert.IsTrue(result);
        }
Example #2
0
        public void SquareWithInscribedCircle_SelectsFour()
        {
            List <Brep> TestEnv    = BrepFactory.SqaureWithInscribedCircle();
            Brep        testCircle = TestEnv[1];
            Brep        testSquare = TestEnv[0];

            List <Brep> allRegions = Breps.SplitTwoBreps(testSquare, testCircle);

            Console.WriteLine(testCircle.Curves2D[0].IsCircle());
            Console.WriteLine(testSquare.GetArea());
            Console.WriteLine(testCircle.GetArea());
            Console.WriteLine(allRegions.Count.ToString());

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

            Assert.AreEqual(resultGeometry.Count, 4);
        }