示例#1
0
        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);
            }
        }
示例#2
0
        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));
            }
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        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));
        }
示例#6
0
        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)
 {
     try
     {
         graphics.AddBox(new Box(0, CaseProperties));
         graphics.AddDimensions(new DimensionCube(CaseDimensions.X, CaseDimensions.Y, CaseDimensions.Z));
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
示例#8
0
        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)
 {
     if (_dt is DataCase dtCase)
     {
         Box b = new Box(0, ToCase(dtCase));
         graphics.AddBox(b);
         graphics.AddDimensions(new DimensionCube(dtCase.OuterDimensions));
     }
     else if (_dt is DataBox dtBox)
     {
         Box b = new Box(0, ToBox(dtBox));
         graphics.AddBox(b);
         graphics.AddDimensions(new DimensionCube(dtBox.Dimensions));
     }
     else if (_dt is DataPallet dtPallet)
     {
         Pallet pallet = new Pallet(ToPallet(dtPallet));
         pallet.Draw(graphics, Sharp3D.Math.Core.Transform3D.Identity);
         graphics.AddDimensions(new DimensionCube(dtPallet.Dimensions));
     }
     else if (_dt is DataInterlayer dtInterlayer)
     {
         graphics.AddBox(new Box(0, ToInterlayer(dtInterlayer)));
         graphics.AddDimensions(new DimensionCube(dtInterlayer.Dimensions));
     }
     else if (_dt is DataPalletCap dtPalletCap)
     {
         PalletCap palletCap = new PalletCap(0, ToPalletCap(dtPalletCap), BoxPosition.Zero);
         palletCap.Draw(graphics);
         graphics.AddDimensions(new DimensionCube(dtPalletCap.Dimensions));
     }
     else if (_dt is DataCylinder dtCylinder)
     {
         Cylinder cyl = new Cylinder(0, ToCylinder(dtCylinder));
         graphics.AddCylinder(cyl);
     }
 }
示例#10
0
 public void Draw(Graphics3DControl ctrl, Graphics3D graphics)
 {
     if (null == SelectedAnalysis)
     {
         return;
     }
     try
     {
         AnalysisCasePallet analysis = SelectedAnalysis;
         if (graphCtrlPack == ctrl)
         {
             bool showDimensions = true;
             // build pack
             if (analysis.Content is PackProperties packProperties)
             {
                 var pack = new Pack(0, packProperties)
                 {
                     ForceTransparency = true
                 };
                 graphics.AddBox(pack);
                 if (showDimensions)
                 {
                     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));
                     }
                 }
             }
         }
         else if (graphCtrlSolution == ctrl)
         {
             var sv = new ViewerSolution(SelectedAnalysis.SolutionLay);
             sv.Draw(graphics, Transform3D.Identity);
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
 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);
     }
 }