Beispiel #1
0
        public static Case_Load FeedCaseLoad(ITransportSection transportSection, float distance, float length, float width, float height, float weight, Color color, int barcodeLength, BaseCaseData caseData)
        {
            try
            {
                string SSCCBarcode = "";

                MeshInfo boxInfo = new MeshInfo();
                boxInfo.color    = color;
                boxInfo.filename = Case_Load.GraphicsMesh;

                SSCCBarcode    = GetSSCCBarcode();// GetSSCCBarcode(barcodeLength);
                boxInfo.length = length;
                boxInfo.width  = width;
                boxInfo.height = height;

                Case_Load boxLoad = new Case_Load(boxInfo);
                boxLoad.Case_Data        = caseData;
                boxLoad.Case_Data.Weight = weight;
                transportSection.Route.Add(boxLoad, distance);
                Experior.Core.Loads.Load.Items.Add(boxLoad);

                if (SSCCBarcode != "")
                {
                    boxLoad.SSCCBarcode = SSCCBarcode;
                }
                return(boxLoad);
            }
            catch (Exception se)
            {
                Core.Environment.Log.Write(se);
                Core.Environment.Scene.Pause();
                return(null);
            }
        }
Beispiel #2
0
        public static EuroPallet FeedEuroPallet(ITransportSection transportSection, float distance, BasePalletData palletData, PalletStatus palletStatus)
        {
            EuroPallet           PalletLoad;
            IEmulationController controller = Core.Assemblies.Assembly.Items.Values.ToList().FirstOrDefault(x => x is IEmulationController) as IEmulationController;

            if (controller != null)
            {
                PalletLoad = controller.GetEuroPallet(transportSection.Route, 0, palletStatus);
                if (PalletLoad != null) //It is not necesary to implement this just return null Pallet load from the controller and a standard load will be created
                {
                    return(PalletLoad);
                }
            }
            try
            {
                EuroPalletInfo palletInfo = new EuroPalletInfo();
                palletInfo.color    = Color.Peru;
                palletInfo.Status   = palletStatus;
                palletInfo.filename = EuroPallet.Mesh;

                //LoadHeight includes the height of the pallet (145mm)
                palletInfo.LoadHeight = 2.2f;
                palletInfo.LoadWidth  = 0.9f;
                palletInfo.LoadLength = 1.3f;

                //Set the dimensions of a EuroPallet (This is the standard size)
                palletInfo.length = 1.2f;
                palletInfo.width  = 0.8f;
                palletInfo.height = 0.14f; // Actual size is 0.144f but reduced so visible space can be added in stack (0.005f space)

                EuroPallet palletLoad = new EuroPallet(palletInfo);

                //palletLoad.Part = (RigidLoadPart)new PalletPart(0.008f, palletInfo.color, palletInfo.length, palletInfo.height, palletInfo.width, true, palletInfo.density, Pallet_Load.Size(PalletType.EuroPallet), palletInfo.rigid);
                palletLoad.Pallet_Data        = palletData;
                palletLoad.Pallet_Data.Weight = 60.0f;
                transportSection.Route.Add(palletLoad, distance);
                Load.Items.Add(palletLoad);

                string SSCCBarcode = GetSSCCBarcode();
                if (SSCCBarcode != "")
                {
                    palletLoad.SSCCBarcode    = SSCCBarcode;
                    palletLoad.Identification = SSCCBarcode;
                }
                return(palletLoad);
            }
            catch (Exception se)
            {
                Core.Environment.Log.Write(se);
                Core.Environment.Scene.Pause();
                return(null);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Method to return a Tray load
        /// </summary>
        /// <param name="transportSection">The transport section to add the load too</param>
        /// <param name="distance">The position distance along the transport section</param>
        /// <param name="trayData">Base tray data</param>
        /// <param name="trayStatus">Tray status (Empty, Loaded or Stacked)</param>
        /// <returns>Load of type Tray</returns>
        public static Tray FeedTrayLoad(ITransportSection transportSection, float distance, BaseCaseData trayData, TrayStatus trayStatus)
        {
            Tray trayLoad;
            IEmulationController controller = Core.Assemblies.Assembly.Items.Values.ToList().FirstOrDefault(x => x is IEmulationController) as IEmulationController;

            if (controller != null)
            {
                trayLoad = controller.GetTray(transportSection.Route, 0, trayStatus);
                if (trayLoad != null) //It is not necesary to implement this just return null case load from the controller and a standard load will be created
                {
                    return(trayLoad);
                }
            }
            try
            {
                TrayInfo trayInfo = new TrayInfo();
                trayInfo.color      = Color.Peru;
                trayInfo.filename   = Tray.Mesh;
                trayInfo.Status     = trayStatus;
                trayInfo.TrayStacks = 6;

                //LoadHeight includes the height of the tray (280mm)
                trayInfo.LoadHeight = 0.410f;
                trayInfo.LoadWidth  = 0.4f;
                trayInfo.LoadLength = 0.6f;

                //Set the dimensions of a tray (This is the standard size)
                trayInfo.length = 0.65f;
                trayInfo.width  = 0.45f;
                trayInfo.height = 0.058f; // Actual size is 0.063f but reduced so visible space can be added in stack (0.005f space)

                trayLoad = new Tray(trayInfo);

                trayLoad.Case_Data = trayData;
                transportSection.Route.Add(trayLoad, distance);
                Load.Items.Add(trayLoad);

                string SSCCBarcode = GetSSCCBarcode();
                if (SSCCBarcode != "")
                {
                    trayLoad.SSCCBarcode    = SSCCBarcode;
                    trayLoad.Identification = SSCCBarcode;
                }
                return(trayLoad);
            }
            catch (Exception se)
            {
                Core.Environment.Log.Write(se);
                Core.Environment.Scene.Pause();
                return(null);
            }
        }
Beispiel #4
0
        //  public static List<ICaseControllerCommon> CaseControllers = new List<ICaseControllerCommon>();

        //Feed case load should actually be part of the basic code for BK10 (perhaps common)
        //Then we want to add default and selectable types of loads that can be configured within a project
        //These types will then be used to generate loads and add them to the model at the correct place
        //For now we just have a default type which cannot be changed on a project specific basis
        public static Case_Load FeedCaseLoad(ITransportSection transportSection, float distance, BaseCaseData caseData)
        {
            Case_Load            caseLoad;
            IEmulationController controller = Core.Assemblies.Assembly.Items.Values.ToList().FirstOrDefault(x => x is IEmulationController) as IEmulationController;

            if (controller != null)
            {
                caseLoad = controller.GetCaseLoad(transportSection.Route, 0);
                if (caseLoad != null) //It is not necesary to implement this just return null case load from the controller and a standard load will be created
                {
                    return(caseLoad);
                }
            }

            try
            {
                string SSCCBarcode = "";

                MeshInfo boxInfo = new MeshInfo();
                boxInfo.color    = System.Drawing.Color.Peru;
                boxInfo.filename = Case_Load.GraphicsMesh;

                SSCCBarcode    = GetSSCCBarcode();
                boxInfo.length = 0.6f;
                boxInfo.width  = 0.4f;
                boxInfo.height = 0.28f;

                Case_Load boxLoad = new Case_Load(boxInfo);
                boxLoad.Case_Data        = caseData;
                boxLoad.Case_Data.Weight = 2.3f;
                transportSection.Route.Add(boxLoad, distance);
                Experior.Core.Loads.Load.Items.Add(boxLoad);

                if (SSCCBarcode != "")
                {
                    boxLoad.SSCCBarcode    = SSCCBarcode;
                    boxLoad.Identification = SSCCBarcode;
                }
                return(boxLoad);
            }
            catch (Exception se)
            {
                Core.Environment.Log.Write(se);
                Core.Environment.Scene.Pause();
                return(null);
            }
        }