Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml	(revision 15454)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml	(revision 15488)
@@ -33,6 +33,21 @@
              >
     <Grid Margin="0,0,-64,-57">
-        <CheckBox Name="showExtremePointsCheckBox" Content="Show extreme points" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,6,0,0" Unchecked="showExtremePointsCheckBoxOnUnchecked" Checked="showExtremePointsCheckBoxOnChecked"/>
-        <Border BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="0,30,0,0">
+        <StackPanel>
+            <CheckBox Name="showExtremePointsCheckBox" 
+                      Content="Show extreme points" 
+                      VerticalAlignment="Top" 
+                      HorizontalAlignment="Left" 
+                      Margin="10,6,0,0" 
+                      Unchecked="ShowExtremePointsCheckBoxOnUnchecked" 
+                      Checked="ShowExtremePointsCheckBoxOnChecked"/>
+            <CheckBox Name="showResidualSpaceCheckBox" 
+                      Content="Show residual spaces" 
+                      VerticalAlignment="Top" 
+                      HorizontalAlignment="Left" 
+                      Margin="10,6,0,0" 
+                      Unchecked="ShowResidualSpacesCheckBoxOnUnchecked" 
+                      Checked="ShowResidualSpacesCheckBoxOnChecked"/>
+        </StackPanel>
+        <Border BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="0,52,0,0">
             <Viewport3D Name="viewport3D1" Margin="0,-1,0,0" >
                 <Viewport3D.Camera>
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs	(revision 15454)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs	(revision 15488)
@@ -27,4 +27,5 @@
 using System.Windows.Media.Media3D;
 using HeuristicLab.Problems.BinPacking3D;
+using HeuristicLab.Collections;
 
 namespace HeuristicLab.Problems.BinPacking.Views {
@@ -49,4 +50,5 @@
     private static readonly Color hiddenColor = Color.FromArgb(0x1A, 0xAA, 0xAA, 0xAA);
     private static readonly Color containerColor = Color.FromArgb(0x7F, 0xAA, 0xAA, 0xAA);
+    private static readonly Color residualSpaceColor = Color.FromArgb(0x7F, 0xAA, 0xAA, 0x00);
 
     private Point startPos;
@@ -55,5 +57,7 @@
     private double startAngleY;
     private int selectedItemKey;
+    private int selectedExtremePointIndex;
     private bool showExtremePoints;
+    private bool showResidualSpaces;
 
     private BinPacking<BinPacking3D.PackingPosition, PackingShape, PackingItem> packing;
@@ -70,8 +74,14 @@
     private Dictionary<int, DiffuseMaterial> materials;
 
+    public ObservableDictionary<BinPacking3D.PackingPosition, Tuple<int, int, int>> ResidualSpaces { get; set; }
+    public ObservableCollection<BinPacking3D.PackingPosition> ExtremePoints { get; set; }
+
     public Container3DView() {
       InitializeComponent();
       camMain.Position = new Point3D(0.5, 3, 3); // for design time we use a different camera position 
       materials = new Dictionary<int, DiffuseMaterial>();
+      ResidualSpaces = new ObservableDictionary<BinPacking3D.PackingPosition, Tuple<int, int, int>>();
+      ExtremePoints = new ObservableCollection<BinPacking3D.PackingPosition>();
+      selectedExtremePointIndex = -1;
       Clear();
     }
@@ -85,4 +95,13 @@
     }
 
+    /// <summary>
+    /// Selects another extreme point
+    /// </summary>
+    /// <param name="index"></param>
+    public void SelectExtremePoint(int index) {
+      selectedExtremePointIndex = index;
+      UpdateVisualization();
+    }
+
     public void SelectItem(int itemKey) {
       // selection of an item should make all other items semi-transparent
@@ -90,7 +109,9 @@
       UpdateVisualization();
     }
+
     public void ClearSelection() {
       // remove all transparency
       selectedItemKey = -1;
+      selectedExtremePointIndex = -1;
       UpdateVisualization();
     }
@@ -98,5 +119,6 @@
     private void UpdateVisualization() {
       Clear();
-      if (packing == null) return; // nothing to display
+      if (packing == null)
+        return; // nothing to display
 
       var modelGroup = (Model3DGroup)MyModel.Content;
@@ -108,5 +130,6 @@
 
         var colorIdx = selectedItem.Value.Material;
-        while (colorIdx < 0) colorIdx += colors.Length;
+        while (colorIdx < 0)
+          colorIdx += colors.Length;
         colorIdx = colorIdx % colors.Length;
         var color = colors[colorIdx];
@@ -132,4 +155,6 @@
           modelGroup.Children.Add(model);
         }
+
+
       } else {
         foreach (var item in packing.Items) {
@@ -144,5 +169,6 @@
           if (!materials.TryGetValue(item.Value.Material, out material)) {
             var colorIdx = item.Value.Material;
-            while (colorIdx < 0) colorIdx += colors.Length;
+            while (colorIdx < 0)
+              colorIdx += colors.Length;
             colorIdx = colorIdx % colors.Length;
             var color = colors[colorIdx];
@@ -156,14 +182,6 @@
       }
 
-      if (showExtremePoints) {
-        // draw extreme-points
-        var maxMag = (int)Math.Log10(Math.Max(packing.BinShape.Depth, Math.Max(packing.BinShape.Height, packing.BinShape.Width)));
-        var cubeSize = (int)Math.Max(Math.Pow(10, maxMag - 2), 1);
-        foreach (var ep in packing.ExtremePoints) {
-          var epModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = new DiffuseMaterial() { Brush = new SolidColorBrush(Colors.Red) } };
-          AddSolidCube((MeshGeometry3D)epModel.Geometry, ep.X, ep.Y, ep.Z, cubeSize, cubeSize, cubeSize);
-          modelGroup.Children.Add(epModel);
-        }
-      }
+
+      AddExtremePoints(modelGroup);
 
       var container = packing.BinShape;
@@ -191,4 +209,50 @@
     }
 
+    private void AddExtremePoints(Model3DGroup modelGroup) {
+      if (showExtremePoints) {
+        // draw extreme-points
+        var maxMag = (int)Math.Log10(Math.Max(packing.BinShape.Depth, Math.Max(packing.BinShape.Height, packing.BinShape.Width)));
+        var cubeSize = (int)Math.Max(Math.Pow(10, maxMag - 2), 1);
+        BinPacking3D.PackingPosition selectedExtremePoint = null;
+        if (selectedExtremePointIndex < 0) {
+          foreach (var ep in ExtremePoints) {
+            AddResidualSpacesForExtremePoint(modelGroup, ep);
+          }
+        } else {
+          selectedExtremePoint = ExtremePoints.ToList()[selectedExtremePointIndex];
+          AddResidualSpacesForExtremePoint(modelGroup, selectedExtremePoint);
+        }
+
+        foreach (var ep in ExtremePoints) {
+          Color color;
+          if (ep.Equals(selectedExtremePoint)) {
+            color = Colors.Yellow;
+          } else {
+            color = Colors.Red;
+          }
+          var epModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = new DiffuseMaterial() { Brush = new SolidColorBrush(color) } };
+          AddSolidCube((MeshGeometry3D)epModel.Geometry, ep.X, ep.Y, ep.Z, cubeSize, cubeSize, cubeSize);
+          modelGroup.Children.Add(epModel);
+        }
+      }
+    }
+
+    private void AddResidualSpacesForExtremePoint(Model3DGroup modelGroup, BinPacking3D.PackingPosition extremePoint) {
+      if (showResidualSpaces) {
+        var rs = ResidualSpaces[extremePoint];
+        var containerModel1 = new GeometryModel3D(new MeshGeometry3D(), new DiffuseMaterial(new SolidColorBrush(residualSpaceColor)));
+
+        modelGroup.Children.Add(containerModel1);
+        AddWireframeCube((MeshGeometry3D)containerModel1.Geometry,
+          extremePoint.X,
+          extremePoint.Y,
+          extremePoint.Z,
+          rs.Item1,
+          rs.Item2,
+          rs.Item3);
+
+      }
+    }
+
 
     private void Clear() {
@@ -202,5 +266,6 @@
 
     private void Container3DView_MouseMove(object sender, MouseEventArgs e) {
-      if (!mouseDown) return;
+      if (!mouseDown)
+        return;
       var pos = e.GetPosition((IInputElement)this);
 
@@ -235,10 +300,19 @@
       Focus(); // for mouse wheel events
     }
-    private void showExtremePointsCheckBoxOnChecked(object sender, RoutedEventArgs e) {
+    private void ShowExtremePointsCheckBoxOnChecked(object sender, RoutedEventArgs e) {
       showExtremePoints = true;
       UpdateVisualization();
     }
-    private void showExtremePointsCheckBoxOnUnchecked(object sender, RoutedEventArgs e) {
+    private void ShowExtremePointsCheckBoxOnUnchecked(object sender, RoutedEventArgs e) {
       showExtremePoints = false;
+      UpdateVisualization();
+    }
+
+    private void ShowResidualSpacesCheckBoxOnChecked(object sender, RoutedEventArgs e) {
+      showResidualSpaces = true;
+      UpdateVisualization();
+    }
+    private void ShowResidualSpacesCheckBoxOnUnchecked(object sender, RoutedEventArgs e) {
+      showResidualSpaces = false;
       UpdateVisualization();
     }
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs	(revision 15454)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs	(revision 15488)
@@ -49,4 +49,5 @@
       this.elementHost = new System.Windows.Forms.Integration.ElementHost();
       this.packingPlan3D = new HeuristicLab.Problems.BinPacking.Views.Container3DView();
+      this.extremePointsSelection = new System.Windows.Forms.ListBox();
       this.SuspendLayout();
       // 
@@ -58,5 +59,5 @@
       this.binSelection.Location = new System.Drawing.Point(3, 3);
       this.binSelection.Name = "binSelection";
-      this.binSelection.Size = new System.Drawing.Size(54, 290);
+      this.binSelection.Size = new System.Drawing.Size(54, 264);
       this.binSelection.TabIndex = 4;
       this.binSelection.SelectedIndexChanged += new System.EventHandler(this.binSelection_SelectedIndexChanged);
@@ -69,5 +70,5 @@
       this.itemSelection.Location = new System.Drawing.Point(58, 3);
       this.itemSelection.Name = "itemSelection";
-      this.itemSelection.Size = new System.Drawing.Size(55, 290);
+      this.itemSelection.Size = new System.Drawing.Size(55, 264);
       this.itemSelection.TabIndex = 5;
       this.itemSelection.SelectedIndexChanged += new System.EventHandler(this.itemSelection_SelectedIndexChanged);
@@ -78,10 +79,21 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-      this.elementHost.Location = new System.Drawing.Point(119, 3);
+      this.elementHost.Location = new System.Drawing.Point(198, 3);
       this.elementHost.Name = "elementHost";
-      this.elementHost.Size = new System.Drawing.Size(229, 290);
+      this.elementHost.Size = new System.Drawing.Size(273, 264);
       this.elementHost.TabIndex = 6;
       this.elementHost.Text = "elementHost";
       this.elementHost.Child = this.packingPlan3D;
+      // 
+      // extremePointsSelection
+      // 
+      this.extremePointsSelection.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+      this.extremePointsSelection.FormattingEnabled = true;
+      this.extremePointsSelection.Location = new System.Drawing.Point(115, 3);
+      this.extremePointsSelection.Name = "extremePointsSelection";
+      this.extremePointsSelection.Size = new System.Drawing.Size(77, 264);
+      this.extremePointsSelection.TabIndex = 7;
+      this.extremePointsSelection.SelectedIndexChanged += new System.EventHandler(this.extremePointsSelection_SelectedIndexChanged);
       // 
       // PackingPlan3DView
@@ -89,9 +101,10 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.extremePointsSelection);
       this.Controls.Add(this.elementHost);
       this.Controls.Add(this.itemSelection);
       this.Controls.Add(this.binSelection);
       this.Name = "PackingPlan3DView";
-      this.Size = new System.Drawing.Size(351, 299);
+      this.Size = new System.Drawing.Size(489, 278);
       this.ResumeLayout(false);
 
@@ -104,4 +117,5 @@
     private System.Windows.Forms.Integration.ElementHost elementHost;
     private Container3DView packingPlan3D;
+    private System.Windows.Forms.ListBox extremePointsSelection;
   }
 }
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.cs	(revision 15454)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.cs	(revision 15488)
@@ -47,6 +47,8 @@
       } else {
         int i = 0;
-        foreach (var bp in Content.Bins)
+        foreach (var bp in Content.Bins) {
           binSelection.Items.Add(i++ + " (" + Math.Round(bp.PackingDensity * 100, 2) + "%)");
+        }
+
 
         binSelection.SelectedIndex = 0;
@@ -63,4 +65,7 @@
       itemSelection.SelectedIndex = -1;
       itemSelection.Items.Clear();
+      extremePointsSelection.Items.Clear();
+      packingPlan3D.ResidualSpaces.Clear();
+      packingPlan3D.ExtremePoints.Clear();
 
       // add items of this container
@@ -69,4 +74,10 @@
       foreach (var item in packing.Items) {
         itemSelection.Items.Add(item.Key);
+      }
+      foreach (var ep in packing.ExtremePoints) {
+        var rs = ((BinPacking3D.BinPacking3D)packing).ResidualSpace[ep];
+        extremePointsSelection.Items.Add($"({ep.X}, {ep.Y}, {ep.Z})");
+        packingPlan3D.ExtremePoints.Add(ep);
+        packingPlan3D.ResidualSpaces.Add(ep, rs);
       }
 
@@ -81,4 +92,12 @@
         packingPlan3D.ClearSelection();
     }
+
+    private void extremePointsSelection_SelectedIndexChanged(object sender, EventArgs e) {
+      if (extremePointsSelection != null && extremePointsSelection.SelectedIndex >= 0) {
+        packingPlan3D.SelectExtremePoint(extremePointsSelection.SelectedIndex);
+      } else {
+        packingPlan3D.ClearSelection();
+      }
+    }
   }
 }
