示例#1
0
        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);
        }
示例#2
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);
            }
        }
示例#3
0
        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)
 {
     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);
     }
 }