From 2b848ceabe71fc07dd953aa51318d22ea4a792de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Sat, 13 Nov 2021 18:25:23 +0000 Subject: [PATCH] v2.24.3 - (Upgrade) .NET from 5.0.11 to 5.0.12 - (Fix) Anycubic formats: LightOffDelay is WaitTimeBeforeCure (#308) --- CHANGELOG.md | 5 ++ Scripts/010 Editor/PhotonWorkshop.bt | 2 +- .../FileFormats/PhotonWorkshopFile.cs | 63 ++++++------------- UVtools.Core/UVtools.Core.csproj | 4 +- UVtools.InstallerMM/UVtools.InstallerMM.wxs | 4 +- UVtools.WPF/UVtools.WPF.csproj | 2 +- 6 files changed, 31 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab3c011..004ddf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 12/11/2021 - v2.24.3 + +- (Upgrade) .NET from 5.0.11 to 5.0.12 +- (Fix) Anycubic formats: LightOffDelay is WaitTimeBeforeCure (#308) + ## 05/11/2021 - v2.24.2 - **Export layers to mesh:** diff --git a/Scripts/010 Editor/PhotonWorkshop.bt b/Scripts/010 Editor/PhotonWorkshop.bt index 0c65d80..f233b28 100644 --- a/Scripts/010 Editor/PhotonWorkshop.bt +++ b/Scripts/010 Editor/PhotonWorkshop.bt @@ -32,7 +32,7 @@ struct HEADER { float LayerHeight ; float LayerExposureTime ; - float LightOffDelay ; + float WaitTimeBeforeCure ; float BottomExposureSeconds ; float BottomLayersCount ; float LiftHeight ; diff --git a/UVtools.Core/FileFormats/PhotonWorkshopFile.cs b/UVtools.Core/FileFormats/PhotonWorkshopFile.cs index 3e5b2d1..33176aa 100644 --- a/UVtools.Core/FileFormats/PhotonWorkshopFile.cs +++ b/UVtools.Core/FileFormats/PhotonWorkshopFile.cs @@ -248,17 +248,17 @@ namespace UVtools.Core.FileFormats /// /// 48 /// - [FieldOrder(3)] public float LayerExposureTime { get; set; } + [FieldOrder(3)] public float ExposureTime { get; set; } /// /// 4C /// - [FieldOrder(4)] public float LightOffDelay { get; set; } = 1; + [FieldOrder(4)] public float WaitTimeBeforeCure { get; set; } = 1; /// /// 50 /// - [FieldOrder(5)] public float BottomExposureSeconds { get; set; } + [FieldOrder(5)] public float BottomExposureTime { get; set; } /// /// 54 @@ -320,17 +320,13 @@ namespace UVtools.Core.FileFormats { get { - switch (PriceCurrencyDec) + return PriceCurrencyDec switch { - case 0x24: - return '$'; - case 0xA5C2: - return '¥'; - case 0x000020AC: - return '€'; - default: - return '$'; - } + 0x24 => '$', + 0xA5C2 => '¥', + 0x000020AC => '€', + _ => '$' + }; } } @@ -359,7 +355,7 @@ namespace UVtools.Core.FileFormats Section = new SectionHeader(SectionMark, this); } - public override string ToString() => $"{nameof(Section)}: {Section}, {nameof(PixelSizeUm)}: {PixelSizeUm}, {nameof(LayerHeight)}: {LayerHeight}, {nameof(LayerExposureTime)}: {LayerExposureTime}, {nameof(LightOffDelay)}: {LightOffDelay}, {nameof(BottomExposureSeconds)}: {BottomExposureSeconds}, {nameof(BottomLayersCount)}: {BottomLayersCount}, {nameof(LiftHeight)}: {LiftHeight}, {nameof(LiftSpeed)}: {LiftSpeed}, {nameof(RetractSpeed)}: {RetractSpeed}, {nameof(VolumeMl)}: {VolumeMl}, {nameof(AntiAliasing)}: {AntiAliasing}, {nameof(ResolutionX)}: {ResolutionX}, {nameof(ResolutionY)}: {ResolutionY}, {nameof(WeightG)}: {WeightG}, {nameof(Price)}: {Price}, {nameof(PriceCurrencyDec)}: {PriceCurrencyDec}, {nameof(PerLayerOverride)}: {PerLayerOverride}, {nameof(PrintTime)}: {PrintTime}, {nameof(Padding1)}: {Padding1}, {nameof(Padding2)}: {Padding2}"; + public override string ToString() => $"{nameof(Section)}: {Section}, {nameof(PixelSizeUm)}: {PixelSizeUm}, {nameof(LayerHeight)}: {LayerHeight}, {nameof(ExposureTime)}: {ExposureTime}, {nameof(WaitTimeBeforeCure)}: {WaitTimeBeforeCure}, {nameof(BottomExposureTime)}: {BottomExposureTime}, {nameof(BottomLayersCount)}: {BottomLayersCount}, {nameof(LiftHeight)}: {LiftHeight}, {nameof(LiftSpeed)}: {LiftSpeed}, {nameof(RetractSpeed)}: {RetractSpeed}, {nameof(VolumeMl)}: {VolumeMl}, {nameof(AntiAliasing)}: {AntiAliasing}, {nameof(ResolutionX)}: {ResolutionX}, {nameof(ResolutionY)}: {ResolutionY}, {nameof(WeightG)}: {WeightG}, {nameof(Price)}: {Price}, {nameof(PriceCurrencyDec)}: {PriceCurrencyDec}, {nameof(PerLayerOverride)}: {PerLayerOverride}, {nameof(PrintTime)}: {PrintTime}, {nameof(Padding1)}: {Padding1}, {nameof(Padding2)}: {Padding2}"; public void Validate() { @@ -946,14 +942,11 @@ namespace UVtools.Core.FileFormats { PrintParameterModifier.BottomLayerCount, - PrintParameterModifier.LightOffDelay, + PrintParameterModifier.WaitTimeBeforeCure, PrintParameterModifier.BottomExposureTime, PrintParameterModifier.ExposureTime, - //PrintParameterModifier.BottomLightOffDelay, - //PrintParameterModifier.BottomLiftHeight, - //PrintParameterModifier.BottomLiftSpeed, PrintParameterModifier.LiftHeight, PrintParameterModifier.LiftSpeed, PrintParameterModifier.RetractSpeed, @@ -1086,44 +1079,28 @@ namespace UVtools.Core.FileFormats set => base.BottomLayerCount = (ushort) (HeaderSettings.BottomLayersCount = value); } - public override float BottomLightOffDelay => LightOffDelay; + public override float BottomLightOffDelay => BottomWaitTimeBeforeCure; - public override float LightOffDelay - { - get => HeaderSettings.LightOffDelay; - set => base.LightOffDelay = HeaderSettings.LightOffDelay = (float)Math.Round(value, 2); - } + public override float LightOffDelay => WaitTimeBeforeCure; - public override float BottomWaitTimeBeforeCure - { - get => base.BottomWaitTimeBeforeCure; - set - { - SetBottomLightOffDelay(value); - base.BottomWaitTimeBeforeCure = value; - } - } + public override float BottomWaitTimeBeforeCure => WaitTimeBeforeCure; public override float WaitTimeBeforeCure { - get => base.WaitTimeBeforeCure; - set - { - SetNormalLightOffDelay(value); - base.WaitTimeBeforeCure = value; - } + get => HeaderSettings.WaitTimeBeforeCure; + set => base.WaitTimeBeforeCure = HeaderSettings.WaitTimeBeforeCure = (float)Math.Round(value, 2); } public override float BottomExposureTime { - get => HeaderSettings.BottomExposureSeconds; - set => base.BottomExposureTime = HeaderSettings.BottomExposureSeconds = (float) Math.Round(value, 2); + get => HeaderSettings.BottomExposureTime; + set => base.BottomExposureTime = HeaderSettings.BottomExposureTime = (float) Math.Round(value, 2); } public override float ExposureTime { - get => HeaderSettings.LayerExposureTime; - set => base.ExposureTime = HeaderSettings.LayerExposureTime = (float) Math.Round(value, 2); + get => HeaderSettings.ExposureTime; + set => base.ExposureTime = HeaderSettings.ExposureTime = (float) Math.Round(value, 2); } public override float BottomLiftHeight => LiftHeight; diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index 4294f10..b816934 100644 --- a/UVtools.Core/UVtools.Core.csproj +++ b/UVtools.Core/UVtools.Core.csproj @@ -10,7 +10,7 @@ https://github.com/sn4k3/UVtools https://github.com/sn4k3/UVtools MSLA/DLP, file analysis, calibration, repair, conversion and manipulation - 2.24.2 + 2.24.3 Copyright © 2020 PTRTECH UVtools.png AnyCPU;x64 @@ -52,7 +52,7 @@ - + diff --git a/UVtools.InstallerMM/UVtools.InstallerMM.wxs b/UVtools.InstallerMM/UVtools.InstallerMM.wxs index de15898..beda225 100644 --- a/UVtools.InstallerMM/UVtools.InstallerMM.wxs +++ b/UVtools.InstallerMM/UVtools.InstallerMM.wxs @@ -314,8 +314,8 @@ - - + + diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj index 84b1904..7efce1d 100644 --- a/UVtools.WPF/UVtools.WPF.csproj +++ b/UVtools.WPF/UVtools.WPF.csproj @@ -12,7 +12,7 @@ LICENSE https://github.com/sn4k3/UVtools Git - 2.24.2 + 2.24.3 AnyCPU;x64