public static Plane GetVerticalPlaneFrom2Points(IModel model)
        {
            Plane plane = new Plane();

            //accessing the model
            IModelData modelData = model.GetModelData();
            IView      view      = model.GetActiveView();

            //selecting two nodes
            Common.IO.Log("Select TWO nodes representing a vertical plane");
            List <Node> selectedNodes = RFEMselectOps.selectNodes(model);

            if (selectedNodes.Count < 2)
            {
                Common.IO.Log("Less than TWO nodes selected");
                return(plane);
            }


            Vector3 point1 = RFEMgeomOps.XNAvectorFromNode(selectedNodes[0]);
            Vector3 point2 = RFEMgeomOps.XNAvectorFromNode(selectedNodes[1]);
            Vector3 point3 = new Vector3(point2.X, point2.Y, point2.Z + 1);

            return(new Plane(point1, point2, point3));
        }
        public static Plane GetPlaneFrom3Points(IModel model)
        {
            Plane plane = new Plane();

            //accessing the model
            IModelData modelData = model.GetModelData();
            IView      view      = model.GetActiveView();

            //selecting three nodes
            Common.IO.Log("Select THREE nodes representing a plane");
            List <Node> selectedNodes = RFEMselectOps.selectNodes(model);

            if (selectedNodes.Count < 3)
            {
                Common.IO.Log("Less than THREE nodes selected");
                return(plane);
            }


            Vector3 point1 = RFEMgeomOps.XNAvectorFromNode(selectedNodes[0]);
            Vector3 point2 = RFEMgeomOps.XNAvectorFromNode(selectedNodes[1]);
            Vector3 point3 = RFEMgeomOps.XNAvectorFromNode(selectedNodes[2]);

            return(new Plane(point1, point2, point3));
        }