public Corner(uint pickId, PalletCornerProperties cornerProperties) { _pickId = pickId; _w = cornerProperties.Width; _th = cornerProperties.Thickness; _height = cornerProperties.Length; _color = cornerProperties._color; }
public Corner(uint pickId, PalletCornerProperties cornerProperties) : base(0) { PickId = pickId; W = cornerProperties.Width; Th = cornerProperties.Thickness; Height = cornerProperties.Length; Color = cornerProperties.Color; }
/// <summary> /// Layer pallet analysis constructor (inversed = false) /// </summary> public Layer(BProperties boxProperties, PalletProperties palletProperties, PalletCornerProperties cornerProperties, PalletConstraintSet constraintSet, HalfAxis.HAxis axisOrtho, bool inversed) { double cornerThickness = null != cornerProperties ? cornerProperties.Thickness : 0.0; _axisOrtho = axisOrtho; _inversed = inversed; _palletLength = palletProperties.Length + constraintSet.OverhangX - 2.0 * cornerThickness; _palletWidth = palletProperties.Width + constraintSet.OverhangY - 2.0 * cornerThickness; Initialize(boxProperties); }
protected Layer2D BuildLayer( BProperties boxProperties, PalletProperties palletProperties, PalletCornerProperties cornerProperties , PalletConstraintSet constraintSet, HalfAxis.HAxis axisOrtho, bool swapped, bool inversed) { double cornerThickness = null != cornerProperties ? cornerProperties.Thickness : 0.0; return(new Layer2D( boxProperties.OuterDimensions , new Vector2D(palletProperties.Length + constraintSet.OverhangX - 2.0 * cornerThickness, palletProperties.Width + constraintSet.OverhangY - 2.0 * cornerThickness) , axisOrtho , swapped)); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (CornerLength > 0 && CornerWidth > 0 && CornerThickness > 0 && CornerThickness < CornerWidth) { // draw PalletCornerProperties palletCornerProperties = new PalletCornerProperties( null, ItemName, ItemDescription, CornerLength, CornerWidth, CornerThickness, CornerWeight, CornerColor); Corner palletCorner = new Corner(0, palletCornerProperties); palletCorner.Draw(graphics); graphics.AddDimensions(new DimensionCube(CornerWidth, CornerWidth, CornerLength)); } }
/// <summary> /// Process case/pallet analysis /// </summary> /// <param name="analysis">Pallet analysis to process</param> public void ProcessAnalysis(CasePalletAnalysis analysis) { _bProperties = analysis.BProperties; _palletProperties = analysis.PalletProperties; _interlayerProperties = analysis.InterlayerProperties; _interlayerPropertiesAntiSlip = analysis.InterlayerPropertiesAntiSlip; _cornerProperties = analysis.PalletCornerProperties; _capProperties = analysis.PalletCapProperties; _constraintSet = analysis.ConstraintSet; // check contraint set validity if (!_constraintSet.IsValid) { throw new EngineException("Constraint set is invalid!"); } // generate solutions analysis.Solutions = GenerateSolutions(); }
private Layer2D GenerateBestLayer( BProperties bProperties, PalletProperties palletProperties, PalletCornerProperties cornerProperties, PalletConstraintSet constraintSet, HalfAxis.HAxis hAxis) { Layer2D bestLayer = null; // loop through all patterns foreach (LayerPatternBox pattern in LayerPatternBox.All) { // is pattern allowed if (!_constraintSet.AllowPattern(pattern.Name)) { continue; } // direction 1 Layer2D layer1 = BuildLayer(bProperties, palletProperties, cornerProperties, constraintSet, hAxis, false, false); double actualLength = 0.0, actualWidth = 0.0; pattern.GetLayerDimensionsChecked(layer1, out actualLength, out actualWidth); pattern.GenerateLayer(layer1, actualLength, actualWidth); // save as best pattern if (null == bestLayer || bestLayer.Count < layer1.Count) { bestLayer = layer1; } // direction 2 (opposite) Layer2D layer2 = BuildLayer(bProperties, palletProperties, cornerProperties, constraintSet, HalfAxis.Opposite(hAxis), false, false); actualLength = 0.0; actualWidth = 0.0; pattern.GetLayerDimensionsChecked(layer2, out actualLength, out actualWidth); pattern.GenerateLayer(layer2, actualLength, actualWidth); // save as best pattern if (null == bestLayer || bestLayer.Count < layer2.Count) { bestLayer = layer2; } } return(bestLayer); }