Exemple #1
0
        /// <summary>
        /// Executes the command.
        /// Gets the parameters and calls beamGrid3D() to make the grid.
        /// </summary>
        /// <param name="services">CommandServices object to interact with the system</param>
        public override void Run(Canguro.Controller.CommandServices services)
        {
            if (section == null)
            {
                section = Canguro.Model.Section.SectionManager.Instance.DefaultFrameSection as Canguro.Model.Section.FrameSection;
            }
            services.GetProperties(Culture.Get("gridCmdTitle"), this);

            Controller.Snap.Magnet m = services.GetPoint(Culture.Get("selectGridOrigin"));
            if (m == null)
            {
                return;
            }
            Microsoft.DirectX.Vector3 o = m.SnapPosition;

            StraightFrameProps props = new StraightFrameProps();

            props.Section = section;
            beamGrid3D(services.Model, o.X, o.Y, o.Z, dx, 0, 0, 0, dy, 0, 0, 0, dz, nx + 1, ny + 1, nz + 1, true, props);
        }
        /// <summary>
        /// Executes the command. 
        /// Gets the parameters and calls beamGrid3D() to make the grid.
        /// </summary>
        /// <param name="services">CommandServices object to interact with the system</param>
        public override void Run(Canguro.Controller.CommandServices services)
        {
            if (section == null)
                section = Canguro.Model.Section.SectionManager.Instance.DefaultFrameSection as Canguro.Model.Section.FrameSection;
            services.GetProperties(Culture.Get("gridCmdTitle"), this);

            Controller.Snap.Magnet m = services.GetPoint(Culture.Get("selectGridOrigin"));
            if (m == null) return;
            Microsoft.DirectX.Vector3 o = m.SnapPosition;

            StraightFrameProps props = new StraightFrameProps();
            props.Section = section;
            beamGrid3D(services.Model, o.X, o.Y, o.Z, dx, 0, 0, 0, dy, 0, 0, 0, dz, nx + 1, ny + 1, nz + 1, true, props);
        }