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) { StrapperSet.SetDimension(OuterDimensions); // build pack PackProperties packProperties = new PackProperties( null, SelectedBox, Arrangement, BoxOrientation, Wrapper) { StrapperSet = StrapperSet }; if (uCtrlOuterDimensions.Checked) { packProperties.ForceOuterDimensions( new Vector3D(uCtrlOuterDimensions.X, uCtrlOuterDimensions.Y, uCtrlOuterDimensions.Z)); } Pack pack = new Pack(0, packProperties) { 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) { // instantiate solution viewer CylinderPalletSolutionViewer sv = new CylinderPalletSolutionViewer(GetCurrentSolution()); sv.Draw(graphics); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { // instantiate solution viewer BoxCaseSolutionViewer sv = new BoxCaseSolutionViewer(GetCurrentSolution()); sv.Draw(graphics); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (ctrl == graphCtrlBoxesLayout) { // ### draw case definition try { } catch (Exception ex) { _log.Error(ex.ToString()); } } if (ctrl == graphCtrlPallet) { // ### draw associated pallet solution try { } catch (Exception ex) { _log.Error(ex.ToString()); } } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (ctrl == graphCtrl) { ViewerSolution vs = new ViewerSolution(_analysis.SolutionLay); vs.Draw(graphics, Transform3D.Identity); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { InterlayerProperties interlayerProperties = new InterlayerProperties( null, tbName.Text, tbDescription.Text , InterlayerLength, InterlayerWidth, Thickness, Weight, Color); graphics.AddBox(new Box(0, interlayerProperties)); graphics.AddDimensions(new DimensionCube(InterlayerLength, InterlayerWidth, Thickness)); }
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) { if (null == CurrentSolution) { return; } BoxCaseSolutionViewer sv = new BoxCaseSolutionViewer(CurrentSolution); sv.Draw(graphics); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { BoxProperties boxProperties = new BoxProperties(null, _boxProperties.Length, _boxProperties.Width, _boxProperties.Height); boxProperties.SetAllColors(_boxProperties.Colors); boxProperties.TapeColor = _boxProperties.TapeColor; boxProperties.TapeWidth = _boxProperties.TapeWidth; boxProperties.TextureList = _textures; graphics.AddBox(new Box(0, boxProperties)); }
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 (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) { BoxProperties boxProperties = new BoxProperties(null, uCtrlDimensionsOuter.ValueX, uCtrlDimensionsOuter.ValueY, uCtrlDimensionsOuter.ValueZ); boxProperties.SetAllColors(_faceColors); boxProperties.TextureList = _textures; boxProperties.TapeWidth = TapeWidth; boxProperties.TapeColor = TapeColor; graphics.AddBox(new Box(0, boxProperties)); graphics.AddDimensions(new DimensionCube(uCtrlDimensionsOuter.ValueX, uCtrlDimensionsOuter.ValueY, uCtrlDimensionsOuter.ValueZ)); }
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); }
public MainForm() { InitializeComponent(); _gl = new Graphics3DControl(); _gl.Dock = DockStyle.Fill; splitContainer1.Panel2.Controls.Add(_gl); _gl.GLReady += GLReady; this.KeyPreview = true; this.KeyDown += MainForm_KeyDown; }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { try { graphics.AddBox(new Box(0, CaseProperties)); graphics.AddDimensions(new DimensionCube(CaseDimensions.X, CaseDimensions.Y, CaseDimensions.Z)); } catch (Exception ex) { _log.Error(ex.Message); } }
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 (TruckLength == 0 || TruckWidth == 0 || TruckHeight == 0) return; TruckProperties truckProperties = new TruckProperties(null, TruckLength, TruckWidth, TruckHeight) { 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) { Layer2DBrickImp selLayer = SelectedLayer; PalletProperties pallet = SelectedPallet; Packable packable = SelectedPackable; if (null == selLayer || null == packable || null == pallet) return; var analysis = new AnalysisCasePallet(packable, pallet, BuildConstraintSet(), true /*temporary*/); analysis.AddSolution(new List<LayerDesc> { selLayer.LayerDescriptor }); ViewerSolution sv = new ViewerSolution(analysis.SolutionLay); sv.Draw(graphics, Transform3D.Identity); }
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 (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 == DestinationPallet) { return; } Pallet pallet = new Pallet(DestinationPallet); pallet.Draw(graphics, Transform3D.Identity); graphics.AddDimensions(new DimensionCube(DestinationPallet.Length, DestinationPallet.Width, DestinationPallet.Height)); }
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()) { 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 (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, BoxPosition.Zero); palletCap.Draw(graphics); graphics.AddDimensions(new DimensionCube(CapLength, CapWidth, CapHeight)); } }
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, ItemName, ItemDescription , RadiusOuter, RadiusInner, CylinderHeight, Weight , ColorTop, ColorWallOuter, ColorWallInner); Cylinder cyl = new Cylinder(0, cylProperties); graphics.AddCylinder(cyl); graphics.AddDimensions(new DimensionCube( new Vector3D(-RadiusOuter, -RadiusOuter, 0.0), 2.0 * RadiusOuter, 2.0 * RadiusOuter, CylinderHeight, Color.Black, false) ); }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { try { if (graphCtrlPallet == ctrl) { using (ViewerPallet v = new ViewerPallet(cbPallet.SelectedPallet)) v.Draw(graphics, Transform3D.Identity); } } catch (Exception ex) { _log.Error(ex.ToString()); } }
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 palletCorner = new Corner(0, palletCornerProperties); palletCorner.Draw(graphics); graphics.AddDimensions(new DimensionCube(CornerWidth, CornerWidth, CornerLength)); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { try { HSolution sol = SelectedSolution; if (null != sol) { ViewerHSolution sv = new ViewerHSolution(sol, SolItemIndex); sv.Draw(graphics, Transform3D.Identity); } } catch (Exception ex) { _log.Error(ex.ToString()); } }
public void Draw(Graphics3DControl ctrl, Graphics3D graphics) { if (null == SelectedAnalysis) { return; } try { ViewerSolution sv = new ViewerSolution(SelectedAnalysis.Solution); sv.Draw(graphics, Transform3D.Identity); } catch (Exception ex) { _log.Error(ex.Message); } }