public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (ctrl == graphCtrlPallet) { PalletProperties pp = CurrentPallet; Pallet pallet = new Pallet(pp); pallet.Draw(graphics, Transform3D.Identity); DimensionCube dc = new DimensionCube(pp.Length, pp.Width, pp.Height) { FontSize = 6.0f }; graphics.AddDimensions(dc); } else if (ctrl == graphCtrlSolution) { if (null == CurrentSolution) return; CasePalletSolutionViewer sv = new CasePalletSolutionViewer(CurrentSolution); sv.Draw(graphics); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { bool showDimensions = true; ViewerSolution sv = new ViewerSolution( Solution); sv.Draw(graphics, showDimensions); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { // ### draw pallet if (graphCtrlPallet == ctrl) { PalletProperties pp = SelectedPallet; Pallet pallet = new Pallet(pp); pallet.Draw(graphics, Transform3D.Identity); DimensionCube dc = new DimensionCube(pp.Length, pp.Width, pp.Height) { FontSize = 6.0f }; graphics.AddDimensions(dc); } // ### draw case definition else if (ctrl == graphCtrlBoxesLayout) { // ### draw case definition try { // get selected solution CaseOptimSolution solution = SelectedSolution; if (null == solution) return; // instantiate case definition viewer CaseDefinitionViewer cdv = new CaseDefinitionViewer(SelectedSolution.CaseDefinition, SelectedBox, BuildCaseOptimConstraintSet()); cdv.Orientation = SelectedSolution.PalletSolution.FirstCaseOrientation; cdv.Draw(graphics); } catch (Exception ex) { _log.Error(ex.ToString()); } } // ### draw associated pallet solution else if (ctrl == graphCtrlPalletLayout) { try { // get selected solution CaseOptimSolution solution = SelectedSolution; // get selected box BoxProperties boxProperties = SelectedBox; // get selected pallet PalletProperties palletProperties = SelectedPallet; if (null != solution && null != boxProperties && null != palletProperties) { Vector3D outerDim = solution.CaseDefinition.OuterDimensions(boxProperties, BuildCaseOptimConstraintSet()); BoxProperties caseProperties = new BoxProperties(null, outerDim.X, outerDim.Y, outerDim.Z); caseProperties.SetColor(Color.Chocolate); CasePalletSolutionViewer.Draw(graphics, solution.PalletSolution, caseProperties, null, palletProperties); } } catch (Exception ex) { _log.Error(ex.ToString()); } } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (ctrl == graphCtrlBoxesLayout) { // ### draw case definition try { // get selected solution CaseOptimSolution solution = SelectedSolution; if (null == solution) return; // instantiate case definition viewer CaseDefinitionViewer cdv = new CaseDefinitionViewer(SelectedSolution.CaseDefinition, SelectedBox, BuildCaseOptimConstraintSet()); cdv.Orientation = SelectedSolution.PalletSolution.FirstCaseOrientation; cdv.Draw(graphics); } catch (Exception ex) { _log.Error(ex.ToString()); } } if (ctrl == graphCtrlPallet) { // ### draw associated pallet solution try { // get selected solution CaseOptimSolution solution = SelectedSolution; // get selected box BoxProperties boxProperties = SelectedBox; // get selected pallet PalletProperties palletProperties = SelectedPallet; if (null != solution && null != boxProperties && null != palletProperties) { Vector3D outerDim = solution.CaseDefinition.OuterDimensions(boxProperties, BuildCaseOptimConstraintSet()); BoxProperties caseProperties = new BoxProperties(null, outerDim.X, outerDim.Y, outerDim.Z); caseProperties.SetColor(Color.Chocolate); CasePalletSolutionViewer.Draw(graphics, solution.PalletSolution, caseProperties, null, palletProperties); } } catch (Exception ex) { _log.Error(ex.ToString()); } } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (graphCtrlPallet == ctrl) { Pallet pallet = new Pallet(_palletProperties); pallet.Draw(graphics, Transform3D.Identity); DimensionCube dc = new DimensionCube(_palletProperties.Length, _palletProperties.Width, _palletProperties.Height) { FontSize = 6.0f }; graphics.AddDimensions(dc); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (graphCtrlCaseSolution == ctrl) { // instantiate solution viewer BoxCasePalletSolutionViewer sv = new BoxCasePalletSolutionViewer(GetCurrentSolution()); sv.Draw(graphics); } else if (graphCtrlPalletSolution == ctrl) { CasePalletSolution sol = GetCurrentSolution().PalletSolutionDesc.LoadPalletSolution(); // instantial solution viewer CasePalletSolutionViewer svPallet = new CasePalletSolutionViewer(sol); svPallet.Draw(graphics); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (CornerLength > 0 && CornerWidth > 0 && CornerThickness > 0 && CornerThickness < CornerWidth) { // draw PalletCornerProperties palletCornerProperties = new PalletCornerProperties( null, ItemName, ItemDescription, CornerLength, CornerWidth, CornerThickness, CornerWeight, CornerColor); Corner palletCap = new Corner(0, palletCornerProperties); palletCap.Draw(graphics); graphics.AddDimensions(new DimensionCube(CornerWidth, CornerWidth, CornerLength)); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (TruckLength == 0 || TruckWidth == 0 || TruckHeight == 0) return; TruckProperties truckProperties = new TruckProperties(null, TruckLength, TruckWidth, TruckHeight); truckProperties.Color = TruckColor; Truck truck = new Truck(truckProperties); truck.DrawBegin(graphics); truck.DrawEnd(graphics); graphics.AddDimensions(new DimensionCube(TruckLength, TruckWidth, TruckHeight)); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (CapLength > 0 && CapWidth > 0 && CapHeight > 0) { // draw PalletCapProperties palletCapProperties = new PalletCapProperties( null, ItemName, ItemDescription, CapLength, CapWidth, CapHeight, CapInnerLength, CapInnerWidth, CapInnerHeight, CapWeight, CapColor); PalletCap palletCap = new PalletCap(0, palletCapProperties, Vector3D.Zero); palletCap.Draw(graphics); graphics.AddDimensions(new DimensionCube(CapLength, CapWidth, CapHeight)); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (graphCtrlBoxCase == ctrl) { BoxProperties boxProperties = new BoxProperties(null , _caseOfBoxesProperties.Length, _caseOfBoxesProperties.Width, _caseOfBoxesProperties.Height); boxProperties.SetAllColors(_faceColors); boxProperties.TextureList = _textures; Box box = new Box(0, boxProperties); graphics.AddBox(box); graphics.AddDimensions(new DimensionCube(_caseOfBoxesProperties.Length, _caseOfBoxesProperties.Width, _caseOfBoxesProperties.Height)); } else if (graphCtrlCaseDefinition == ctrl) { CaseDefinitionViewer viewer = new CaseDefinitionViewer(_caseOfBoxesProperties.CaseDefinition, _caseOfBoxesProperties.InsideBoxProperties, _caseOfBoxesProperties.CaseOptimConstraintSet); viewer.CaseProperties = _caseOfBoxesProperties; viewer.Orientation = new Basics.Orientation(HalfAxis.HAxis.AXIS_X_P, HalfAxis.HAxis.AXIS_Y_P); viewer.Draw(graphics); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (ctrl == graphCtrlPallet) { // instantiate solution viewer CasePalletSolutionViewer sv = new CasePalletSolutionViewer(GetCurrentSolution()); sv.Draw(graphics); } else if (ctrl == graphCtrlCase) { // get case of boxes CaseOfBoxesProperties caseOfBoxes = _analysis.BProperties as CaseOfBoxesProperties; // draw CaseDefinitionViewer cdv = new CaseDefinitionViewer(caseOfBoxes.CaseDefinition, caseOfBoxes.InsideBoxProperties, caseOfBoxes.CaseOptimConstraintSet); cdv.CaseProperties = caseOfBoxes; cdv.Orientation = GetCurrentSolution().FirstCaseOrientation; cdv.Draw(graphics); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { BoxProperties boxProperties = new BoxProperties(null, (double)nudLength.Value, (double)nudWidth.Value, (double)nudHeight.Value); boxProperties.SetAllColors(_faceColors); boxProperties.TextureList = _textures; boxProperties.ShowTape = ShowTape; boxProperties.TapeColor = TapeColor; boxProperties.TapeWidth = TapeWidth; Box box = new Box(0, boxProperties); graphics.AddBox(box); graphics.AddDimensions(new DimensionCube((double)nudLength.Value, (double)nudWidth.Value, (double)nudHeight.Value)); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { CylinderProperties cylProperties = new CylinderProperties( null, CylinderName, Description , RadiusOuter, RadiusInner, CylinderHeight, Weight , ColorTop, ColorWallOuter, ColorWallInner); Cylinder cyl = new Cylinder(0, cylProperties); graphics.AddCylinder(cyl); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (0 == cbType.Items.Count) return; PalletProperties palletProperties = new PalletProperties(null, PalletTypeName, PalletLength, PalletWidth, PalletHeight); palletProperties.Color = PalletColor; Pallet pallet = new Pallet(palletProperties); pallet.Draw(graphics, Transform3D.Identity); graphics.AddDimensions(new DimensionCube(PalletLength, PalletWidth, PalletHeight)); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (null == _dt) return; DataCase dtCase = _dt as DataCase; if (null != dtCase) { Box b = new Box(0, ToCase(dtCase)); graphics.AddBox(b); graphics.AddDimensions(new DimensionCube(dtCase.OuterDimensions)); } DataBox dtBox = _dt as DataBox; if (null != dtBox) { Box b = new Box(0, ToBox(dtBox)); graphics.AddBox(b); graphics.AddDimensions(new DimensionCube(dtBox.Dimensions)); } DataPallet dtPallet = _dt as DataPallet; if (null != dtPallet) { Pallet pallet = new Pallet(ToPallet(dtPallet)); pallet.Draw(graphics, Sharp3D.Math.Core.Transform3D.Identity); graphics.AddDimensions(new DimensionCube(dtPallet.Dimensions)); } DataInterlayer dtInterlayer = _dt as DataInterlayer; if (null != dtInterlayer) { graphics.AddBox(new Box(0, ToInterlayer(dtInterlayer))); graphics.AddDimensions(new DimensionCube(dtInterlayer.Dimensions)); } DataPalletCap dtPalletCap = _dt as DataPalletCap; if (null != dtPalletCap) { PalletCap palletCap = new PalletCap(0, ToPalletCap(dtPalletCap), Sharp3D.Math.Core.Vector3D.Zero); palletCap.Draw(graphics); graphics.AddDimensions(new DimensionCube(dtPalletCap.Dimensions)); } DataCylinder dtCylinder = _dt as DataCylinder; if (null != dtCylinder) { Cylinder cyl = new Cylinder(0, ToCylinder(dtCylinder)); graphics.AddCylinder(cyl); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { try { // instantiate solution viewer CasePalletSolutionViewer sv = new CasePalletSolutionViewer(CurrentSolution); sv.Draw(graphics); } catch (Exception ex) { _log.Error(ex.ToString()); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (null == CurrentSolution) return; BoxCaseSolutionViewer sv = new BoxCaseSolutionViewer(CurrentSolution); sv.Draw(graphics); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { BundleProperties bundleProperties = new BundleProperties( null, BundleName, Description , BundleLength, BundleWidth, UnitThickness, UnitWeight, NoFlats, Color); Box box = new Box(0, bundleProperties); graphics.AddBox(box); graphics.AddDimensions(new DimensionCube(BundleLength, BundleWidth, UnitThickness * NoFlats)); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { // build pack PackProperties packProperties = new PackProperties(null, SelectedBox, Arrangement, BoxOrientation, Wrapper); if (uCtrlOuterDimensions.Checked) packProperties.ForceOuterDimensions( new Vector3D(uCtrlOuterDimensions.X, uCtrlOuterDimensions.Y, uCtrlOuterDimensions.Z) ); Pack pack = new Pack(0, packProperties); pack.ForceTransparency = true; graphics.AddBox(pack); graphics.AddDimensions(new DimensionCube(Vector3D.Zero, pack.Length, pack.Width, pack.Height, Color.Black, true)); if (packProperties.Wrap.Transparent) graphics.AddDimensions( new DimensionCube( packProperties.InnerOffset , packProperties.InnerLength, packProperties.InnerWidth, packProperties.InnerHeight , Color.Red, false)); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { InterlayerProperties interlayerProperties = new InterlayerProperties( null, tbName.Text, tbDescription.Text , InterlayerLength, InterlayerWidth , Thickness, Weight, Color); Box box = new Box(0, interlayerProperties); graphics.AddBox(box); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { // instantiate solution viewer PackPalletSolutionViewer sv = new PackPalletSolutionViewer(GetCurrentSolution()); sv.Draw(graphics); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { TruckProperties truckProp = _sol.ParentTruckAnalysis.TruckProperties; graphics.AddDimensions(new DimensionCube(_sol.LoadBoundingBox, Color.Red, false)); graphics.AddDimensions(new DimensionCube(Vector3D.Zero, truckProp.Length, truckProp.Width, truckProp.Height, Color.Black, true)); // draw solution TruckSolutionViewer sv = new TruckSolutionViewer(_sol); sv.Draw(graphics); }