Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Conceição <Tiago_caza@hotmail.com>2021-07-17 00:40:11 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2021-07-17 00:40:11 +0300
commita648610d59e706cbea3b516d8c7ec9a41cb2b907 (patch)
treee73ad15991ffc122906bb8b6498738854e6d6436 /UVtools.WPF
parent3d3228860590ed0d8f14bd40803eb608d8ea65d9 (diff)
v2.15.0v2.15.0
- **File formats:** - (Add) Wait time before cure: The time to rest/wait in seconds before cure a new layer - (Add) Wait time before after: The time to rest/wait in seconds after cure a new layer - (Add) Wait time after lift: The time to rest/wait in seconds after a lift/peel move - (Change) All gcode file formats dropped light-off delay field in favor of new 'Wait time before cure' field, setting light-off delay still valid but it redirects to the new field - (Change) Reorder 'Light-off delay' before 'Exposure time' - (Improvement) Recalculate the print time when a related property changes - (Fix) Generic time estimation calculation was ignoring exposure times - (Fix) Unable to load files with uppercase extensions - (Fix) ZIP: Use G1 at end of gcode instead of G0 - (Fix) CWS: Use G1 for movements - **(Fix) CXDLP:** (#240) - Layer area calculation - Validation checksum - **(Fix) ZCODE:** - Use G1 at end of gcode instead of G0 to prevent crash to top bug on firmware - Put back the M18 motors off at end of gcode - **GCode Builder/Parser:** - (Add) Allow to choose between G0 and G1 for layer movements and end gcode - (Fix) Safe guard: If the total print height is larger than set machine Z, do not raise/lower print on completeness - (Fix) Light-off delay is the real delay time and not the calculated movement of the lifts plus the extra time - (Improvement) Parse gcode line by line instead searching on a group of layers to allow a better control and identification - **Tools:** - **Change print parameters:** - (Add) Tooltips to labels - (Add) Sun UTF-8 to the Light PWM value unit to describe intensity - (Improvement) Dynamic lifts: Round lift height and speed to 1 decimal - (Fix) Exposure time finder: Time estimation when using 'Use different settings for layers with same Z positioning' - **Prusa Slicer:** - (Add) Note keyword: BottomWaitBeforeCure_xxx - (Add) Note keyword: WaitBeforeCure_xxx - (Add) Note keyword: BottomWaitAfterCure_xxx - (Add) Note keyword: WaitAfterCure_xxx - (Add) Note keyword: BottomWaitAfterLift_xxx - (Add) Note keyword: WaitAfterLift_xxx - (Change) Uniz IBEE: Remove light-off delay and implement wait time keywords - **macOS:** (#236) - (Remove) osx legacy packages from build and downloads - (Fix) macOS: Simplify the libcvextern.dylib and remove libtesseract dependency - (Fix) macOS: Include libusb-1.0.0.dylib - Note: `brew install libusb` still required - **UI:** - (Fix) Refresh gcode does not update text on UI for ZIP, CWS, ZCODEX files - (Fix) Operations: Import a .uvtop file by drag and drop into the UI would not load the layer range - (Change) When convert a file, the result dialog will have Yes, No and Cancel actions, where No will open the converted file on current window, while Cancel will not perform any action (The old No behaviour)
Diffstat (limited to 'UVtools.WPF')
-rw-r--r--UVtools.WPF/App.axaml.cs7
-rw-r--r--UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml.cs2
-rw-r--r--UVtools.WPF/Controls/Tools/ToolDynamicLayerHeightControl.axaml.cs2
-rw-r--r--UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs9
-rw-r--r--UVtools.WPF/MainWindow.Information.cs25
-rw-r--r--UVtools.WPF/MainWindow.axaml5
-rw-r--r--UVtools.WPF/MainWindow.axaml.cs26
-rw-r--r--UVtools.WPF/UVtools.WPF.csproj2
-rw-r--r--UVtools.WPF/Windows/ToolWindow.axaml.cs4
9 files changed, 52 insertions, 30 deletions
diff --git a/UVtools.WPF/App.axaml.cs b/UVtools.WPF/App.axaml.cs
index 20c37ca..ba3231c 100644
--- a/UVtools.WPF/App.axaml.cs
+++ b/UVtools.WPF/App.axaml.cs
@@ -67,6 +67,13 @@ namespace UVtools.WPF
}
}*/
+ if (!CvInvoke.Init())
+ {
+ Console.WriteLine("UVtools can not init OpenCV library\n" +
+ "Please build or install this dependencies in order to run UVtools\n" +
+ "Check manual or page at 'Requirements' section for help");
+ }
+
MainWindow = new MainWindow();
try
{
diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml.cs b/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml.cs
index 205f874..5fc920d 100644
--- a/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml.cs
+++ b/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml.cs
@@ -31,7 +31,7 @@ namespace UVtools.WPF.Controls.Calibrators
set => RaiseAndSetIfChanged(ref _previewImage, value);
}
- public bool CanSupportPerLayerSettings => SlicerFile.HaveLayerParameterModifier(FileFormat.PrintParameterModifier.ExposureSeconds);
+ public bool CanSupportPerLayerSettings => SlicerFile.HaveLayerParameterModifier(FileFormat.PrintParameterModifier.ExposureTime);
public CalibrateExposureFinderControl()
{
diff --git a/UVtools.WPF/Controls/Tools/ToolDynamicLayerHeightControl.axaml.cs b/UVtools.WPF/Controls/Tools/ToolDynamicLayerHeightControl.axaml.cs
index 040ef78..28a1599 100644
--- a/UVtools.WPF/Controls/Tools/ToolDynamicLayerHeightControl.axaml.cs
+++ b/UVtools.WPF/Controls/Tools/ToolDynamicLayerHeightControl.axaml.cs
@@ -44,7 +44,7 @@ namespace UVtools.WPF.Controls.Tools
return;
}
- if (!SlicerFile.HaveLayerParameterModifier(FileFormat.PrintParameterModifier.ExposureSeconds))
+ if (!SlicerFile.HaveLayerParameterModifier(FileFormat.PrintParameterModifier.ExposureTime))
{
App.MainWindow.MessageBoxWaring($"Your printer seems to not support this tool, still you are allowed to run it for analyze, packing layers or simulation.\n" +
$"Do not print this file after run this tool on a not compatible printer, it will result in malformed model and height violation.\n" +
diff --git a/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs b/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs
index 2ab8826..58107ad 100644
--- a/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs
+++ b/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
+using System.ComponentModel;
using System.Globalization;
using Avalonia;
using Avalonia.Controls;
@@ -38,7 +35,7 @@ namespace UVtools.WPF.Controls.Tools
Modifier = modifier;
modifier.NewValue = modifier.OldValue.Clamp(modifier.Minimum, modifier.Maximum);
-
+
Name = new TextBlock
{
Text = $"{modifier.Name}:",
@@ -47,6 +44,8 @@ namespace UVtools.WPF.Controls.Tools
Tag = this,
};
+ if(!string.IsNullOrWhiteSpace(modifier.Description)) ToolTip.SetTip(Name, modifier.Description);
+
OldValue = new TextBlock
{
Text = modifier.OldValue.ToString(CultureInfo.InvariantCulture),
diff --git a/UVtools.WPF/MainWindow.Information.cs b/UVtools.WPF/MainWindow.Information.cs
index 71d6a5f..3efc701 100644
--- a/UVtools.WPF/MainWindow.Information.cs
+++ b/UVtools.WPF/MainWindow.Information.cs
@@ -342,21 +342,22 @@ namespace UVtools.WPF
CurrentLayerProperties.Add(new ValueDescription(layer.IsBottomLayer.ToString(), nameof(layer.IsBottomLayer)));
CurrentLayerProperties.Add(new ValueDescription(layer.IsModified.ToString(), nameof(layer.IsModified)));
CurrentLayerProperties.Add(new ValueDescription($"{layer.ExposureTime:F2}s", nameof(layer.ExposureTime)));
-
- if (SlicerFile.PrintParameterPerLayerModifiers is not null)
+
+ if (SlicerFile.SupportPerLayerSettings)
{
- if (SlicerFile.PrintParameterPerLayerModifiers.Contains(FileFormat.PrintParameterModifier.LiftHeight))
+ if (SlicerFile.CanUseLayerLiftHeight)
CurrentLayerProperties.Add(new ValueDescription($"{layer.LiftHeight.ToString(CultureInfo.InvariantCulture)}mm @ {layer.LiftSpeed.ToString(CultureInfo.InvariantCulture)}mm/min", nameof(layer.LiftHeight)));
- if (SlicerFile.PrintParameterPerLayerModifiers.Contains(FileFormat.PrintParameterModifier.RetractSpeed))
- CurrentLayerProperties.Add(new ValueDescription($"{layer.RetractSpeed}mm/min",
- nameof(layer.RetractSpeed)));
-
- if (SlicerFile.PrintParameterPerLayerModifiers.Contains(FileFormat.PrintParameterModifier.LightOffDelay))
- CurrentLayerProperties.Add(new ValueDescription($"{layer.LightOffDelay}s",
- nameof(layer.LightOffDelay)));
-
- if (SlicerFile.PrintParameterPerLayerModifiers.Contains(FileFormat.PrintParameterModifier.LightPWM))
+ if (SlicerFile.CanUseLayerRetractSpeed)
+ CurrentLayerProperties.Add(new ValueDescription($"{layer.RetractSpeed}mm/min", nameof(layer.RetractSpeed)));
+
+ if (SlicerFile.CanUseLayerLightOffDelay)
+ CurrentLayerProperties.Add(new ValueDescription($"{layer.LightOffDelay}s", nameof(layer.LightOffDelay)));
+
+ if (SlicerFile.CanUseLayerWaitTimeBeforeCure)
+ CurrentLayerProperties.Add(new ValueDescription($"{layer.WaitTimeBeforeCure}/{layer.WaitTimeAfterCure}/{layer.WaitTimeAfterLift}s", "WaitTimes:"));
+
+ if (SlicerFile.CanUseLayerLightPWM)
CurrentLayerProperties.Add(new ValueDescription(layer.LightPWM.ToString(), nameof(layer.LightPWM)));
}
var materialMillilitersPercent = layer.MaterialMillilitersPercent;
diff --git a/UVtools.WPF/MainWindow.axaml b/UVtools.WPF/MainWindow.axaml
index 3507618..1d0d098 100644
--- a/UVtools.WPF/MainWindow.axaml
+++ b/UVtools.WPF/MainWindow.axaml
@@ -314,6 +314,11 @@
<TextBlock IsVisible="{Binding SlicerFile.CanUseAnyLightOffDelay}"
Text="{Binding SlicerFile.LightOffDelayRepresentation, StringFormat=Light-off: {0}}"/>
+ <TextBlock IsVisible="{Binding SlicerFile.CanUseAnyWaitTime}" Text=" | "/>
+ <TextBlock IsVisible="{Binding SlicerFile.CanUseAnyWaitTime}"
+ ToolTip.Tip="Wait time: Before cure / After cure / After lift"
+ Text="{Binding SlicerFile.WaitTimeRepresentation, StringFormat=Wait time: {0}}"/>
+
<TextBlock IsVisible="{Binding SlicerFile.PrintTimeHours}" Text=" | "/>
<TextBlock IsVisible="{Binding SlicerFile.PrintTimeHours}"
Text="{Binding SlicerFile.PrintTimeString, StringFormat=Print time: \{0\}}"/>
diff --git a/UVtools.WPF/MainWindow.axaml.cs b/UVtools.WPF/MainWindow.axaml.cs
index 4052fc3..3b8bb8a 100644
--- a/UVtools.WPF/MainWindow.axaml.cs
+++ b/UVtools.WPF/MainWindow.axaml.cs
@@ -1309,7 +1309,7 @@ namespace UVtools.WPF
if (sender is not MenuItem item) return;
if (item.Tag is not FileExtension fileExtension) return;
- SaveFileDialog dialog = new()
+ SaveFileDialog saveDialog = new()
{
InitialFileName = Path.GetFileNameWithoutExtension(SlicerFile.FileFullPath),
Filters = Helpers.ToAvaloniaFilter(fileExtension.Description, fileExtension.Extension),
@@ -1318,7 +1318,7 @@ namespace UVtools.WPF
: Settings.General.DefaultDirectoryConvertFile
};
- var result = await dialog.ShowAsync(this);
+ var result = await saveDialog.ShowAsync(this);
if (string.IsNullOrEmpty(result)) return;
@@ -1354,12 +1354,21 @@ namespace UVtools.WPF
if (task)
{
- if (await this.MessageBoxQuestion(
+ var question = await this.MessageBoxQuestion(
$"Conversion completed in {LastStopWatch.ElapsedMilliseconds / 1000}s\n\n" +
- $"Do you want to open {Path.GetFileName(result)} in a new window?",
- "Conversion complete") == ButtonResult.Yes)
- {
- App.NewInstance(result);
+ $"Do you want to open '{Path.GetFileName(result)}' in a new window?\n" +
+ "Yes: Open in a new window.\n" +
+ "No: Open in this window.\n" +
+ "Cancel: Do not perform any action.\n",
+ "Conversion complete", ButtonEnum.YesNoCancel);
+ switch (question)
+ {
+ case ButtonResult.No:
+ ProcessFile(result, _actualLayer);
+ break;
+ case ButtonResult.Yes:
+ App.NewInstance(result);
+ break;
}
}
else
@@ -1547,11 +1556,12 @@ namespace UVtools.WPF
control.IsVisible = false;
}
- var window = new ToolWindow(control);
+
if (loadOperation is not null)
{
control.BaseOperation = loadOperation;
}
+ var window = new ToolWindow(control);
await window.ShowDialog(this);
if (window.DialogResult != DialogResults.OK) return null;
var operation = control.BaseOperation;
diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj
index 917c2f0..e2a8f43 100644
--- a/UVtools.WPF/UVtools.WPF.csproj
+++ b/UVtools.WPF/UVtools.WPF.csproj
@@ -12,7 +12,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
- <Version>2.14.3</Version>
+ <Version>2.15.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
diff --git a/UVtools.WPF/Windows/ToolWindow.axaml.cs b/UVtools.WPF/Windows/ToolWindow.axaml.cs
index 2d1da9c..f7ffdfa 100644
--- a/UVtools.WPF/Windows/ToolWindow.axaml.cs
+++ b/UVtools.WPF/Windows/ToolWindow.axaml.cs
@@ -611,7 +611,7 @@ namespace UVtools.WPF.Windows
}
if (toolControl.BaseOperation.HaveExecuted
- || toolControl.BaseOperation.ImportedFrom is not Operation.OperationImportFrom.None) // Loaded from something
+ || toolControl.BaseOperation.ImportedFrom != Operation.OperationImportFrom.None) // Loaded from something
{
if (toolControl.BaseOperation.HaveROI)
{
@@ -645,7 +645,7 @@ namespace UVtools.WPF.Windows
var profiles = OperationProfiles.GetOperations(ToolControl.BaseOperation.GetType());
_profiles.AddRange(profiles);
- if (toolControl.BaseOperation.ImportedFrom is Operation.OperationImportFrom.None ||
+ if (toolControl.BaseOperation.ImportedFrom == Operation.OperationImportFrom.None ||
(loadedFromSession && !Settings.Tools.LastUsedSettingsPriorityOverDefaultProfile))
{
//Operation profile = _profiles.FirstOrDefault(operation => operation.ProfileIsDefault);