- Timestamp:
- 07/21/16 15:08:21 (8 years ago)
- 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 71 71 if (packing == null) return; 72 72 // the container should fill the whole size 73 var scalingX = renderSize.Width / Packing.Bin Measures.Width;74 var scalingY = renderSize.Height / Packing.Bin Measures.Width;73 var scalingX = renderSize.Width / Packing.BinShape.Width; 74 var scalingY = renderSize.Height / Packing.BinShape.Width; 75 75 // draw container 76 76 drawingContext.DrawRectangle(Brushes.LightGray, new Pen(Brushes.Black, 1), new Rect(new Point(0, 0), renderSize)); … … 79 79 var unselectedBrush = selectedItemKey < 0 ? selectedBrush : Brushes.DarkGray; 80 80 81 foreach (var t in Packing.Item Measures) {81 foreach (var t in Packing.Items) { 82 82 var key = t.Key; 83 83 var item = t.Value; 84 var pos = Packing. ItemPositions[key];84 var pos = Packing.Positions[key]; 85 85 86 86 var scaledPos = new Point(pos.X * scalingX, pos.Y * scalingY); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml
r14153 r14154 128 128 </RotateTransform3D> 129 129 <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"/> 131 131 </Transform3DGroup> 132 132 </ModelVisual3D.Transform> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs
r14151 r14154 47 47 public Container3DView() { 48 48 InitializeComponent(); 49 camMain.Position = new Point3D(0.5, 2, 2); // for design time we use a different camera position49 camMain.Position = new Point3D(0.5, 3, 3); // for design time we use a different camera position 50 50 Clear(); 51 51 } … … 80 80 // - from rotation and Z-ordering 81 81 82 foreach (var item in packing.Item Measures.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]; 84 84 85 85 var w = position.Rotated ? item.Value.Depth : item.Value.Width; … … 98 98 } 99 99 100 var container = packing.Bin Measures;100 var container = packing.BinShape; 101 101 // draw a transparent container 102 102 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 67 67 int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0; 68 68 var packing = Content.BinPackings[currentBin]; 69 foreach (var item in packing.Item Measures) {69 foreach (var item in packing.Items) { 70 70 itemSelection.Items.Add(item.Key); 71 71 }
Note: See TracChangeset
for help on using the changeset viewer.