Skip to content

Commit

Permalink
v4.0.2
Browse files Browse the repository at this point in the history
- (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)
  • Loading branch information
sn4k3 committed Oct 2, 2023
1 parent 7e40c93 commit 48d5de0
Show file tree
Hide file tree
Showing 22 changed files with 36 additions and 73 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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)

3 changes: 0 additions & 3 deletions UVtools.Core/FileFormats/FileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor

public const byte MaximumAntiAliasing = 16;

public const float MinimumLayerHeight = 0.01f;
public const float MaximumLayerHeight = 0.20f;

private const ushort QueueTimerPrintTime = 250; // ms

public const string DATATYPE_PNG = "PNG";
Expand Down
3 changes: 3 additions & 0 deletions UVtools.Core/FileFormats/GooFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public void SetFrom(Layer layer)
LiftHeight2 = layer.LiftHeight2;
LiftSpeed2 = layer.LiftSpeed2;
RetractSpeed = layer.RetractSpeed;
RetractHeight = layer.RetractHeight;
RetractHeight2 = layer.RetractHeight2;
RetractSpeed2 = layer.RetractSpeed2;
WaitTimeAfterCure = layer.WaitTimeAfterCure;
Expand Down Expand Up @@ -851,6 +852,7 @@ public override float BottomRetractHeight2
{
value = Math.Clamp((float)Math.Round(value, 2), 0, BottomRetractHeightTotal);
base.BottomRetractHeight2 = Header.BottomRetractHeight2 = value;
Header.BottomRetractHeight = BottomRetractHeight;
}
}

Expand All @@ -867,6 +869,7 @@ public override float RetractHeight2
{
value = Math.Clamp((float)Math.Round(value, 2), 0, RetractHeightTotal);
base.RetractHeight2 = Header.RetractHeight2 = value;
Header.RetractHeight = RetractHeight;
}
}

Expand Down
3 changes: 3 additions & 0 deletions UVtools.Core/Layers/Layer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class Layer : BindableBase, IEquatable<Layer>, IEquatable<uint>
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
Expand Down
10 changes: 5 additions & 5 deletions UVtools.Core/Operations/OperationDynamicLayerHeight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion UVtools.Core/Operations/OperationRaiseOnPrintFinish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion UVtools.Core/UVtools.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Platforms>AnyCPU;x64</Platforms>
<Version>4.0.1</Version>
<Version>4.0.2</Version>

<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile>..\documentation\$(AssemblyName).xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}"/>
Expand Down Expand Up @@ -704,7 +704,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand All @@ -715,7 +715,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="6"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.1"
FormatString="F3"
Value="{Binding Operation.MultipleLayerHeightStep}"/>
Expand Down Expand Up @@ -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}"/>

<!--
<Grid RowDefinitions="Auto"
ColumnDefinitions="Auto,10,Auto,5,Auto,20,Auto,10,Auto,5,Auto,20,Auto,10,Auto,5,Auto"
IsEnabled="{Binding Operation.MultipleLayerHeight}">
<TextBlock Grid.Row="0" Grid.Column="0"
Text="Start layer height:"
VerticalAlignment="Center"/>
<NumericUpDown Grid.Row="0" Grid.Column="2"
Increment="0.01"
Minimum="0.01"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
<TextBlock Grid.Row="0" Grid.Column="4"
VerticalAlignment="Center"
Text="mm"/>
<TextBlock Grid.Row="0" Grid.Column="6"
Text="Increment step:"
VerticalAlignment="Center"/>
<NumericUpDown Grid.Row="0" Grid.Column="8"
Increment="0.01"
Minimum="0.01"
Maximum="0.1"
FormatString="F3"
Value="{Binding Operation.MultipleLayerHeightStep}"/>
<TextBlock Grid.Row="0" Grid.Column="10"
VerticalAlignment="Center"
Text="mm"/>
<TextBlock Grid.Row="0" Grid.Column="12"
Text="Maximum layer height:"
VerticalAlignment="Center"/>
<NumericUpDown Grid.Row="0" Grid.Column="14"
Increment="0.01"
Minimum="{Binding Operation.LayerHeight}"
Maximum="0.3"
FormatString="F3"
Value="{Binding Operation.MultipleLayerHeightMaximum}"/>
<TextBlock Grid.Row="0" Grid.Column="16"
VerticalAlignment="Center"
Text="mm"/>
</Grid>
!-->
</StackPanel>

</Expander>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<NumericUpDown Grid.Row="2" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<NumericUpDown Grid.Row="2" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<NumericUpDown Grid.Row="2" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
2 changes: 1 addition & 1 deletion UVtools.UI/Controls/Tools/ToolCalculatorControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
VerticalAlignment="Center"
Minimum="0.01"
Minimum="0.001"
Maximum="0.20"
Increment="0.01"
FormatString="F3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using UVtools.Core.FileFormats;
using UVtools.Core.Layers;
using UVtools.Core.Operations;
using UVtools.UI.Extensions;
Expand All @@ -12,7 +11,7 @@ public partial class ToolDynamicLayerHeightControl : ToolControl

public double LayerHeight => SlicerFile!.LayerHeight;
public double MinimumLayerHeight => Layer.RoundHeight(SlicerFile!.LayerHeight * 2);
public double MaximumLayerHeight => FileFormat.MaximumLayerHeight;
public double MaximumLayerHeight => Layer.MaximumHeightFloat;

public ToolDynamicLayerHeightControl()
{
Expand Down
2 changes: 1 addition & 1 deletion UVtools.UI/Controls/Tools/ToolLithophaneControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<NumericUpDown Grid.Row="0" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="0.30"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
2 changes: 1 addition & 1 deletion UVtools.UI/Controls/Tools/ToolPCBExposureControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<NumericUpDown Grid.Row="2" Grid.Column="2"
Classes="ValueLabel ValueLabel_mm"
Increment="0.01"
Minimum="0.01"
Minimum="0.001"
Maximum="500"
FormatString="F3"
Value="{Binding Operation.LayerHeight}"/>
Expand Down
2 changes: 1 addition & 1 deletion UVtools.UI/UVtools.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<AssemblyName>UVtools</AssemblyName>
<Version>4.0.1</Version>
<Version>4.0.2</Version>
<Platforms>AnyCPU;x64</Platforms>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion build/package-manager/wingetPublish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48d5de0

Please sign in to comment.