- (Add) Allow to pause and resume operations (#654)
- (Add) `Layer.FirstTransitionLayer`
- (Add) `Layer.LastTransitionLayer`
- (Add) File format: Elegoo GOO
- (Add) PrusaSlicer Printer: Elegoo Mars 4
- (Improvement) Allocate maximum GPU memory for Skia up to 256 MB
- (Improvement) Set and sanitize transition layers exposure time from last bottom layer and first normal layer instead of global times (#659)
- (Change) CXDLP: Default version from 2 to 3
- (Fix) UI was not rendering with GPU (ANGLE)
- (Fix) `Layer.IsTransitionLayer` was returning the wrong value
- (Upgrade) .NET from 6.0.13 to 6.0.14
This commit is contained in:
Tiago Conceição
2023-02-27 03:22:40 +00:00
parent 31416b619a
commit a626cfdc72
85 changed files with 1730 additions and 182 deletions
@@ -75,7 +75,7 @@ public class ScriptAdvancedDialogSample : ScriptGlobals
for (int i = 0; i < Iterations.Value; i++)
{
Progress.ThrowIfCancellationRequested();
Progress.PauseOrCancelIfRequested();
Thread.Sleep(1000);
Progress.Log = $"Task {i}: Completed!\n{Progress.Log}";
@@ -99,7 +99,7 @@ public class ScriptAutomateWorkflowSample : ScriptGlobals
foreach (var operation in operations) // Loop all my created operations to execute them
{
Progress.ThrowIfCancellationRequested(); // Abort operation, user requested cancellation
Progress.PauseOrCancelIfRequested(); // Abort operation, user requested cancellation
operation.ROI = Operation.ROI; // Copy user selected ROI to my operation
operation.MaskPoints = Operation.MaskPoints; // Copy user selected Masks to my operation
if (!operation.CanValidate()) continue; // If cant validate don't execute the operation
@@ -48,7 +48,7 @@ public class ScriptChangeLayerPropertiesSample : ScriptGlobals
for (uint layerIndex = Operation.LayerIndexStart; layerIndex <= Operation.LayerIndexEnd; layerIndex++)
{
Progress.ThrowIfCancellationRequested(); // Abort operation, user requested cancellation
Progress.PauseOrCancelIfRequested(); // Abort operation, user requested cancellation
var layer = SlicerFile[layerIndex]; // Unpack and expose layer variable for easier use
layer.LiftHeight = random.Next(3, 10); // Random value from 3 to 10
@@ -120,7 +120,7 @@ public class ScriptCloneSettings : ScriptGlobals
var results = new List<Tuple<ResultStatus, string, List<string>?>>();
foreach (var filePath in filePaths)
{
Progress.ThrowIfCancellationRequested();
Progress.PauseOrCancelIfRequested();
Tuple<ResultStatus, string, List<string>?> result;
try
@@ -1,5 +1,6 @@
using Emgu.CV;
using System;
using System.Diagnostics;
using System.Drawing;
using System.Threading.Tasks;
using UVtools.Core;
@@ -45,6 +46,7 @@ public class ScriptCompensateCrossBleeding : ScriptGlobals
CoreSettings.GetParallelOptions(Progress),
layerIndex =>
{
Progress.PauseIfRequested();
var layersBelowCount = layerIndex > LayerBleed.Value ? LayerBleed.Value : layerIndex;
using var sourceMat = originalLayers[layerIndex].LayerMat;
@@ -95,6 +95,7 @@ public class ScriptInsetSample : ScriptGlobals
// Loop user selected layers in parallel, this will put each core of CPU working here on parallel
Parallel.For(Operation.LayerIndexStart, Operation.LayerIndexEnd+1, CoreSettings.GetParallelOptions(Progress), layerIndex =>
{
Progress.PauseIfRequested();
var layer = SlicerFile[layerIndex]; // Unpack and expose layer variable for easier use
using var mat = layer.LayerMat; // Gets this layer mat/image
var original = mat.Clone(); // Keep a original mat copy
@@ -89,6 +89,7 @@ public class ScriptLightBleedCompensationSample : ScriptGlobals
// Loop user selected layers in parallel, this will put each core of CPU working here on parallel
Parallel.For(Operation.LayerIndexStart, Operation.LayerIndexEnd+1, CoreSettings.GetParallelOptions(Progress), layerIndex =>
{
Progress.PauseIfRequested();
var layer = SlicerFile[layerIndex]; // Unpack and expose layer variable for easier use
using var mat = layer.LayerMat; // Gets this layer mat/image
var original = mat.Clone(); // Keep a original mat copy
@@ -131,6 +131,7 @@ public class ScriptPreventResinShrinkage : ScriptGlobals
CoreSettings.GetParallelOptions(Progress),
layerIndex =>
{
Progress.PauseIfRequested();
var fullLayer = SlicerFile[layerIndex];
if (fullLayer.IsEmpty)
{
@@ -54,6 +54,7 @@ public class ScriptChangeLayesrPropertiesSample : ScriptGlobals
var dict = new Dictionary<uint, List<(Point[] points, Rectangle rect)>>();
Parallel.For(Operation.LayerIndexStart, Operation.LayerIndexEnd + 1, CoreSettings.GetParallelOptions(Progress), layerIndex =>
{
Progress.PauseIfRequested();
using var mat = SlicerFile[layerIndex].LayerMat;
using var contours = mat.FindContours(out var hierarchy, RetrType.Tree);