示例#1
0
        private void SetDefaultViews()
        {
            //Case "Top"
            MG_Viewer1.Pitch = 0f;
            MG_Viewer1.Roll  = 0f;
            MG_Viewer1.Yaw   = 0f;
            MG_Viewer1.FindExtents();
            //Case "Front"
            MG_Viewer3.Pitch = 270f;
            MG_Viewer3.Roll  = 0f;
            MG_Viewer3.Yaw   = 360f;
            MG_Viewer3.FindExtents();

            //Case "Right"
            MG_Viewer4.Pitch = 270f;
            MG_Viewer4.Roll  = 0f;
            MG_Viewer4.Yaw   = 270f;
            MG_Viewer4.FindExtents();

            //Case "ISO"
            MG_Viewer2.Pitch = 315f;
            MG_Viewer2.Roll  = 0f;
            MG_Viewer2.Yaw   = 315f;
            MG_Viewer2.FindExtents();
            mViewer.Redraw(true);
        }
示例#2
0
        private void mSetup_MachineActivated(clsMachine m)
        {
            {
                MG_Viewer1.RotaryDirection = (RotaryDirection)m.RotaryDir;
                MG_Viewer1.RotaryPlane     = (Axis)m.RotaryAxis;
                MG_Viewer1.RotaryType      = (RotaryMotionType)m.RotaryType;
                MG_Viewer1.ViewManipMode   = MG_CS_BasicViewer.ManipMode.SELECTION;

                MG_Viewer1.FindExtents();
                MG_Viewer2.FindExtents();
                MG_Viewer3.FindExtents();
                MG_Viewer4.FindExtents();
                mViewer.Redraw(true);
            }
        }
示例#3
0
        private void OpenFile(string fileName)
        {
            long[] ticks = new long[2];
            mCncFile = fileName;
            mSetup.MatchMachineToFile(mCncFile);

            ProcessFile(mCncFile);
            mViewer.BreakPoint = MG_CS_BasicViewer.MotionBlocks.Count - 1;

            mViewer.Pitch = mSetup.Machine.ViewAngles[0];
            mViewer.Roll  = mSetup.Machine.ViewAngles[1];
            mViewer.Yaw   = mSetup.Machine.ViewAngles[2];
            mViewer.Init();

            ticks[0] = DateTime.Now.Ticks;
            MG_Viewer1.FindExtents();
            ticks[1] = DateTime.Now.Ticks;
            MG_Viewer1.DynamicViewManipulation = (ticks[1] - ticks[0]) < 2000000;
            MG_Viewer2.FindExtents();
            MG_Viewer3.FindExtents();
            MG_Viewer4.FindExtents();
            mViewer.Redraw(true);
        }