Ejemplo n.º 1
0
        public bool Matches(FilamentSpool other)
        {
            if (filament_type == other.filament_type && (int)filament_color_code == (int)other.filament_color_code)
            {
                return(filament_size == other.filament_size);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public bool Equals(FilamentSpool b)
        {
            if ((object)b == null || filament_type != b.filament_type || ((int)filament_color_code != (int)b.filament_color_code || filament_temperature != b.filament_temperature) || (filament_location != b.filament_location || filament_size != b.filament_size || estimated_filament_length_printed != (double)b.estimated_filament_length_printed))
            {
                return(false);
            }

            return((int)filament_uid == (int)b.filament_uid);
        }
Ejemplo n.º 3
0
 public void CopyFrom(FilamentSpool other)
 {
     filament_color_code  = other.filament_color_code;
     filament_type        = other.filament_type;
     filament_temperature = other.filament_temperature;
     filament_location    = other.filament_location;
     estimated_filament_length_printed = other.estimated_filament_length_printed;
     filament_size = other.filament_size;
     filament_uid  = other.filament_uid;
 }
Ejemplo n.º 4
0
        public static string GenerateSpoolName(FilamentSpool spool, bool location)
        {
            var color = (FilamentConstants.ColorsEnum)Enum.ToObject(typeof(FilamentConstants.ColorsEnum), spool.filament_color_code);

            if (location)
            {
                return("My " + FilamentConstants.ColorsToString(color) + " Filament (" + spool.filament_type.ToString() + ") " + spool.filament_location.ToString());
            }

            return("My " + FilamentConstants.ColorsToString(color) + " Filament (" + spool.filament_type.ToString() + ") ");
        }
Ejemplo n.º 5
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;
 }
Ejemplo n.º 6
0
 public PrinterInfo()
 {
     current_job       = null;
     serial_number     = new PrinterSerialNumber("0");
     filament_info     = new FilamentSpool();
     extruder          = new Extruder();
     hardware          = new Hardware();
     calibration       = new Calibration();
     synchronization   = new Synchronization();
     statistics        = new Statistics();
     supportedFeatures = new SupportedFeatures();
     accessories       = new Accessories();
     persistantData    = new PersistantData();
     powerRecovery     = new PowerRecovery();
 }
Ejemplo n.º 7
0
 public void CopyFrom(PrinterInfo other)
 {
     serial_number     = new PrinterSerialNumber(other.serial_number.ToString());
     Status            = other.Status;
     filament_info     = new FilamentSpool(other.filament_info);
     current_job       = other.current_job == null ? null : new JobInfo(other.current_job);
     extruder          = new Extruder(other.extruder);
     hardware          = new Hardware(other.hardware);
     calibration       = new Calibration(other.calibration);
     synchronization   = new Synchronization(other.synchronization);
     supportedFeatures = new SupportedFeatures(other.supportedFeatures);
     accessories       = new Accessories(other.accessories);
     statistics        = new Statistics(other.statistics);
     persistantData    = new PersistantData(other.persistantData);
     powerRecovery     = new PowerRecovery(other.powerRecovery);
     ProfileName       = other.ProfileName;
 }
Ejemplo n.º 8
0
        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;
        }
Ejemplo n.º 9
0
        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 :(");
            }
        }
Ejemplo n.º 10
0
 public ABS_R_FilamentProfile(FilamentSpool spool, PrinterProfile printer_profile)
     : base(spool, printer_profile)
 {
     preprocessor.bonding.FirstLayerTemp = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature - 15);
 }
Ejemplo n.º 11
0
 public FilamentSpool(FilamentSpool other)
 {
     CopyFrom(other);
 }
Ejemplo n.º 12
0
 public FilamentProfile(FilamentSpool spool)
 {
     filament = spool;
     preprocessor.initialPrint.BedTemperature = FilamentConstants.Temperature.BedDefault(spool.filament_type);
 }