Exemplo n.º 1
0
        public ctl3DView()
        {
            InitializeComponent();
            //Visible = false;
            //SetupSceneTree();
            m_modelAnimTmr = null;
            m_camera = new GLCamera();
            m_axisCam = new GLCamera();
            ResetCameraView();
            m_isectnormal = new Engine3D.Vector3d();

            mainViewSplitContainer.Panel1Collapsed = true;

            UVDLPApp.Instance().m_undoer.AsociateUndoButton(buttUndo);
            UVDLPApp.Instance().m_undoer.AsociateRedoButton(buttRedo);

            //glControl1. = new GraphicsMode(GraphicsMode.Default.ColorFormat, GraphicsMode.Default.Depth, 8);
            gr2d = UVDLPApp.Instance().m_2d_graphics;
            ctlBgndList = new List<ctlBgnd>();
            guiconf = UVDLPApp.Instance().m_gui_config;
            guiconf.TopLevelControl = mainViewSplitContainer.Panel2;
            UpdateButtonList();
            //guiconf.LoadConfiguration(global::UV_DLP_3D_Printer.Properties.Resources.GuiConfig);
            RearrangeGui();

            // toplevel controls must point to this

            glControl1.PaintCallback += new ctlGL.delPaint(DisplayFunc);            

            m_sliceTex = -1;
            RegisterCallbacks();

            UVDLPApp.Instance().m_slicer.Slice_Event += new Slicer.SliceEvent(SliceEv);
            UVDLPApp.Instance().AppEvent += new AppEventDelegate(AppEventDel);
        }
Exemplo n.º 2
0
        public ctl3DView()
        {
            InitializeComponent();

            //SetupSceneTree();
            m_modelAnimTmr = null;
            m_camera = new GLCamera();
            ResetCameraView();
            m_isectnormal = new Engine3D.Vector3d();
            ctlViewOptions.TreeViewHolder = mainViewSplitContainer;
            ctlViewOptions.LayerNumberScroll = numLayer;
            ctlViewOptions.ObjectInfoPanel = objectInfoPanel;
            ctlViewOptions.SceneControl = ctlScene1;
            mainViewSplitContainer.Panel1Collapsed = true;

            UVDLPApp.Instance().m_undoer.AsociateUndoButton(buttUndo);
            UVDLPApp.Instance().m_undoer.AsociateRedoButton(buttRedo);

            //glControl1. = new GraphicsMode(GraphicsMode.Default.ColorFormat, GraphicsMode.Default.Depth, 8);
            gr2d = UVDLPApp.Instance().m_2d_graphics;
            ctlBgndList = new List<ctlBgnd>();
            guiconf = UVDLPApp.Instance().m_gui_config;
            guiconf.TopLevelControl = mainViewSplitContainer.Panel2;
            UpdateButtonList();
            guiconf.LoadConfiguration(global::UV_DLP_3D_Printer.Properties.Resources.GuiConfig);
            RearrangeGui();

            ctlObjScale.c3d = this;
            ctlObjRotate.c3d = this;
            ctlObjMove.c3d = this;
            ctlSupport.c3d = this;
            objectInfoPanel.c3d = this;
            ctlViewOptions.c3d = this;
            ctlMeshTools1.c3d = this;
            ctlScene1.c3d = this;

            /*ctlImageButton imbtn = new ctlImageButton();
            imbtn.BackColor = System.Drawing.Color.Navy;
            imbtn.CheckImage = null;
            imbtn.Image = global::UV_DLP_3D_Printer.Properties.Resources.homeButt;
            imbtn.Location = new System.Drawing.Point(200, 200);
            imbtn.Name = "buttGlHome";
            imbtn.Size = new System.Drawing.Size(48, 48);
            imbtn.TabIndex = 16;
            imbtn.Visible = true;

            mainViewSplitContainer.Panel2.Controls.Add(imbtn);
            imbtn.BringToFront();*/
            //buttGlHome.GLVisible = true;
            //buttGlHome.BackColor = Color.Transparent;
            //buttGlHome.FixStyle();
            //buttGlHome.BackColor = Color.FromArgb(60,0,0,0);

            m_sliceTex = -1;
        }
Exemplo n.º 3
0
        public ctl3DView()
        {
            InitializeComponent();

            //SetupSceneTree();
            m_modelAnimTmr = null;
            m_camera = new GLCamera();
            ResetCameraView();

            ctlViewOptions.TreeViewHolder = mainViewSplitContainer;
            ctlViewOptions.LayerNumberScroll = numLayer;
            ctlViewOptions.ObjectInfoPanel = objectInfoPanel;
            ctlViewOptions.SceneControl = ctlScene1;
            mainViewSplitContainer.Panel1Collapsed = true;

            UVDLPApp.Instance().m_undoer.AsociateUndoButton(buttUndo);
            UVDLPApp.Instance().m_undoer.AsociateRedoButton(buttRedo);

            //glControl1. = new GraphicsMode(GraphicsMode.Default.ColorFormat, GraphicsMode.Default.Depth, 8);
            gr2d = new C2DGraphics();
            ctlBgndList = new List<ctlBgnd>();
            guiconf = new GuiConfig();
            UpdateButtonList();
            guiconf.LoadConfiguration(global::UV_DLP_3D_Printer.Properties.Resources.GuiConfig);
            guiconf.LayoutGui(Width, Height);

            ctlObjScale.c3d = this;
            ctlObjRotate.c3d = this;
            ctlObjMove.c3d = this;
            ctlSupport.c3d = this;
            objectInfoPanel.c3d = this;
            ctlViewOptions.c3d = this;
            ctlMeshTools1.c3d = this;
            ctlScene1.c3d = this;

            m_sliceTex = -1;
        }
Exemplo n.º 4
0
 private UVDLPApp() 
 {
     SceneFileName = "";
     m_callbackhandler = new CallbackHandler();
     m_appconfig = new AppConfig();
     m_printerinfo = new MachineConfig();
     m_buildparms = new SliceBuildConfig();
     m_deviceinterface = new DeviceInterface();
     m_buildmgr = new BuildManager();
     m_slicer = new Slicer();
     m_slicer.m_slicemethod = Slicer.eSliceMethod.eNormalCount;// configure the slicer to user the new normal count - Thanks Shai!!!
     m_slicer.Slice_Event += new Slicer.SliceEvent(SliceEv);
     //m_dispmgr = DisplayManager.Instance(); // initialize the singleton for early event app binding
     //m_flexslice = new FlexSlice();
     m_gcode = new GCodeFile(""); // create a blank gcode to start with
     m_supportconfig = new SupportConfig();
     m_supportgenerator = new SupportGenerator();
     m_supportgenerator.SupportEvent+= new SupportGeneratorEvent(SupEvent);
     CSG.Instance().CSGEvent += new CSG.CSGEventDel(CSGEvent);
     m_proj_cmd_lst = new prjcmdlst();
     m_plugins = new List<PluginEntry>(); // list of user plug-ins
     m_pluginstates =  PluginStates.Instance(); // initialize the plugin state singleton           
     m_undoer = new Undoer();
     m_2d_graphics = new C2DGraphics();
     m_gui_config = new GuiConfig();            
 }
Exemplo n.º 5
0
 private UVDLPApp()
 {
     m_callbackhandler = new CallbackHandler();
     m_appconfig = new AppConfig();
     m_printerinfo = new MachineConfig();
     m_buildparms = new SliceBuildConfig();
     m_deviceinterface = new DeviceInterface();
     m_buildmgr = new BuildManager();
     m_slicer = new Slicer();
     m_slicer.Slice_Event += new Slicer.SliceEvent(SliceEv);
     //m_flexslice = new FlexSlice();
     m_gcode = new GCodeFile(""); // create a blank gcode to start with
     m_supportconfig = new SupportConfig();
     m_supportgenerator = new SupportGenerator();
     m_supportgenerator.SupportEvent+= new SupportGeneratorEvent(SupEvent);
     CSG.Instance().CSGEvent += new CSG.CSGEventDel(CSGEvent);
     m_proj_cmd_lst = new prjcmdlst();
     m_plugins = new List<PluginEntry>(); // list of user plug-ins
     m_undoer = new Undoer();
     m_2d_graphics = new C2DGraphics();
     m_gui_config = new GuiConfig();
 }