Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/07/18 14:54:42 (7 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.
Location:
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3
Files:
2 edited

Legend:

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

    r15488 r15731  
    4848                      Unchecked="ShowResidualSpacesCheckBoxOnUnchecked"
    4949                      Checked="ShowResidualSpacesCheckBoxOnChecked"/>
     50            <TextBlock Name="selectedItemTextBlock"
     51                       Margin="10,6,0,0"
     52                       VerticalAlignment="Top"
     53                       HorizontalAlignment="Left"
     54                       Text="Gegenstand:"/>
    5055        </StackPanel>
    51         <Border BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="0,52,0,0">
     56        <Border BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="0,70,0,0">
    5257            <Viewport3D Name="viewport3D1" Margin="0,-1,0,0" >
    5358                <Viewport3D.Camera>
    54                     <PerspectiveCamera x:Name="camMain" Position="0.5 8 8" LookDirection="0 -1 -1"> <!-- camera position for design time-->
     59                    <PerspectiveCamera x:Name="camMain" Position="0.5 8 8" LookDirection="0 -1 -1">
     60                        <!-- camera position for design time-->
    5561                    </PerspectiveCamera>
    5662                </Viewport3D.Camera>
  • 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.