mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-09 01:52:32 +02:00
v2.3.2
* (Add) Settings - Automations: Change only light-off delay if value is zero (Enabled by default) * (Fix) Calibrators: Some file formats will crash when calibration test output more layers than the dummy file * (Fix) Undo/redo don't unlock the save function
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 22/01/2021 - v2.3.2
|
||||
|
||||
* (Add) Settings - Automations: Change only light-off delay if value is zero (Enabled by default)
|
||||
* (Fix) Calibrators: Some file formats will crash when calibration test output more layers than the dummy file
|
||||
* (Fix) Undo/redo don't unlock the save function
|
||||
|
||||
## 19/01/2021 - v2.3.1
|
||||
|
||||
* (Add) Calibrator - Stress Tower: Generates a stress tower to test the printer capabilities
|
||||
|
||||
+2
-1
@@ -42,4 +42,5 @@
|
||||
* Timothy Gray
|
||||
* David Gordon
|
||||
* Claus Pfeilschifter
|
||||
* Chris Taatgen
|
||||
* Chris Taatgen
|
||||
* Andrew Griffiths
|
||||
@@ -43,6 +43,7 @@ namespace UVtools.Core
|
||||
_layers = value;
|
||||
BoundingRectangle = Rectangle.Empty;
|
||||
SlicerFile.LayerCount = Count;
|
||||
SlicerFile.RequireFullEncode = true;
|
||||
if (value is null) return;
|
||||
SlicerFile.PrintTime = SlicerFile.PrintTimeComputed;
|
||||
}
|
||||
@@ -187,19 +188,64 @@ namespace UVtools.Core
|
||||
{
|
||||
var layer = this[layerIndex];
|
||||
layer.Index = layerIndex;
|
||||
|
||||
if(property is null || property == nameof(SlicerFile.BottomExposureTime) || property == nameof(SlicerFile.ExposureTime))
|
||||
layer.ExposureTime = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomExposureTime, SlicerFile.ExposureTime);
|
||||
if (property is null || property == nameof(SlicerFile.BottomLiftHeight) || property == nameof(SlicerFile.LiftHeight))
|
||||
layer.LiftHeight = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomLiftHeight, SlicerFile.LiftHeight);
|
||||
if (property is null || property == nameof(SlicerFile.BottomLiftSpeed) || property == nameof(SlicerFile.LiftSpeed))
|
||||
layer.LiftSpeed = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomLiftSpeed, SlicerFile.LiftSpeed);
|
||||
if (property is null || property == nameof(SlicerFile.RetractSpeed))
|
||||
layer.RetractSpeed = SlicerFile.RetractSpeed;
|
||||
if (property is null || property == nameof(SlicerFile.BottomLightPWM) || property == nameof(SlicerFile.LightPWM))
|
||||
layer.LightPWM = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomLightPWM, SlicerFile.LightPWM);
|
||||
if (property is null || property == nameof(SlicerFile.BottomLightOffDelay) || property == nameof(SlicerFile.LightOffDelay))
|
||||
|
||||
if (property is null)
|
||||
{
|
||||
layer.ExposureTime = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomExposureTime, SlicerFile.ExposureTime);
|
||||
layer.LiftHeight = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomLiftHeight, SlicerFile.LiftHeight);
|
||||
layer.LiftSpeed = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomLiftSpeed, SlicerFile.LiftSpeed);
|
||||
layer.RetractSpeed = SlicerFile.RetractSpeed;
|
||||
layer.LightPWM = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomLightPWM, SlicerFile.LightPWM);
|
||||
layer.LightOffDelay = SlicerFile.GetInitialLayerValueOrNormal(layerIndex, SlicerFile.BottomLightOffDelay, SlicerFile.LightOffDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (layer.IsNormalLayer)
|
||||
{
|
||||
switch (property)
|
||||
{
|
||||
case nameof(SlicerFile.ExposureTime):
|
||||
layer.ExposureTime = SlicerFile.ExposureTime;
|
||||
break;
|
||||
case nameof(SlicerFile.LiftHeight):
|
||||
layer.LiftHeight = SlicerFile.LiftHeight;
|
||||
break;
|
||||
case nameof(SlicerFile.LiftSpeed):
|
||||
layer.LiftSpeed = SlicerFile.LiftSpeed;
|
||||
break;
|
||||
case nameof(SlicerFile.LightOffDelay):
|
||||
layer.LightOffDelay = SlicerFile.LightOffDelay;
|
||||
break;
|
||||
case nameof(SlicerFile.LightPWM):
|
||||
layer.LightPWM = SlicerFile.LightPWM;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // Bottom layers
|
||||
{
|
||||
switch (property)
|
||||
{
|
||||
case nameof(SlicerFile.BottomExposureTime):
|
||||
layer.ExposureTime = SlicerFile.BottomExposureTime;
|
||||
break;
|
||||
case nameof(SlicerFile.BottomLiftHeight):
|
||||
layer.LiftHeight = SlicerFile.BottomLiftHeight;
|
||||
break;
|
||||
case nameof(SlicerFile.BottomLiftSpeed):
|
||||
layer.LiftSpeed = SlicerFile.BottomLiftSpeed;
|
||||
break;
|
||||
case nameof(SlicerFile.RetractSpeed):
|
||||
layer.RetractSpeed = SlicerFile.RetractSpeed;
|
||||
break;
|
||||
case nameof(SlicerFile.BottomLightOffDelay):
|
||||
layer.LightOffDelay = SlicerFile.BottomLightOffDelay;
|
||||
break;
|
||||
case nameof(SlicerFile.BottomLightPWM):
|
||||
layer.LightPWM = SlicerFile.BottomLightPWM;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (recalculateZPos)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,6 @@ namespace UVtools.Core.Operations
|
||||
}
|
||||
|
||||
slicerFile.LayerManager.Layers = layers;
|
||||
slicerFile.RequireFullEncode = true;
|
||||
|
||||
progress.Token.ThrowIfCancellationRequested();
|
||||
|
||||
|
||||
@@ -495,7 +495,6 @@ namespace UVtools.Core.Operations
|
||||
|
||||
slicerFile.LayerManager.RebuildLayersProperties();
|
||||
slicerFile.SuppressRebuildProperties = false;
|
||||
slicerFile.RequireFullEncode = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,6 @@ namespace UVtools.Core.Operations
|
||||
|
||||
slicerFile.LayerManager.Layers = layers;
|
||||
slicerFile.LayerHeight = (float)Item.LayerHeight;
|
||||
slicerFile.RequireFullEncode = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,6 @@ namespace UVtools.Core.Operations
|
||||
}
|
||||
|
||||
slicerFile.LayerManager.Layers = layers;
|
||||
slicerFile.RequireFullEncode = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
|
||||
<PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl>
|
||||
<Description>MSLA/DLP, file analysis, calibration, repair, conversion and manipulation</Description>
|
||||
<Version>2.3.1</Version>
|
||||
<Version>2.3.2</Version>
|
||||
<Copyright>Copyright © 2020 PTRTECH</Copyright>
|
||||
<PackageIcon>UVtools.png</PackageIcon>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace UVtools.WPF
|
||||
|
||||
public void ClipboardUndo()
|
||||
{
|
||||
CanSave = true;
|
||||
if ((_globalModifiers & KeyModifiers.Shift) != 0)
|
||||
{
|
||||
ClipboardUndo(true);
|
||||
@@ -61,6 +62,7 @@ namespace UVtools.WPF
|
||||
|
||||
public async void ClipboardUndo(bool rerun)
|
||||
{
|
||||
CanSave = true;
|
||||
var clip = Clipboard.CurrentClip;
|
||||
Clipboard.Undo();
|
||||
if (!rerun)
|
||||
@@ -72,9 +74,16 @@ namespace UVtools.WPF
|
||||
if (operation is null)
|
||||
{
|
||||
Clipboard.Redo();
|
||||
CanSave = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void ClipboardRedo()
|
||||
{
|
||||
CanSave = true;
|
||||
Clipboard.Redo();
|
||||
}
|
||||
|
||||
public async void ClipboardClear()
|
||||
{
|
||||
if (await this.MessageBoxQuestion("Are you sure you want to clear the clipboard?\n" +
|
||||
|
||||
@@ -1451,7 +1451,7 @@
|
||||
|
||||
<Button
|
||||
IsEnabled="{Binding Clipboard.CanRedo}"
|
||||
Command="{Binding Clipboard.Redo}"
|
||||
Command="{Binding ClipboardRedo}"
|
||||
HotKey="Ctrl + Y"
|
||||
ToolTip.Tip="Redo [Ctrl + Y]"
|
||||
>
|
||||
|
||||
@@ -1001,9 +1001,12 @@ namespace UVtools.WPF
|
||||
}
|
||||
|
||||
bool modified = false;
|
||||
if (Settings.Automations.BottomLightOffDelay > 0 &&
|
||||
if (
|
||||
Settings.Automations.BottomLightOffDelay > 0 &&
|
||||
SlicerFile.PrintParameterModifiers is not null &&
|
||||
SlicerFile.PrintParameterModifiers.Contains(FileFormat.PrintParameterModifier.BottomLightOffDelay))
|
||||
SlicerFile.PrintParameterModifiers.Contains(FileFormat.PrintParameterModifier.BottomLightOffDelay) &&
|
||||
(!Settings.Automations.ChangeOnlyLightOffDelayIfZero || Settings.Automations.ChangeOnlyLightOffDelayIfZero && SlicerFile.BottomLightOffDelay <= 0)
|
||||
)
|
||||
{
|
||||
var lightOff = OperationCalculator.LightOffDelayC.CalculateSeconds(SlicerFile.BottomLiftHeight,
|
||||
SlicerFile.BottomLiftSpeed, SlicerFile.RetractSpeed, (float)Settings.Automations.BottomLightOffDelay);
|
||||
@@ -1016,7 +1019,8 @@ namespace UVtools.WPF
|
||||
|
||||
if (Settings.Automations.LightOffDelay > 0 &&
|
||||
SlicerFile.PrintParameterModifiers is not null &&
|
||||
SlicerFile.PrintParameterModifiers.Contains(FileFormat.PrintParameterModifier.LightOffDelay))
|
||||
SlicerFile.PrintParameterModifiers.Contains(FileFormat.PrintParameterModifier.LightOffDelay) &&
|
||||
(!Settings.Automations.ChangeOnlyLightOffDelayIfZero || Settings.Automations.ChangeOnlyLightOffDelayIfZero && SlicerFile.LightOffDelay <= 0))
|
||||
{
|
||||
var lightOff = OperationCalculator.LightOffDelayC.CalculateSeconds(SlicerFile.LiftHeight,
|
||||
SlicerFile.LiftSpeed, SlicerFile.RetractSpeed, (float)Settings.Automations.LightOffDelay);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<Version>2.3.1</Version>
|
||||
<Version>2.3.2</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -1047,6 +1047,7 @@ namespace UVtools.WPF
|
||||
{
|
||||
private bool _saveFileAfterModifications = true;
|
||||
private bool _autoConvertSl1Files = true;
|
||||
private bool _changeOnlyLightOffDelayIfZero = true;
|
||||
private decimal _lightOffDelay = 2.5m;
|
||||
private decimal _bottomLightOffDelay = 3m;
|
||||
|
||||
@@ -1062,6 +1063,12 @@ namespace UVtools.WPF
|
||||
set => RaiseAndSetIfChanged(ref _autoConvertSl1Files, value);
|
||||
}
|
||||
|
||||
public bool ChangeOnlyLightOffDelayIfZero
|
||||
{
|
||||
get => _changeOnlyLightOffDelayIfZero;
|
||||
set => RaiseAndSetIfChanged(ref _changeOnlyLightOffDelayIfZero, value);
|
||||
}
|
||||
|
||||
|
||||
public decimal LightOffDelay
|
||||
{
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
SizeToContent="Height"
|
||||
CanResize="False"
|
||||
Title="UVtools - Settings"
|
||||
Icon="/Assets/Icons/UVtools.ico"
|
||||
>
|
||||
Icon="/Assets/Icons/UVtools.ico">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<TabControl SelectedIndex="{Binding SelectedTabIndex}">
|
||||
<TabItem Header="General" VerticalContentAlignment="Center">
|
||||
@@ -21,8 +20,7 @@
|
||||
<Border
|
||||
Margin="5"
|
||||
BorderBrush="LightBlue"
|
||||
BorderThickness="4"
|
||||
>
|
||||
BorderThickness="4">
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Padding="10" Background="LightBlue" FontWeight="Bold" Text="Startup"/>
|
||||
@@ -1332,6 +1330,13 @@
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Padding="10" Background="LightBlue" FontWeight="Bold" Text="Light-off delay"/>
|
||||
|
||||
<CheckBox Margin="15,15,15,0"
|
||||
Content="Change only light-off delay if value is zero"
|
||||
ToolTip.Tip="If enabled, it will only change light-off delay to the defined values if the original value is zero.
|
||||

If disabled, it will always change the light-off delay to the defined values."
|
||||
IsChecked="{Binding Settings.Automations.ChangeOnlyLightOffDelayIfZero}"/>
|
||||
|
||||
<Grid Margin="15"
|
||||
RowDefinitions="Auto"
|
||||
ColumnDefinitions="Auto,10,100,5,Auto,30,Auto,10,100,5,Auto">
|
||||
|
||||
Reference in New Issue
Block a user