Пример #1
0
            public StraightThrough(StraightConveyorInfo info, ThreeWaySwitch _threeWaySwitch) : base(info)
            {
                straightConveyorInfo = info;
                threeWaySwitch       = _threeWaySwitch;

                _threeWaySwitch.AllRoutes.Add(this);
                WaitingConveyors.Add(ThreeWayRoutes.Left, waitingForLeft);
                WaitingConveyors.Add(ThreeWayRoutes.Right, waitingForRight);
                WaitingConveyors.Add(ThreeWayRoutes.Center, waitingForCenter);

                Length           = threeWaySwitch.threeWaySwitchInfo.threeWayLength;
                endAP            = TransportSection.Route.InsertActionPoint(Length - 0.3f);
                startAP          = TransportSection.Route.InsertActionPoint(0.3f);
                startAP.OnEnter += startAP_OnEnter;
                endAP.OnEnter   += endAP_OnEnter;

                crossOverX = new CrossOver(Core.Environment.Scene.DefaultColor, 1, 0.05f, 0.3f, _threeWaySwitch)
                {
                    straightThrough = this
                };
                crossOverY = new CrossOver(Core.Environment.Scene.DefaultColor, 1, 0.05f, 0.3f, _threeWaySwitch)
                {
                    straightThrough = this
                };

                Add(crossOverX);
                Add(crossOverY);

                RouteAvailable = RouteStatuses.Request;//3 way will control the release of loads onto the transfer
                _threeWaySwitch.OnDimensionsChanged += threeWaySwitch_OnDimensionsChanged;
                StartFixPoint.OnSnapped             += StraightStartFixPoint_OnSnapped;
                StartFixPoint.OnUnSnapped           += StraightStartFixPoint_OnUnSnapped;
                OnNextRouteStatusAvailableChanged   += StraightThrough_OnNextRouteStatusAvailableChanged;
            }
Пример #2
0
        public static Assembly Roller(string title, string subtitle, object properties)
        {
            StraightConveyorInfo info = new StraightConveyorInfo();

            info.thickness = 0.05f;
            info.spacing   = 0.1f;
            info.width     = 0.5f;
            info.length    = 0.5f;
            info.height    = 0.7f;
            info.speed     = 0.7f;
            info.name      = Assembly.GetValidName("RA ");
            return(new StraightConveyor(info));
        }
Пример #3
0
        private StraightConveyorInfo NewStraightInfo(ThreeWaySwitchInfo info)
        {
            StraightConveyorInfo straightInfo = new StraightConveyorInfo();

            //straightInfo.Length = info.length;
            straightInfo.Length = info.threeWayLength;

            //straightInfo.Speed                = info.speed;
            straightInfo.thickness     = 0.05f;
            straightInfo.color         = Core.Environment.Scene.DefaultColor;
            straightInfo.conveyorWidth = CaseConveyorWidth._500mm;
            return(straightInfo);
        }
Пример #4
0
        public Miniload(MiniloadInfo info)
            : base(info)
        {
            MiniloadInfo = info;

            Lift.Height = 0.05f;
            Lift.Color  = Color.DarkBlue;

            StraightConveyorInfo pickConveyorInfo = new StraightConveyorInfo()
            {
                Length    = 1.61f,
                thickness = 0.05f,
                Width     = 0.5f,
                Speed     = 0.7f
            };

            pickConveyor = new StraightConveyor(pickConveyorInfo);
            pickConveyor.endLine.Visible          = false;
            pickConveyor.startLine.Visible        = false;
            pickConveyor.Color                    = Color.Gray;
            pickConveyor.arrow.Visible            = false;
            pickConveyor.TransportSection.Visible = false;
            pickConveyor.RouteAvailable           = RouteStatuses.Blocked;
            pickConveyor.EndFixPoint.Visible      = false;
            pickConveyor.EndFixPoint.Enabled      = false;

            Add(pickConveyor);
            pickConveyor.TransportSection.Route.InsertActionPoint(pos2Pick);
            pickConveyor.TransportSection.Route.InsertActionPoint(pos1Pick);
            pos2Pick.OnEnter += pos1pd_OnEnter;
            pos1Pick.OnEnter += pos2pd_OnEnter;

            StraightConveyorInfo dropConveyorInfo = new StraightConveyorInfo()
            {
                Length    = 1.61f,
                thickness = 0.05f,
                Width     = 0.5f,
                Speed     = 0.7f
            };

            dropConveyor = new StraightConveyor(dropConveyorInfo);
            dropConveyor.endLine.Visible          = false;
            dropConveyor.startLine.Visible        = false;
            dropConveyor.Color                    = Color.Gray;
            dropConveyor.arrow.Visible            = false;
            dropConveyor.TransportSection.Visible = false;
            dropConveyor.RouteAvailable           = RouteStatuses.Blocked;
            dropConveyor.StartFixPoint.Visible    = false;
            dropConveyor.StartFixPoint.Enabled    = false;

            Add(dropConveyor);
            dropConveyor.TransportSection.Route.InsertActionPoint(pos2Drop);
            dropConveyor.TransportSection.Route.InsertActionPoint(pos1Drop);

            dropConveyor.OnNextRouteStatusAvailableChanged += dropConveyor_OnNextRouteStatusAvailableChanged;

            StraightConveyorInfo holdingConveyorInfo = new StraightConveyorInfo()
            {
                Length    = 1,
                thickness = 0.05f,
                Width     = 0.5f,
                Speed     = 0.7f
            };

            holdingConveyor = new StraightConveyor(holdingConveyorInfo);
            holdingConveyor.endLine.Visible          = false;
            holdingConveyor.startLine.Visible        = false;
            holdingConveyor.arrow.Visible            = false;
            holdingConveyor.TransportSection.Visible = false;
            holdingConveyor.StartFixPoint.Visible    = false;
            holdingConveyor.EndFixPoint.Visible      = false;

            Add(holdingConveyor);
            holdingConveyor.TransportSection.Route.InsertActionPoint(holdingAp);

            holdingAp.OnEnter += holdingAp_OnEnter;

            UpdateMiniload();

            AllCranes.Add(this);

            subMenu = new List <System.Windows.Forms.ToolStripItem>();
            subMenu.Add(new System.Windows.Forms.ToolStripMenuItem("Reset", Common.Icons.Get("fault")));
            subMenu[0].Click += new EventHandler(DematicHBW_ClickReset);
            //subMenu.Add(new System.Windows.Forms.ToolStripMenuItem("Set compartment occupied", Common.Icons.Get("fault")));
            //subMenu[1].Click += new EventHandler(DematicHBW_ClickCompartmentOccupied);
            //subMenu.Add(new System.Windows.Forms.ToolStripMenuItem("Set compartment empty", Common.Icons.Get("fault")));
            //subMenu[2].Click += new EventHandler(DematicHBW_ClickCompartmentEmpty);
            //subMenu.Add(new System.Windows.Forms.ToolStripMenuItem("Fault Miniload", Common.Icons.Get("fault")));
            //subMenu[3].Click += new EventHandler(DematicHBW_ClickFault);

            Control.FinishedJob += Control_FinishedJob;
            Control.LoadDropped += Control_LoadDropped;

            LoadingSpeed   = 1;
            UnloadingSpeed = 1;

            ControllerProperties = StandardCase.SetMHEControl(info, this);
            Experior.Core.Environment.Scene.OnLoaded += Scene_OnLoaded;
        }