Canguro.Commands.Model.AddGridCmd.Run C# (CSharp) Method

Run() public method

Executes the command. Gets the parameters and calls beamGrid3D() to make the grid.
public Run ( Canguro services ) : void
services Canguro CommandServices object to interact with the system
return void
        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);
        }