Example #1
0
        //--------------------------------------------------------------------------------------------------

        void _UpdateGrid()
        {
            if (V3dViewer is null)
            {
                return;
            }

            if (_GridEnabled)
            {
                if (_CurrentWorkingContext.GridType == GridTypes.Rectangular)
                {
                    V3dViewer.ActivateGrid(Aspect_GridType.Aspect_GT_Rectangular, Aspect_GridDrawMode.Aspect_GDM_Lines);
                    V3dViewer.SetRectangularGridValues(0, 0, _CurrentWorkingContext.GridStep, _CurrentWorkingContext.GridStep, _CurrentWorkingContext.GridRotation.ToRad());
                    V3dViewer.SetRectangularGridGraphicValues(100 * _CurrentWorkingContext.GridStep, 100 * _CurrentWorkingContext.GridStep, -0.0001);
                }
                else
                {
                    V3dViewer.ActivateGrid(Aspect_GridType.Aspect_GT_Circular, Aspect_GridDrawMode.Aspect_GDM_Lines);
                    V3dViewer.SetCircularGridValues(0, 0, _CurrentWorkingContext.GridStep, _CurrentWorkingContext.GridDivisions, _CurrentWorkingContext.GridRotation.ToRad());
                    V3dViewer.SetCircularGridGraphicValues(100 * _CurrentWorkingContext.GridStep, -0.0001);
                }
                V3dViewer.SetGridEcho(true);
            }
            else
            {
                V3dViewer.SetGridEcho(false);
                V3dViewer.DeactivateGrid();
            }

            NeedsRedraw          = true;
            NeedsImmediateRedraw = true;
        }