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());
         }
     }
 }
Example #2
0
        public void Draw(Graphics3DControl ctrl, Graphics3D graphics)
        {
            bool           showDimensions = true;
            ViewerSolution sv             = new ViewerSolution(Solution);

            sv.Draw(graphics, Transform3D.Identity, showDimensions);
        }
        public void Draw(Graphics3DControl ctrl, Graphics3D graphics)
        {
            // instantiate solution viewer
            HCylinderPalletSolutionViewer sv = new HCylinderPalletSolutionViewer(GetCurrentSolution());

            sv.Draw(graphics);
        }
Example #4
0
        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)
            {
                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));
            }
        }
Example #5
0
        private void CreateVisualisationControl()
        {
            switch (type)
            {
            case FunctionType.ONE_ARGUMENT_FUNCTION:
                Z0.Enabled         = ZN.Enabled = PointCountZ.Enabled = false;
                Text               = "F(X) = " + FunctionTxt.Text;
                parser.InputString = FunctionTxt.Text;
                variables[0]       = parser.GetVariable("x");
                drawer2D           = new Drawer(DrawerContainer.Panel1, DrawerContainer.Panel1.ClientRectangle);
                drawer2D.Dock      = DockStyle.Fill;
                drawer2D.AddGraphic(1, Function2D, "Исходная функция", typeView.Line);
                drawer2D.Redraw();
                break;

            case FunctionType.TWO_ARGUMENT_FUNCTION:
                Z0.Enabled         = ZN.Enabled = PointCountZ.Enabled = true;
                Text               = "F(X,Y) = " + FunctionTxt.Text;
                parser.InputString = FunctionTxt.Text;
                variables[0]       = parser.GetVariable("x");
                variables[1]       = parser.GetVariable("y");
                drawer3D           = new Graphics3D();
                drawer3D.AddGraphic(mainFunction);
                drawer3D.Parent = DrawerContainer.Panel1;
                break;
            }
        }
Example #6
0
 public void Draw(Graphics3DControl ctrl, Graphics3D graphics)
 {
     if (ctrl == graphCtrl)
     {
         ViewerSolution vs = new ViewerSolution(_analysis.SolutionLay);
         vs.Draw(graphics, Transform3D.Identity);
     }
 }
Example #7
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));
        }
 private void _tChart1_AfterDraw(object sender, Graphics3D g)
 {
     if (_tChart1.Series.Count > 0)
     {
         g.Font       = _tChart1.Legend.Font;
         g.Font.Color = _tChart1.Header.Color;
         g.TextOut(_tChart1.Legend.Left + _tChart1.Legend.Symbol.Width * 2, _tChart1.Legend.Top - 20, "(min; max values)");
     }
 }
Example #9
0
    public void apply(Graphics g)
    {
        Graphics3D instance = Graphics3D.getInstance();

        instance.bindTarget((object)g, JavaLib.GraphicsDevice);
        instance.setViewport(this.m_viewportX, this.m_viewportY, this.m_viewportW, this.m_viewportH);
        instance.render(this.m_postEffectsWorld);
        instance.releaseTarget();
    }
Example #10
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));
        }
Example #11
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);
        }
Example #12
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));
        }
        public SceneView() : base()
        {
            var flags = ControlStyles.AllPaintingInWmPaint
                        | ControlStyles.DoubleBuffer
                        | ControlStyles.UserPaint;

            SetStyle(flags, true);
            ResizeRedraw = true;
            Graphics3D   = new Graphics3D(this);
        }
        private void Chart_AfterDraw(object sender, Graphics3D g)
        {
            var chart = sender as ChartView;

            g.Rectangle(new Xamarin.Forms.Rectangle()
            {
                Width = 100, Height = 100,
            });
            //g.Draw(0, 0, new Image { Source = ImageSource.FromResource("tower.png") } );
        }
        public void Draw(Graphics3DControl ctrl, Graphics3D graphics)
        {
            if (null == CurrentSolution)
            {
                return;
            }
            BoxCaseSolutionViewer sv = new BoxCaseSolutionViewer(CurrentSolution);

            sv.Draw(graphics);
        }
Example #16
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);
            }
        }
Example #17
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)
        {
            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 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);
     }
 }
Example #20
0
 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 (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);
     }
 }
Example #22
0
        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);
        }
Example #23
0
 private void Chart_BeforeDraw(object sender, Graphics3D g)
 {
     if (BaseChart.Chart.Aspect.View3D)
     {
         line1.Pointer.Visible = false;
         line2.Pointer.Visible = false;
     }
     else
     {
         line1.Pointer.Visible = true;
         line2.Pointer.Visible = true;
     }
 }
Example #24
0
 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));
 }
        private void tChart1_AfterDraw(object sender, Graphics3D g)
        {
            if (paintFirst > 1)
            {
                axStartValue = tChart1.Axes.Bottom.Minimum;
                axEndValue   = tChart1.Axes.Bottom.Maximum;
            }

            paintFirst++;

            scroller.SubChartTChart.Footer.Font.Color = System.Drawing.Color.DarkBlue;
            scroller.SubChartTChart.Footer.Text       = "         Showing data from " + DateTime.FromOADate(axStartValue).ToLongDateString() + " to " + DateTime.FromOADate(axEndValue).ToLongDateString();
        }
Example #26
0
 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());
         }
     }
 }
Example #27
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));
        }
Example #28
0
 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));
     }
 }
Example #29
0
        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));
        }
Example #30
0
        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));
        }