예제 #1
0
        public PrintPanel()
        {
            InitializeComponent();
            con = Main.conn;
            ann = con.analyzer;
            con.eventConnectionChange += ConnectionChanged;
            ann.fanVoltage = trackFanVoltage.Value;
            con.eventTempChange += tempUpdate;
          //  ann.eventPosChanged += coordUpdate;
            ann.eventChange += analyzerChange;
            UpdateConStatus(false);
            textExtrudeSpeed.Text = RegMemory.GetString("panelExtrudeSpeed", textExtrudeSpeed.Text);
            textExtrudeAmount.Text = RegMemory.GetString("panelExtrudeAmount", textExtrudeAmount.Text);
            textRetractAmount.Text = RegMemory.GetString("panelRetractAmount", textRetractAmount.Text);

            float volt = 100f * trackFanVoltage.Value / 255;
            labelVoltage.Text = Trans.T1("L_OUTPUT_PERCENT",volt.ToString("0.0")); //"Output " + volt.ToString("0.0") + "%";
            arrowButtonXMinus.PossibleValues = Custom.GetString("xyMoveDistances", arrowButtonXMinus.PossibleValues);
            arrowButtonXPlus.PossibleValues = Custom.GetString("xyMoveDistances", arrowButtonXPlus.PossibleValues);
            arrowButtonYMinus.PossibleValues = Custom.GetString("xyMoveDistances", arrowButtonYMinus.PossibleValues);
            arrowButtonYPlus.PossibleValues = Custom.GetString("xyMoveDistances", arrowButtonYPlus.PossibleValues);
            if (Custom.GetBool("noPowerControlButton", false))
                switchPower.Visible = false;
            timer.Start();
            comboExtruder.SelectedIndex = 0;
            if (Main.main != null)
            {
                translate();
                Main.main.languageChanged += translate;
            }
        }
예제 #2
0
 /// <summary>
 /// INitialization of the printer.
 /// </summary>
 public VirtualPrinter()
 {
     ana             = new GCodeAnalyzer(true); // Make a new GCode Analyzer
     output          = new LinkedList <string>();
     extruderTemp[0] = extruderTemp[1] = extruderTemp[2] = 0;
     extruderOut[0]  = extruderOut[1] = extruderOut[2] = 0;
 }
        internal static PrintingStateSnapshot GeneratePrintingStateSnapshot(PrinterConnection conn)
        {
            // Analyze status and save state.
            GCodeAnalyzer         analyzer = conn.analyzer;
            PrintingStateSnapshot s        = new PrintingStateSnapshot();

            s.x             = analyzer.RealX;
            s.y             = analyzer.RealY;
            s.z             = analyzer.RealZ;
            s.fanVoltage    = analyzer.fanVoltage;
            s.fanOn         = analyzer.fanOn;
            s.speed         = analyzer.f;
            s.layer         = analyzer.layer;
            s.extrudersTemp = new float[conn.extruderTemp.Count];
            for (int extr = 0; extr < conn.extruderTemp.Count; extr++)
            {
                // Use the configured temperature, not the measured
                // temperature.
                s.extrudersTemp[extr] = conn.analyzer.getTemperature(extr);
                //s.extrudersTemp[extr] = conn.extruderTemp[extr];
            }
            // Use the configured temperature, not the measured temperature.
            s.bedTemp = conn.analyzer.bedTemp;
            //s.bedTemp = conn.bedTemp;
            s.activeExtruderId    = analyzer.activeExtruderId;
            s.relative            = analyzer.relative;
            s.activeExtruderValue = analyzer.activeExtruder.e - analyzer.activeExtruder.eOffset;
            s.remainingCode       = GetRemainingGcode(conn);

            return(s);
        }
 public VirtualPrinter()
 {
     ana = new GCodeAnalyzer(true);
     output = new LinkedList<string>();
     extruderTemp[0] = extruderTemp[1] = extruderTemp[2] = 0;
     extruderOut[0] = extruderOut[1] = extruderOut[2] = 0;
 }
예제 #5
0
 public VirtualPrinter(VirtualPrinterConnector vc)
 {
     vcon            = vc;
     ana             = new GCodeAnalyzer(true);
     output          = new LinkedList <string>();
     extruderTemp[0] = extruderTemp[1] = extruderTemp[2] = 0;
     extruderOut[0]  = extruderOut[1] = extruderOut[2] = 0;
 }
예제 #6
0
 public PrintPanel()
 {
     InitializeComponent();
     con = Main.conn;
     ann = con.analyzer;
     con.eventConnectionChange += ConnectionChanged;
     con.eventTempChange += tempUpdate;
     ann.eventPosChanged += coordUpdate;
     ann.eventChange += analyzerChange;
     UpdateConStatus(false);
     float volt = 100f * trackFanVoltage.Value / 255;
     labelVoltage.Text = "Output " + volt.ToString("0.0") + "%";
 }
예제 #7
0
 public void BeginJob()
 {
     con.firePrinterAction(Trans.T("L_BUILDING_PRINT_JOB...")); //"Building print job...");
     dataComplete = false;
     jobList.Clear();
     //times.Clear();
     totalLines = 0;
     linesSend = 0;
     computedPrintingTime = 0;
     con.lastlogprogress = -1000;
     maxLayer = -1;
     mode = 1;
     ana = new GCodeAnalyzer(true);
     con.analyzer.StartJob();
     Main.main.Invoke(Main.main.UpdateJobButtons);
 }
예제 #8
0
 public void BeginJob()
 {
     con.firePrinterAction(Trans.T("L_BUILDING_PRINT_JOB...")); //"Building print job...");
     dataComplete = false;
     jobList.Clear();
     //times.Clear();
     totalLines           = 0;
     linesSend            = 0;
     computedPrintingTime = 0;
     con.lastlogprogress  = -1000;
     maxLayer             = -1;
     mode = 1;
     ana  = new GCodeAnalyzer(true);
     con.analyzer.StartJob();
     Main.main.Invoke(Main.main.UpdateJobButtons);
 }
예제 #9
0
        public PrintPanel()
        {
            InitializeComponent();
            con = Main.conn;
            ann = con.analyzer;
            con.eventConnectionChange += ConnectionChanged;
            ann.fanVoltage = trackFanVoltage.Value;
            con.eventTempChange += tempUpdate;
              //  ann.eventPosChanged += coordUpdate;
            ann.eventChange += analyzerChange;
            UpdateConStatus(false);
            textExtrudeSpeed.Text = RegMemory.GetString("panelExtrudeSpeed", textExtrudeSpeed.Text);
            textExtrudeAmount.Text = RegMemory.GetString("panelExtrudeAmount", textExtrudeAmount.Text);
            textRetractAmount.Text = RegMemory.GetString("panelRetractAmount", textRetractAmount.Text);

            float volt = 100f * trackFanVoltage.Value / 255;
            labelVoltage.Text = "Output " + volt.ToString("0.0") + "%";
            timer.Start();
        }
예제 #10
0
 public void fastLayerUpdate()
 {
     GCodeAnalyzer a = new GCodeAnalyzer(true);
     foreach (GCodeShort code in getContentArray(1))
         a.analyzeShort(code);
     foreach (GCodeShort code in getContentArray(0))
         a.analyzeShort(code);
     foreach (GCodeShort code in getContentArray(2))
         a.analyzeShort(code);
     MaxLayer = a.layer;
     if (a.printingTime > 0)
     {
         printingTime = a.printingTime;
         int sec = (int)(printingTime*(1+0.01*Main.conn.addPrintingTime));
         int min = sec/60;
         sec-=min*60;
         toolPrintingTime.Text = "Printing time:" + min.ToString() + " min";
     }
 }
예제 #11
0
 public void fastLayerUpdate()
 {
     GCodeAnalyzer a = new GCodeAnalyzer(true);
     foreach (GCodeShort code in getContentArray(1))
         a.analyzeShort(code);
     foreach (GCodeShort code in getContentArray(0))
         a.analyzeShort(code);
     foreach (GCodeShort code in getContentArray(2))
         a.analyzeShort(code);
     MaxLayer = a.layer;
     if (a.printingTime > 0)
     {
         printingTime = a.printingTime;
         int sec = (int)(printingTime*(1+0.01*Main.conn.addPrintingTime));
         int hours = sec / 3600;
         sec -= 3600 * hours;
         int min = sec/60;
         sec-=min*60;
         StringBuilder s = new StringBuilder();
         if (hours > 0)
             s.Append(Trans.T1("L_TIME_H:", hours.ToString())); //"h:");
         if (min > 0)
             s.Append(Trans.T1("L_TIME_M:", min.ToString()));
         s.Append(Trans.T1("L_TIME_S", sec.ToString()));
         toolPrintingTime.Text = Trans.T1("L_PRINTING_TIME:",s.ToString());
     }
 }
예제 #12
0
 public GCodeVisual()
 {
     ana                  = new GCodeAnalyzer(true);
     startOnClear         = true;
     ana.eventPosChanged += OnPosChange;
 }
예제 #13
0
 public VirtualPrinter()
 {
     ana = new GCodeAnalyzer(true);
     output = new LinkedList<string>();
 }
예제 #14
0
 public void fastLayerUpdate()
 {
     GCodeAnalyzer a = new GCodeAnalyzer(true);
     foreach (GCodeShort code in getContentArray(1))
         a.analyzeShort(code);
     foreach (GCodeShort code in getContentArray(0))
         a.analyzeShort(code);
     foreach (GCodeShort code in getContentArray(2))
         a.analyzeShort(code);
     MaxLayer = a.layer;
 }
예제 #15
0
 public GCodeVisual(GCodeAnalyzer a)
 {
     segments = new LinkedList<GCodePath>[3];
     for (int i = 0; i < MaxExtruder; i++)
         segments[i] = new LinkedList<GCodePath>();
     ana = a;
     startOnClear = false;
     ana.eventPosChanged += OnPosChange;
     ana.eventPosChangedFast += OnPosChangeFast;
 }
예제 #16
0
 public GCodeVisual(GCodeAnalyzer a)
 {
     ana = a;
     startOnClear = false;
     ana.eventPosChanged += OnPosChange;
     ana.eventPosChangedFast += OnPosChangeFast;
 }
예제 #17
0
 public GCodeVisual()
 {
     ana = new GCodeAnalyzer(true);
     startOnClear = true;
     ana.eventPosChanged += OnPosChange;
     ana.eventPosChangedFast += OnPosChangeFast;
 }
예제 #18
0
 public VirtualPrinter()
 {
     ana    = new GCodeAnalyzer(true);
     output = new LinkedList <string>();
 }
예제 #19
0
 public VirtualPrinter(VirtualPrinterConnector vc)
 {
     vcon = vc;
     ana = new GCodeAnalyzer(true);
     output = new LinkedList<string>();
     extruderTemp[0] = extruderTemp[1] = extruderTemp[2] = 0;
     extruderOut[0] = extruderOut[1] = extruderOut[2] = 0;
 }
예제 #20
0
 public GCodeVisual(GCodeAnalyzer a)
 {
     ana                  = a;
     startOnClear         = false;
     ana.eventPosChanged += OnPosChange;
 }