Ignore:
Timestamp:
02/01/18 12:21:34 (2 years ago)
Author:
rhanghof
Message:

#2817

  • Former material is now the layer.
  • Added material enumeration
  • Modification at the minimum residual space left bin packer
File:
1 edited

Legend:

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

    r15646 r15705  
    131131        var selectedPos = packing.Positions[selectedItem.Key];
    132132
    133         var colorIdx = selectedItem.Value.Material;
     133        var colorIdx = selectedItem.Value.Layer;
    134134        while (colorIdx < 0)
    135135          colorIdx += colors.Length;
     
    137137        var color = colors[colorIdx];
    138138        var material = new DiffuseMaterial { Brush = new SolidColorBrush(color) };
    139         materials[selectedItem.Value.Material] = material;
     139        materials[selectedItem.Value.Layer] = material;
    140140
    141141        var selectedModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = material };
     
    169169          var model = new GeometryModel3D { Geometry = new MeshGeometry3D() };
    170170          DiffuseMaterial material;
    171           if (!materials.TryGetValue(item.Value.Material, out material)) {
    172             var colorIdx = item.Value.Material;
     171          if (!materials.TryGetValue(item.Value.Layer, out material)) {
     172            var colorIdx = item.Value.Layer;
    173173            while (colorIdx < 0)
    174174              colorIdx += colors.Length;
     
    176176            var color = colors[colorIdx];
    177177            material = new DiffuseMaterial { Brush = new SolidColorBrush(color) };
    178             materials[item.Value.Material] = material;
     178            materials[item.Value.Layer] = material;
    179179          }
    180180          var selectedModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = material };
Note: See TracChangeset for help on using the changeset viewer.