Ignore:
Timestamp:
12/20/17 16:15:38 (3 years ago)
Author:
rhanghof
Message:

#2817:

  • Unittests
  • Bugfixes on the line projection based extreme point creation method
File:
1 edited

Legend:

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

    r15520 r15554  
    7474    private Dictionary<int, DiffuseMaterial> materials;
    7575
    76     public ObservableDictionary<BinPacking3D.PackingPosition, ResidualSpace> ResidualSpaces { get; set; }
     76    public ObservableDictionary<BinPacking3D.PackingPosition, IList<ResidualSpace>> ResidualSpaces { get; set; }
    7777    public ObservableCollection<BinPacking3D.PackingPosition> ExtremePoints { get; set; }
    7878
     
    8181      camMain.Position = new Point3D(0.5, 3, 3); // for design time we use a different camera position
    8282      materials = new Dictionary<int, DiffuseMaterial>();
    83       ResidualSpaces = new ObservableDictionary<BinPacking3D.PackingPosition, ResidualSpace>();
     83      ResidualSpaces = new ObservableDictionary<BinPacking3D.PackingPosition, IList<ResidualSpace>>();
    8484      ExtremePoints = new ObservableCollection<BinPacking3D.PackingPosition>();
    8585      selectedExtremePointIndex = -1;
     
    240240    private void AddResidualSpacesForExtremePoint(Model3DGroup modelGroup, BinPacking3D.PackingPosition extremePoint) {
    241241      if (showResidualSpaces) {
    242         var rs = ResidualSpaces[extremePoint];
    243         var containerModel1 = new GeometryModel3D(new MeshGeometry3D(), new DiffuseMaterial(new SolidColorBrush(residualSpaceColor)));
    244 
    245         modelGroup.Children.Add(containerModel1);
    246         AddWireframeCube((MeshGeometry3D)containerModel1.Geometry,
    247           extremePoint.X,
    248           extremePoint.Y,
    249           extremePoint.Z,
    250           rs.Width,
    251           rs.Height,
    252           rs.Depth);
    253 
     242        foreach (var rs in ResidualSpaces[extremePoint]) {
     243          var containerModel1 = new GeometryModel3D(new MeshGeometry3D(), new DiffuseMaterial(new SolidColorBrush(residualSpaceColor)));
     244
     245          modelGroup.Children.Add(containerModel1);
     246
     247          AddWireframeCube((MeshGeometry3D)containerModel1.Geometry,
     248            extremePoint.X,
     249            extremePoint.Y,
     250            extremePoint.Z,
     251            rs.Width,
     252            rs.Height,
     253            rs.Depth);
     254        }
    254255      }
     256       
    255257    }
    256258
Note: See TracChangeset for help on using the changeset viewer.