Ejemplo n.º 1
0
 public Pack(uint pickId, PackProperties packProperties)
     : base(pickId, packProperties.Length, packProperties.Width, packProperties.Height)
 {
     _packProperties = packProperties;
     _arrangement = _packProperties.Arrangement;
     _innerBox = new Box(0, packProperties.Box);
 }
Ejemplo n.º 2
0
 public Pack(uint pickId, PackProperties packProperties, BoxPosition position)
     : base(pickId, packProperties, position)
 {
     _packProperties = packProperties;
     _arrangement = _packProperties.Arrangement;
     _innerBox = new Box(0, packProperties.Box);
     _forceTransparency = false;
 }
Ejemplo n.º 3
0
 public static void GetDimensions(
     BoxProperties boxProperties
     , HalfAxis.HAxis boxOrientation
     , PackArrangement arrangement
     , ref double length, ref double width, ref double height)
 {
     if (null == boxProperties)
     {
         return;
     }
     length = arrangement._iLength * boxProperties.Dim(PackProperties.DimIndex0(boxOrientation));
     width  = arrangement._iWidth * boxProperties.Dim(PackProperties.DimIndex1(boxOrientation));
     height = arrangement._iHeight * boxProperties.Dim(3 - PackProperties.DimIndex0(boxOrientation) - PackProperties.DimIndex1(boxOrientation));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="doc">Reference of parent <see cref="Document"/></param>
        /// <param name="box">Reference </param>
        public PackProperties(Document doc
            , BoxProperties box
            , PackArrangement arrangement
            , HalfAxis.HAxis orientation
            , PackWrapper wrapper)
            : base(doc)
        {
            _boxProperties = box;
            _boxProperties.AddDependancy(this);

            _arrangement = arrangement;
            _orientation = orientation;
            _wrapper = wrapper;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="doc">Reference of parent <see cref="Document"/></param>
        /// <param name="box">Reference </param>
        public PackProperties(Document doc
                              , BoxProperties box
                              , PackArrangement arrangement
                              , HalfAxis.HAxis orientation
                              , PackWrapper wrapper)
            : base(doc)
        {
            _boxProperties = box;
            _boxProperties.AddDependancy(this);

            _arrangement = arrangement;
            _orientation = orientation;
            _wrapper     = wrapper;
        }
Ejemplo n.º 6
0
        // static methods
        static public double EstimateWeight(
            BoxProperties boxProperties, PackArrangement arrangement, HalfAxis.HAxis orientation
            , int[] noWalls, double thickness, double surfacicMass)
        {
            double length = 0.0, width = 0.0, height = 0.0;

            PackProperties.GetDimensions(boxProperties, orientation, arrangement, ref length, ref width, ref height);
            Vector3D vDimensions = new Vector3D(
                length + noWalls[0] * thickness
                , width + noWalls[1] * thickness
                , height + noWalls[2] * thickness);

            double area = (noWalls[0] * vDimensions.Y * vDimensions.Z
                           + noWalls[1] * vDimensions.X * vDimensions.Z
                           + noWalls[2] * vDimensions.X * vDimensions.Y) * UnitsManager.FactorSquareLengthToArea;

            return(area * surfacicMass);
        }
Ejemplo n.º 7
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            // Graphics3DControl
            graphCtrl.DrawingContainer = this;
            // list of packs
            ComboBoxHelpers.FillCombo(_boxes.ToArray(), cbInnerBox, null != _packProperties ? _packProperties.Box : _boxes[0]);
            // arrangement
            if (null != _packProperties)
            {
                cbDir.SelectedIndex = (int)(_packProperties.BoxOrientation);
                Arrangement = _packProperties.Arrangement;
                Wrapper = _packProperties.Wrap;
                uCtrlOuterDimensions.Checked = _packProperties.HasForcedOuterDimensions;
                OuterDimensions = _packProperties.OuterDimensions;
            }
            else
            {
                cbDir.SelectedIndex = 5; // HalfAxis.HAxis.AXIS_Z_P
                Arrangement = new PackArrangement(3, 2, 1);
                Wrapper = new WrapperPolyethilene(0.1, 0.010, Color.LightGray, true);

                uCtrlThickness.Value = UnitsManager.ConvertLengthFrom(0.1, UnitsManager.UnitSystem.UNIT_METRIC1);
                uCtrlHeight.Value = UnitsManager.ConvertLengthFrom(40, UnitsManager.UnitSystem.UNIT_METRIC1);
            }
            // disable Ok button
            UpdateStatus(string.Empty);
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Create a new pack
 /// </summary>
 /// <param name="name">Name</param>
 /// <param name="description">Description</param>
 /// <param name="box">Inner box</param>
 /// <param name="arrangement">Arrangement</param>
 /// <param name="axis">Axis</param>
 /// <param name="wrapper">Wrapper</param>
 /// <returns></returns>
 public PackProperties CreateNewPack(
     string name, string description
     , BoxProperties box
     , PackArrangement arrangement
     , HalfAxis.HAxis axis
     , PackWrapper wrapper)
 {
     // instantiate and initialize
     PackProperties packProperties = new PackProperties(this
         , box
         , arrangement
         , axis
         , wrapper);
     packProperties.Name = name;
     packProperties.Description = description;
     // insert in list
     _typeList.Add(packProperties);
     // notify listeners
     NotifyOnNewTypeCreated(packProperties);
     Modify();
     return packProperties;
 }
Ejemplo n.º 9
0
        // static methods
        public static double EstimateWeight(
            BoxProperties boxProperties, PackArrangement arrangement, HalfAxis.HAxis orientation
            , int[] noWalls, double thickness, double surfacicMass)
        {
            double length = 0.0, width = 0.0, height = 0.0;
            PackProperties.GetDimensions(boxProperties, orientation, arrangement, ref length, ref width, ref height);
            Vector3D vDimensions = new Vector3D(
                length + noWalls[0] * thickness
                , width + noWalls[1] * thickness
                , height + noWalls[2] * thickness);

            double area = (noWalls[0] * vDimensions.Y * vDimensions.Z
                + noWalls[1] * vDimensions.X * vDimensions.Z
                + noWalls[2] * vDimensions.X * vDimensions.Y) * UnitsManager.FactorSquareLengthToArea;
            return area * surfacicMass;
        }
Ejemplo n.º 10
0
 public static void GetDimensions(
     BoxProperties boxProperties
     , HalfAxis.HAxis boxOrientation
     , PackArrangement arrangement
     , ref double length, ref double width, ref double height)
 {
     if (null == boxProperties) return;
     length = arrangement._iLength * boxProperties.Dim(PackProperties.DimIndex0(boxOrientation));
     width = arrangement._iWidth * boxProperties.Dim(PackProperties.DimIndex1(boxOrientation));
     height = arrangement._iHeight * boxProperties.Dim(3 - PackProperties.DimIndex0(boxOrientation) - PackProperties.DimIndex1(boxOrientation));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Case definition constructor
 /// </summary>
 /// <param name="arrangement">Box arrangement</param>
 /// <param name="dim0">Dim 0 is 0, 1 or 2</param>
 /// <param name="dim1">Dim 1 is 0, 1 or 2</param>
 public CaseDefinition(PackArrangement arrangement, int dim0, int dim1)
 {
     _arrangement = arrangement;
     _dim0        = dim0;
     _dim1        = dim1;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Case definition constructor
 /// </summary>
 /// <param name="arrangement">Box arrangement</param>
 /// <param name="dim0">Dim 0 is 0, 1 or 2</param>
 /// <param name="dim1">Dim 1 is 0, 1 or 2</param>
 public CaseDefinition(PackArrangement arrangement, int dim0, int dim1)
 {
     _arrangement = arrangement;
     _dim0 = dim0;
     _dim1 = dim1;
 }