コード例 #1
0
ファイル: FilamentSpool.cs プロジェクト: urish/M3D
        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);
        }
コード例 #2
0
ファイル: FilamentSpool.cs プロジェクト: urish/M3D
        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);
        }
コード例 #3
0
ファイル: FilamentSpool.cs プロジェクト: urish/M3D
 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;
 }
コード例 #4
0
ファイル: FilamentProfile.cs プロジェクト: urish/M3D
        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() + ") ");
        }
コード例 #5
0
ファイル: TGH_FilamentProfile.cs プロジェクト: urish/M3D
 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;
 }
コード例 #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();
 }
コード例 #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;
 }
コード例 #8
0
ファイル: ABS_FilamentProfile.cs プロジェクト: urish/M3D
        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;
        }
コード例 #9
0
ファイル: FilamentProfile.cs プロジェクト: urish/M3D
        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 :(");
            }
        }
コード例 #10
0
ファイル: ABS_R_FilamentProfile.cs プロジェクト: urish/M3D
 public ABS_R_FilamentProfile(FilamentSpool spool, PrinterProfile printer_profile)
     : base(spool, printer_profile)
 {
     preprocessor.bonding.FirstLayerTemp = printer_profile.TemperatureConstants.GetBoundedTemp(filament.filament_temperature - 15);
 }
コード例 #11
0
ファイル: FilamentSpool.cs プロジェクト: urish/M3D
 public FilamentSpool(FilamentSpool other)
 {
     CopyFrom(other);
 }
コード例 #12
0
ファイル: FilamentProfile.cs プロジェクト: urish/M3D
 public FilamentProfile(FilamentSpool spool)
 {
     filament = spool;
     preprocessor.initialPrint.BedTemperature = FilamentConstants.Temperature.BedDefault(spool.filament_type);
 }