private Printer(PrinterProfile profile, SpoolerClient client) { this.client = client; mylockID = Guid.Empty; m_printer_profile.Value = profile; thread_sync = new object(); spool_lock = new object(); spool_up_to_date = false; incoming_data = null; Found = new ThreadSafeVariable <bool> { Value = false }; _connected = new ThreadSafeVariable <bool> { Value = false }; log = new CircularArray <string>(200); LogWaits = true; LogFeedback = true; waiting_object = null; waiting_object_lock = new object(); lockstatus = new ThreadSafeVariable <PrinterLockStatus>(PrinterLockStatus.Unlocked); lockstepmode = new ThreadSafeVariable <bool>(true); lockTimeOutSeconds = new ThreadSafeVariable <int>(0); keeplockalive_clock = new Stopwatch(); keeplockalive_limit_clock = new Stopwatch(); finished_lock = new object(); m_ChangedKeyValuePairs = new ConcurrentDictionary <string, string>(); }
public Printer(string printer_serial_number, PrinterProfile profile, SpoolerClient client) : this(profile, client) { printer_info = new PrinterInfo { serial_number = new PrinterSerialNumber(printer_serial_number) }; }
public static List <string> CreateYSpeedTest(PrinterProfile profile) { var y = profile.PrinterSizeConstants.printBedSize.y; return(new List <string>() { "G91", PrinterCompatibleString.Format("G0 Y{0} F{1}", y, 3000f), PrinterCompatibleString.Format("G0 Y-{0}", (object)y), PrinterCompatibleString.Format("G0 Y{0}", (object)y), PrinterCompatibleString.Format("G0 Y-{0}", (object)y), PrinterCompatibleString.Format("G0 Y{0}", (object)y), PrinterCompatibleString.Format("G0 Y-{0}", (object)y) }); }
public static List <string> CreateXSpeedTest(PrinterProfile profile) { var x = profile.PrinterSizeConstants.printBedSize.x; return(new List <string>() { "G91", PrinterCompatibleString.Format("G0 X{0} F{1}", x, 3000f), PrinterCompatibleString.Format("G0 X-{0}", (object)x), PrinterCompatibleString.Format("G0 X{0}", (object)x), PrinterCompatibleString.Format("G0 X-{0}", (object)x), PrinterCompatibleString.Format("G0 X{0}", (object)x), PrinterCompatibleString.Format("G0 X-{0}", (object)x) }); }
public static List <string> FastRecenter(PrinterProfile profile) { var x = profile.PrinterSizeConstants.printBedSize.x; var y = profile.PrinterSizeConstants.printBedSize.y; return(new List <string>() { "G91", PrinterCompatibleString.Format("G0 Y{0} F{1}", y, 3000f), PrinterCompatibleString.Format("G0 X{0} F{1}", x, 3000f), PrinterCompatibleString.Format("G0 Y-{0} X-{1}", (float)((double)y / 2.0), (float)((double)x / 2.0)) }); }
public TGH_FilamentProfile(FilamentSpool spool, PrinterProfile printer_profile) : base(spool) { preprocessor.initialPrint.StartingFanValue = byte.MaxValue; preprocessor.initialPrint.StartingTempStabilizationDelay = 15; preprocessor.initialPrint.StartingTemp = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature - 5); preprocessor.bonding.FirstLayerTemp = preprocessor.initialPrint.StartingTemp; preprocessor.bonding.SecondLayerTemp = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature - 10); preprocessor.initialPrint.PrimeAmount = 9; preprocessor.initialPrint.FirstRaftLayerTemperature = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature - 5); preprocessor.initialPrint.SecondRaftResetTemp = true; }
public ABS_FilamentProfile(FilamentSpool spool, PrinterProfile printer_profile) : base(spool) { ABSWarningDim = printer_profile.PrinterSizeConstants.ABSWarningDim; preprocessor.initialPrint.StartingTemp = filament.filament_temperature; if ("Micro" == printer_profile.ProfileName) { preprocessor.initialPrint.StartingFanValue = 50; } else { preprocessor.initialPrint.StartingFanValue = 220; } preprocessor.initialPrint.StartingTempStabilizationDelay = 10; preprocessor.bonding.FirstLayerTemp = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature + 15); preprocessor.bonding.SecondLayerTemp = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature + 10); preprocessor.initialPrint.PrimeAmount = 19; preprocessor.initialPrint.FirstRaftLayerTemperature = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature + 15); preprocessor.initialPrint.SecondRaftResetTemp = false; }
public static FilamentProfile CreateFilamentProfile(FilamentSpool spool, PrinterProfile printer_profile) { switch (spool.filament_type) { case FilamentSpool.TypeEnum.ABS: case FilamentSpool.TypeEnum.HIPS: return(new ABS_FilamentProfile(spool, printer_profile)); case FilamentSpool.TypeEnum.PLA: case FilamentSpool.TypeEnum.CAM: return(new PLA_FilamentProfile(spool, printer_profile)); case FilamentSpool.TypeEnum.FLX: case FilamentSpool.TypeEnum.TGH: return(new TGH_FilamentProfile(spool, printer_profile)); case FilamentSpool.TypeEnum.ABS_R: return(new ABS_R_FilamentProfile(spool, printer_profile)); default: throw new ArgumentException("FilamentProfile.CreateFilamentProfile does not know that type :("); } }
public bool VerifyOptionsWithPrinter(PrinterProfile profile, PrinterInfo printerInfo) { var flag1 = true; if (jobMode == JobParams.Mode.ReconnectToSDPrint) { throw new NotImplementedException("ReconnectToSDPrint jobs can only be started directly from the FirmwareController."); } if (options.calibrate_before_print && printerInfo.supportedFeatures.UsesSupportedFeatures && !printerInfo.supportedFeatures.Available("Single Point Bed Height Calibration", profile.SupportedFeaturesConstants)) { flag1 = false; options.calibrate_before_print = false; } if (options.use_heated_bed) { var num = profile.AccessoriesConstants.HeatedBedConstants.HasBuiltinHeatedBed ? 1 : 0; var flag2 = false; if (num != 0 && printerInfo.supportedFeatures.UsesSupportedFeatures) { flag2 = printerInfo.supportedFeatures.Available("Heated Bed Control", profile.SupportedFeaturesConstants); } if (num == 0 || !flag2) { flag1 = false; options.use_heated_bed = false; } } if (jobMode != JobParams.Mode.DirectPrinting && printerInfo.supportedFeatures.UsesSupportedFeatures && !printerInfo.supportedFeatures.Available("Untethered Printing", profile.SupportedFeaturesConstants)) { jobMode = JobParams.Mode.DirectPrinting; } return(flag1); }
public ABS_R_FilamentProfile(FilamentSpool spool, PrinterProfile printer_profile) : base(spool, printer_profile) { preprocessor.bonding.FirstLayerTemp = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature - 15); }
public Printer(PrinterInfo info, PrinterProfile profile, SpoolerClient client) : this(profile, client) { printer_info = new PrinterInfo(info); }
public static Vector3D Op3dCalculateDestinationWithClipping(Trilean bExtruderIsHomed, bool bExtruderZValid, ref bool bDestinationHasBeenClipped, Vector3D op3dDestination, Vector3D op3dInitial, PrinterProfile printerProfile) { var intercept = new Vector3D(); bDestinationHasBeenClipped = false; if (bExtruderIsHomed == Trilean.True) { bDestinationHasBeenClipped = printerProfile.PrinterSizeConstants.WarningRegion.LineIntercepts(out intercept, op3dInitial, op3dDestination); } else if (bExtruderZValid) { intercept.x = 0.0f; intercept.y = 0.0f; bDestinationHasBeenClipped = printerProfile.PrinterSizeConstants.UnhomedSafeZRange.Intercepts(out intercept.z, op3dInitial.z, op3dDestination.z); } return(intercept); }
public static List <string> CreateYSkipTestPlus(PrinterProfile profile) { return(TestGeneration.CreateSkipTestInternal(profile.PrinterSizeConstants.printBedSize.y, 5, 'Y')); }
public static List <string> CreateXSkipTestMinus(PrinterProfile profile) { return(TestGeneration.CreateSkipTestInternal(profile.PrinterSizeConstants.printBedSize.x, -4, 'X')); }