コード例 #1
0
 private Experior.Dematic.Base.EuroPallet GetLiftLoad(PalletStraight straight)
 {
     Experior.Dematic.Base.EuroPallet palletLoad = null;
     if (straight.TransportSection.Route.Loads.Count > 0)
     {
         palletLoad = (Experior.Dematic.Base.EuroPallet)straight.TransportSection.Route.Loads.First();
     }
     return(palletLoad);
 }
コード例 #2
0
        public TCar(TCarInfo info) : base(info)
        {
            tCarInfo    = info;
            info.height = info.height * 2; // assembley is placed at height/2 so that it comes out at height ?!!??

            Core.Environment.Scene.OnLoaded += Scene_OnLoaded;

            var offCentre = TCarWidth / 2 - TCarWidth;

            // Left track used to move the load
            track = new StraightTransportSection(Color.Gray, TCarLength, 0.05f, 0.05f);
            Add(track);
            track.Route.Motor.Speed = 1; // m/s ?
            track.LocalPosition     = new Vector3(-TCarLength / 2, -0.05f, offCentre);

            // Load Vehicle
            trackLoad           = Core.Loads.Load.CreateBox(0.1f, 0.1f, 0.1f, Color.BlueViolet);
            trackLoad.Embedded  = true;
            trackLoad.Deletable = false;
            track.Route.Add(trackLoad);
            trackLoad.OnPositionChanged += TrackLoad_OnPositionChanged;
            trackLoad.Stop();
            trackLoad.Visible = false;

            // Right track (visual only)
            trackRight = new Cube(Color.Gray, TCarLength, 0.05f, 0.05f);
            Add(trackRight);
            trackRight.LocalPosition = new Vector3(-TCarLength / 2, -0.05f, -offCentre);

            // Action point for lift rail
            trackStopPoint          = track.Route.InsertActionPoint(0);
            trackStopPoint.Color    = Color.Black;
            trackStopPoint.Visible  = false;
            trackStopPoint.OnEnter += TrackStopPoint_OnEnter;

            // Conveyor
            PalletStraightInfo straightInfo = new PalletStraightInfo
            {
                ConveyorType = PalletConveyorType.Roller,
                thickness    = 0.05f,
                spacing      = 0.1f,
                width        = ConveyorWidth,
                length       = TCarWidth,
                speed        = 0.3f,
                color        = tCarInfo.color,
            };

            conveyor = new PalletStraight(straightInfo);
            conveyor.LineReleasePhotocell.OnPhotocellStatusChanged += LineReleasePhotocell_OnPhotocellStatusChanged;
            conveyor.ThisRouteStatus.OnRouteStatusChanged          += ThisRouteStatus_OnRouteStatusChanged;
            conveyor.Entering.Name         = "EnterPoint";
            conveyor.Leaving.Name          = "ExitPoint";
            conveyor.StartFixPoint.Visible = false;
            conveyor.EndFixPoint.Visible   = false;
            Add(conveyor);
            conveyor.LocalPosition = new Vector3(-conveyor.Width / 2, 0, 0);
            conveyor.LocalYaw      = Trigonometry.PI(Trigonometry.Angle2Rad(90.0f));

            SetupFixPoints();

            Tasks.CollectionChanged += Tasks_CollectionChanged;

            Reset();
        }