Ignore:
Timestamp:
02/07/18 14:54:42 (2 years ago)
Author:
rhanghof
Message:

#2817:

  • Added a new packer.
  • Enhanced the material types.
  • Added extreme point pruning for layer support in the extrem point creators.
  • BinPacking3D: Added a graph for calculating weigth distribution of the items.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs

    r15705 r15731  
    119119    }
    120120
     121    private void DisplaySelectedItemText() {
     122      string text = "";
     123      if (selectedItemKey < 0) {
     124        text = $"{packing.BinShape.ToString()}";
     125      } else {
     126        var packingItem = packing.Items.Single(x => selectedItemKey == x.Key);
     127        var position = packing.Positions.Single(x => x.Key == packingItem.Key);
     128        text = $"{packingItem.Value.ToString()}, {position.ToString()}";
     129        if (packing is BinPacking3D.BinPacking3D) {
     130          var stackedWeight = ((BinPacking3D.BinPacking3D)packing).GetStackedWeightForItemId(packingItem.Key);
     131          text += $", stacked weight: {stackedWeight}";
     132        }
     133      }
     134      selectedItemTextBlock.Text = text;
     135    }
     136
    121137    private void UpdateVisualization() {
    122138      Clear();
     
    126142      var modelGroup = (Model3DGroup)MyModel.Content;
    127143      var hiddenMaterial = new DiffuseMaterial(new SolidColorBrush(hiddenColor));
     144
     145      DisplaySelectedItemText();
    128146
    129147      if (selectedItemKey >= 0) {
Note: See TracChangeset for help on using the changeset viewer.