From 48d5de0e079f84558a7cd66f641dd19a68019cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Mon, 2 Oct 2023 02:11:56 +0100 Subject: [PATCH] v4.0.2 - (Change) UI: Layer height inputs minimum from 0.01mm to 0.001mm (#761) - (Fix) Goo: The value of "RetractHeight" was not being set to the file (#763) --- CHANGELOG.md | 5 ++ RELEASE_NOTES.md | 3 +- UVtools.Core/FileFormats/FileFormat.cs | 3 -- UVtools.Core/FileFormats/GooFile.cs | 3 ++ UVtools.Core/Layers/Layer.cs | 3 ++ .../Operations/OperationDynamicLayerHeight.cs | 10 ++-- .../Operations/OperationRaiseOnPrintFinish.cs | 2 +- UVtools.Core/UVtools.Core.csproj | 2 +- .../CalibrateBloomingEffectControl.axaml | 2 +- .../CalibrateElephantFootControl.axaml | 2 +- .../CalibrateExposureFinderControl.axaml | 51 ++----------------- .../CalibrateGrayscaleControl.axaml | 2 +- .../CalibrateLiftHeightControl.axaml | 2 +- .../CalibrateStressTowerControl.axaml | 2 +- .../CalibrateToleranceControl.axaml | 2 +- .../CalibrateXYZAccuracyControl.axaml | 2 +- .../Tools/ToolCalculatorControl.axaml | 2 +- .../ToolDynamicLayerHeightControl.axaml.cs | 3 +- .../Tools/ToolLithophaneControl.axaml | 2 +- .../Tools/ToolPCBExposureControl.axaml | 2 +- UVtools.UI/UVtools.UI.csproj | 2 +- build/package-manager/wingetPublish.ps1 | 2 +- 22 files changed, 36 insertions(+), 73 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3d11f02..cffc0030 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 02/10/2023 - v4.0.2 + +- (Change) UI: Layer height inputs minimum from 0.01mm to 0.001mm (#761) +- (Fix) Goo: The value of "RetractHeight" was not being set to the file (#763) + ## 18/09/2023 - v4.0.1 - (Fix) Suggestions settings were not displaying diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 800c6ea7..89d55f5f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,2 +1,3 @@ -- (Fix) Suggestions settings was not displaying +- (Change) UI: Layer height inputs minimum from 0.01mm to 0.001mm (#761) +- (Fix) Goo: The value of "RetractHeight" was not being set to the file (#763) diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs index 2a8e644b..c70627cf 100644 --- a/UVtools.Core/FileFormats/FileFormat.cs +++ b/UVtools.Core/FileFormats/FileFormat.cs @@ -88,9 +88,6 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable, IEquatable public const decimal HeightPrecisionIncrement = 0.001M; public const decimal MinimumHeight = 0.01M; public const decimal MaximumHeight = 0.2M; + + public const float MinimumHeightFloat = (float)MinimumHeight; + public const float MaximumHeightFloat = (float)MaximumHeight; #endregion #region Members diff --git a/UVtools.Core/Operations/OperationDynamicLayerHeight.cs b/UVtools.Core/Operations/OperationDynamicLayerHeight.cs index df0abc76..e570202f 100644 --- a/UVtools.Core/Operations/OperationDynamicLayerHeight.cs +++ b/UVtools.Core/Operations/OperationDynamicLayerHeight.cs @@ -115,7 +115,7 @@ public override string ToString() return NotSupportedMessage; } - if (SlicerFile.LayerHeight * 2 > FileFormat.MaximumLayerHeight) + if (SlicerFile.LayerHeight * 2 > Layer.MaximumHeightFloat) { return $"This file already uses the maximum layer height possible ({SlicerFile.LayerHeight}mm).\n" + "Layers can not be stacked, please re-slice your file with the lowest layer height of 0.01mm."; @@ -428,7 +428,7 @@ public override void InitWithSlicerFile() } if (layerHeight * 2 > _maximumLayerHeight) { - _maximumLayerHeight = Math.Min((decimal) FileFormat.MaximumLayerHeight, _maximumLayerHeight*2); + _maximumLayerHeight = Math.Min(Layer.MaximumHeight, _maximumLayerHeight*2); } if (_bottomExposureTime <= 0) _bottomExposureTime = (decimal)SlicerFile.BottomExposureTime; @@ -439,9 +439,9 @@ public override void InitWithSlicerFile() public void InitManualTable() { - for (decimal layerHeight = (decimal)FileFormat.MinimumLayerHeight; - layerHeight <= (decimal) FileFormat.MaximumLayerHeight; - layerHeight += (decimal)FileFormat.MinimumLayerHeight) + for (decimal layerHeight = Layer.MinimumHeight; + layerHeight <= Layer.MaximumHeight; + layerHeight += Layer.MinimumHeight) { var item = new ExposureItem(layerHeight, _bottomExposureTime, _exposureTime); //item.BottomExposure = _bottomExposureTime; diff --git a/UVtools.Core/Operations/OperationRaiseOnPrintFinish.cs b/UVtools.Core/Operations/OperationRaiseOnPrintFinish.cs index d1907a4a..09c29b05 100644 --- a/UVtools.Core/Operations/OperationRaiseOnPrintFinish.cs +++ b/UVtools.Core/Operations/OperationRaiseOnPrintFinish.cs @@ -56,7 +56,7 @@ public class OperationRaiseOnPrintFinish : Operation if (SlicerFile.LayerCount >= 2) { var layerHeight = SlicerFile.LastLayer!.LayerHeight; - var criteria = Math.Max((float) Layer.MaximumHeight, SlicerFile.LayerHeight); + var criteria = Math.Max(Layer.MaximumHeightFloat, SlicerFile.LayerHeight); if (layerHeight > criteria) { diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index 91a4b57d..f55c82d6 100644 --- a/UVtools.Core/UVtools.Core.csproj +++ b/UVtools.Core/UVtools.Core.csproj @@ -2,7 +2,7 @@ AnyCPU;x64 - 4.0.1 + 4.0.2 True ..\documentation\$(AssemblyName).xml diff --git a/UVtools.UI/Controls/Calibrators/CalibrateBloomingEffectControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateBloomingEffectControl.axaml index 3a2688a4..b6bac097 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateBloomingEffectControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateBloomingEffectControl.axaml @@ -17,7 +17,7 @@ diff --git a/UVtools.UI/Controls/Calibrators/CalibrateElephantFootControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateElephantFootControl.axaml index 1924ccc8..6d819bd9 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateElephantFootControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateElephantFootControl.axaml @@ -20,7 +20,7 @@ diff --git a/UVtools.UI/Controls/Calibrators/CalibrateExposureFinderControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateExposureFinderControl.axaml index 90703370..69a0c8be 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateExposureFinderControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateExposureFinderControl.axaml @@ -51,7 +51,7 @@ Classes="ValueLabel ValueLabel_mm" IsEnabled="{Binding !Operation.PatternModel}" Increment="0.01" - Minimum="0.01" + Minimum="0.001" Maximum="0.30" FormatString="F3" Value="{Binding Operation.LayerHeight}"/> @@ -704,7 +704,7 @@ @@ -715,7 +715,7 @@ @@ -1077,51 +1077,6 @@ ToolTip.Tip="If enabled, it will intrude text on each model bottom layers with information about the parameters" IsEnabled="{Binding Operation.PatternModel}" IsChecked="{Binding Operation.PatternModelTextEnabled}"/> - - diff --git a/UVtools.UI/Controls/Calibrators/CalibrateGrayscaleControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateGrayscaleControl.axaml index 77507660..b96c59aa 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateGrayscaleControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateGrayscaleControl.axaml @@ -18,7 +18,7 @@ diff --git a/UVtools.UI/Controls/Calibrators/CalibrateLiftHeightControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateLiftHeightControl.axaml index 9f1e83b0..5e936f51 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateLiftHeightControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateLiftHeightControl.axaml @@ -17,7 +17,7 @@ diff --git a/UVtools.UI/Controls/Calibrators/CalibrateStressTowerControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateStressTowerControl.axaml index c87fabae..8ace24e2 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateStressTowerControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateStressTowerControl.axaml @@ -48,7 +48,7 @@ diff --git a/UVtools.UI/Controls/Calibrators/CalibrateToleranceControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateToleranceControl.axaml index cf0c59d8..1af2ee88 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateToleranceControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateToleranceControl.axaml @@ -47,7 +47,7 @@ diff --git a/UVtools.UI/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml b/UVtools.UI/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml index e6f08980..1acbad6d 100644 --- a/UVtools.UI/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml +++ b/UVtools.UI/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml @@ -49,7 +49,7 @@ diff --git a/UVtools.UI/Controls/Tools/ToolCalculatorControl.axaml b/UVtools.UI/Controls/Tools/ToolCalculatorControl.axaml index ab80e781..1aa8109a 100644 --- a/UVtools.UI/Controls/Tools/ToolCalculatorControl.axaml +++ b/UVtools.UI/Controls/Tools/ToolCalculatorControl.axaml @@ -444,7 +444,7 @@ SlicerFile!.LayerHeight; public double MinimumLayerHeight => Layer.RoundHeight(SlicerFile!.LayerHeight * 2); - public double MaximumLayerHeight => FileFormat.MaximumLayerHeight; + public double MaximumLayerHeight => Layer.MaximumHeightFloat; public ToolDynamicLayerHeightControl() { diff --git a/UVtools.UI/Controls/Tools/ToolLithophaneControl.axaml b/UVtools.UI/Controls/Tools/ToolLithophaneControl.axaml index 8bfe989d..789bad3f 100644 --- a/UVtools.UI/Controls/Tools/ToolLithophaneControl.axaml +++ b/UVtools.UI/Controls/Tools/ToolLithophaneControl.axaml @@ -19,7 +19,7 @@ diff --git a/UVtools.UI/Controls/Tools/ToolPCBExposureControl.axaml b/UVtools.UI/Controls/Tools/ToolPCBExposureControl.axaml index 00fa0e4d..01574b8c 100644 --- a/UVtools.UI/Controls/Tools/ToolPCBExposureControl.axaml +++ b/UVtools.UI/Controls/Tools/ToolPCBExposureControl.axaml @@ -140,7 +140,7 @@ diff --git a/UVtools.UI/UVtools.UI.csproj b/UVtools.UI/UVtools.UI.csproj index 401f863a..ef7c5d76 100644 --- a/UVtools.UI/UVtools.UI.csproj +++ b/UVtools.UI/UVtools.UI.csproj @@ -2,7 +2,7 @@ WinExe UVtools - 4.0.1 + 4.0.2 AnyCPU;x64 true diff --git a/build/package-manager/wingetPublish.ps1 b/build/package-manager/wingetPublish.ps1 index 874dc8d7..5bbd9cbe 100644 --- a/build/package-manager/wingetPublish.ps1 +++ b/build/package-manager/wingetPublish.ps1 @@ -83,7 +83,7 @@ if($actionInput -eq "y" -or $actionInput -eq "yes") #(Get-Content "$installerYamlFile") -replace 'ReleaseDate:.*', "ReleaseDate: $releaseDate" | Out-File "$installerYamlFile" # Submit PR - wingetcreate.exe submit --token $wingetTokenKeyFile $outputFolder + wingetcreate.exe submit --token $wingetTokenKeyFile $manifestsPath # Clean Remove-Item $outputFolder -Recurse -ErrorAction Ignore