Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/21/16 15:08:21 (8 years ago)
Author:
gkronber
Message:

#1966: refactoring

Location:
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs

    r14151 r14154  
    7171      if (packing == null) return;
    7272      // the container should fill the whole size
    73       var scalingX = renderSize.Width / Packing.BinMeasures.Width;
    74       var scalingY = renderSize.Height / Packing.BinMeasures.Width;
     73      var scalingX = renderSize.Width / Packing.BinShape.Width;
     74      var scalingY = renderSize.Height / Packing.BinShape.Width;
    7575      // draw container
    7676      drawingContext.DrawRectangle(Brushes.LightGray, new Pen(Brushes.Black, 1), new Rect(new Point(0, 0), renderSize));
     
    7979      var unselectedBrush = selectedItemKey < 0 ? selectedBrush : Brushes.DarkGray;
    8080
    81       foreach (var t in Packing.ItemMeasures) {
     81      foreach (var t in Packing.Items) {
    8282        var key = t.Key;
    8383        var item = t.Value;
    84         var pos = Packing.ItemPositions[key];
     84        var pos = Packing.Positions[key];
    8585
    8686        var scaledPos = new Point(pos.X * scalingX, pos.Y * scalingY);
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml

    r14153 r14154  
    128128                        </RotateTransform3D>
    129129                        <TranslateTransform3D OffsetX="0.5" OffsetY="0.5" OffsetZ="0.5" />
    130                         <ScaleTransform3D x:Name="scaleZoom" CenterX="0.5" CenterY="0.5" CenterZ="0.5" ScaleX="0.6" ScaleY="0.6" ScaleZ="0.6"/>
     130                        <ScaleTransform3D x:Name="scaleZoom" CenterX="0.5" CenterY="0.5" CenterZ="0.5" ScaleX="1" ScaleY="1" ScaleZ="1"/>
    131131                    </Transform3DGroup>
    132132                </ModelVisual3D.Transform>
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs

    r14151 r14154  
    4747    public Container3DView() {
    4848      InitializeComponent();
    49       camMain.Position = new Point3D(0.5, 2, 2); // for design time we use a different camera position
     49      camMain.Position = new Point3D(0.5, 3, 3); // for design time we use a different camera position
    5050      Clear();
    5151    }
     
    8080      //  - from rotation and Z-ordering
    8181
    82       foreach (var item in packing.ItemMeasures.OrderBy(i => packing.ItemPositions[i.Key].Z)) {
    83         var position = packing.ItemPositions[item.Key];
     82      foreach (var item in packing.Items.OrderBy(i => packing.Positions[i.Key].Z)) {
     83        var position = packing.Positions[item.Key];
    8484
    8585        var w = position.Rotated ? item.Value.Depth : item.Value.Width;
     
    9898      }
    9999
    100       var container = packing.BinMeasures;
     100      var container = packing.BinShape;
    101101      // draw a transparent container
    102102      AddCube(meshTransparent, container.Origin.X, container.Origin.Y, container.Origin.Z, container.Width, container.Height, container.Depth, addInsideTriangles: true);
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.cs

    r14151 r14154  
    6767      int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0;
    6868      var packing = Content.BinPackings[currentBin];
    69       foreach (var item in packing.ItemMeasures) {
     69      foreach (var item in packing.Items) {
    7070        itemSelection.Items.Add(item.Key);
    7171      }
Note: See TracChangeset for help on using the changeset viewer.