Beispiel #1
0
        public void TwoIntersectingCircles_SelectsOne()
        {
            List <Brep> TestEnv       = BrepFactory.TwoIntersectingCircles();
            Brep        testCoreLeft  = TestEnv[0];
            Brep        testCoreRight = TestEnv[1];

            List <Brep> resultGeometryA = Logic.Relationships.Select.FloorFromCore(TestEnv, testCoreLeft);

            Assert.AreEqual(resultGeometryA.Count, 1);

            List <Brep> resultGeometryB = Logic.Relationships.Select.FloorFromCore(TestEnv, testCoreRight);

            Assert.AreEqual(resultGeometryB.Count, 1);
        }
Beispiel #2
0
        public void TwoIntersectingCircles_NotCore()
        {
            List <Brep> TestEnv         = BrepFactory.TwoIntersectingCircles();
            Brep        testCircleLeft  = TestEnv[0];
            Brep        testCircleRight = TestEnv[1];

            List <Brep> resultGeometry = Logic.Relationships.Select.FloorFromCore(TestEnv, testCircleLeft);

            Point3d selectedZoneCenter = Logic.Utils.GetRegionCenter(resultGeometry[0]);
            Point3d leftCircleCenter   = Logic.Utils.GetRegionCenter(testCircleLeft);
            Point3d rightCircleCenter  = Logic.Utils.GetRegionCenter(testCircleRight);

            bool InitialIsCloser = (selectedZoneCenter.DistanceTo(leftCircleCenter) > selectedZoneCenter.DistanceTo(rightCircleCenter)) ? true : false;

            Assert.IsTrue(InitialIsCloser);
        }