private static void BuildTestSpheres(SetupUtils setup)
        {
            var document = setup.Document;

            AddTwoIntersectingSpeherestoDocument(document);
            Assert.AreEqual(document.Root.Children.Count, 3);
        }
        public static void BuildMetaActionTestBoolIntersect(SetupUtils setup)
        {
            BuildTestSpheres(setup);

            setup.SwitchUserMetaAction(ModifierNames.BooleanIntersect);

            // Push two points on meta action and check that it works correctly

            var container  = ((MetaActionContainer)setup.ActionGraph.ModifierContainer[ModifierNames.BooleanIntersect]);
            var dependency = container.Dependency;


            var firstSphere  = new SceneSelectedEntity(setup.Document.Root.Children[1]);
            var secondSphere = new SceneSelectedEntity(setup.Document.Root.Children[2]);

            dependency.Steps[2].Integer        = 2;
            dependency.Steps[2].IsDefaultValue = true;

            dependency.ProposeCandidate(firstSphere);
            container.PushValue(firstSphere);

            dependency.ProposeCandidate(secondSphere);
            container.PushValue(secondSphere);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildTestPointUsingClicks(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.Point3D);

            setup.MouseInput.MouseDown(100, 200, 1, false, false);
            setup.MouseInput.MouseUp(100, 200, false, false);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildTestFourLinesRectangle(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.FourLinesRectangle);

            setup.MouseInput.MouseDown(100, 100, 1, false, false);
            setup.MouseInput.MouseUp(100, 100, false, false);

            setup.MouseInput.MouseDown(200, 200, 1, false, false);
            setup.MouseInput.MouseUp(200, 200, false, false);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildTestLineUsingClicks(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.Line3D);

            // Push two points on meta action and check that it works correctly

            setup.MouseInput.MouseDown(100, 100, 1, false, false);
            setup.MouseInput.MouseUp(100, 100, false, false);

            setup.MouseInput.MouseDown(200, 200, 1, false, false);
            setup.MouseInput.MouseUp(200, 200, false, false);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildTestSERArc(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.ArcStartEndRadius);

            setup.MouseInput.MouseDown(100, 100, 1, false, false);
            setup.MouseInput.MouseUp(100, 100, false, false);

            setup.MouseInput.MouseDown(200, 200, 1, false, false);
            setup.MouseInput.MouseUp(200, 200, false, false);

            setup.MouseInput.MouseDown(0, 200, 1, false, false);
            setup.MouseInput.MouseUp(0, 200, false, false);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildTestThreePointsRectangle(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.ThreePointsRectangle);

            setup.MouseInput.MouseDown(0, 100, 1, false, false);
            setup.MouseInput.MouseUp(0, 100, false, false);

            setup.MouseInput.MouseDown(100, 0, 1, false, false);
            setup.MouseInput.MouseUp(100, 0, false, false);

            setup.MouseInput.MouseDown(300, 200, 1, false, false);
            setup.MouseInput.MouseUp(300, 200, false, false);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildMetaActionTestSphere(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.Sphere);

            // Push two points on meta action and check that it works correctly

            var container  = ((MetaActionContainer)setup.ActionGraph.ModifierContainer[ModifierNames.Sphere]);
            var dependency = container.Dependency;

            var center = new Point3D(100, 100, 100);

            dependency.ProposeCandidate(center);
            container.PushValue(center);

            dependency.ProposeCandidate((double)200);
            container.PushValue((double)200);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildMetaActionTestCylinder(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.Cylinder);

            var container  = ((MetaActionContainer)setup.ActionGraph.ModifierContainer[ModifierNames.Cylinder]);
            var dependency = container.Dependency;

            var axis = new gpAx1(new gpPnt(100, 100, 100), new gpDir(0, 0, 1));

            dependency.ProposeCandidate(axis);
            container.PushValue(axis);

            dependency.ProposeCandidate((double)100);
            container.PushValue((double)100);

            dependency.ProposeCandidate((double)200);
            container.PushValue((double)200);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildMetaActionTestCone(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.Cone);

            var container  = ((MetaActionContainer)setup.ActionGraph.ModifierContainer[ModifierNames.Cone]);
            var dependency = container.Dependency;

            var axis = new gpAx1(new gpPnt(100, 100, 100), new gpDir(0, 0, 1));

            dependency.ProposeCandidate(axis);
            container.PushValue(axis);

            // we only add two values because the others are defaults and are automatically added
            dependency.ProposeCandidate((double)10);
            container.PushValue((double)10);

            dependency.ProposeCandidate((double)20);
            container.PushValue((double)20);

            setup.SwitchUserAction(ModifierNames.None);
        }
        public static void BuildMetaActionTestTorus(SetupUtils setup)
        {
            setup.SwitchUserMetaAction(ModifierNames.Torus);

            // Push two points on meta action and check that it works correctly

            var container  = ((MetaActionContainer)setup.ActionGraph.ModifierContainer[ModifierNames.Torus]);
            var dependency = container.Dependency;

            var axis = new gpAx1(new gpPnt(100, 100, 100), new gpDir(0, 0, 1));

            dependency.ProposeCandidate(axis);
            container.PushValue(axis);

            dependency.ProposeCandidate((double)100);
            container.PushValue((double)100);

            dependency.ProposeCandidate((double)200);
            container.PushValue((double)200);

            setup.SwitchUserAction(ModifierNames.None);
        }
 public void ConfigureTestEnvironment()
 {
     Setup = new SetupUtils();
     Setup.InitializeModifiersSetup();
 }