diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5eb28aad..e8bfefb8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## 28/12/2024 - v5.0.3
+
+- Anycubic file format:
+ - (Fix) Reset TSMC values to comply with globals when decoding file and AdvancedMode is disabled (#971)
+ - (Fix) Setting the LiftHeight2 was setting the base value to BottomLiftHeight2
+ - (Fix) Setting the BottomRetractSpeed was not applying the value in the base property
+- Multiple exposure finder:
+ - (Fix) Counter triangles not taking all the new left space
+ - (Fix) When doing multiple heights the text label always show the base height
+- (Improvement) Layer image viewer internal handling
+- (Fix) Settings - Send to process: Unable to pick a process file, it was selecting folder instead
+- (Fix) Save As can show incorrect file extension description when there are other file formats with the same extension
+
## 19/12/2024 - v5.0.2
- (Fix) Remove a condition that prevents the new Anycubic file format from being used
diff --git a/CREDITS.md b/CREDITS.md
index e4f4a842..882644c7 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -93,4 +93,5 @@
- Landry David
- Jeremy Conoley
- Brady George
-- Ryan Skow
\ No newline at end of file
+- Ryan Skow
+- Cainam
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index 49597937..ea7971f1 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -37,7 +37,7 @@
true
- 5.0.2
+ 5.0.3
11.2.3
diff --git a/PrusaSlicer/printer/Uniz IBEE (Klipper).ini b/PrusaSlicer/printer/Uniz IBEE (Klipper).ini
index 178fd828..2ba1a6ae 100644
--- a/PrusaSlicer/printer/Uniz IBEE (Klipper).ini
+++ b/PrusaSlicer/printer/Uniz IBEE (Klipper).ini
@@ -1,6 +1,5 @@
-# generated by PrusaSlicer 2.7.4+win64 on 2024-05-17 at 23:45:35 UTC
+# generated by PrusaSlicer 2.9.0 on 2024-12-25 at 21:27:31 UTC
absolute_correction = 0
-area_fill = 50
bed_custom_model =
bed_custom_texture =
bed_shape = 0x0,192x0,192x120,0x120
@@ -27,7 +26,7 @@ min_exposure_time = 1
min_initial_exposure_time = 1
print_host =
printer_model = SL1
-printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\nPRINTER_VENDOR_UNIZ\nPRINTER_MODEL_IBEE\nFILEFORMAT_ZIP\nFILECLASS_KLIPPER\n\nSTART_CUSTOM_VALUES\nBottomLiftHeight_4\nBottomLiftSpeed_600\nBottomLiftAcceleration_5\nBottomLiftHeight2_2\nBottomLiftSpeed2_600\nBottomLiftAcceleration2_100\nBottomWaitTimeAfterLift_0\nBottomRetractSpeed_600\nBottomRetractAcceleration_100\nBottomRetractHeight2_1.5\nBottomRetractSpeed2_600\nBottomRetractAcceleration2_5\nBottomWaitTimeBeforeCure_3\nBottomWaitTimeAfterCure_3\n\nLiftHeight_4\nLiftSpeed_600\nLiftAcceleration_5\nLiftHeight2_2\nLiftSpeed2_600\nLiftAcceleration2_100\nWaitTimeAfterLift_0\nRetractSpeed_600\nRetractAcceleration_100\nRetractHeight2_1.5\nRetractSpeed2_600\nRetractAcceleration2_5\nWaitTimeBeforeCure_2\nWaitTimeAfterCure_1\nEND_CUSTOM_VALUES
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_SL1\nPRINTER_VENDOR_UNIZ\nPRINTER_MODEL_IBEE\nFILEFORMAT_ZIP\nFILECLASS_KLIPPER\n\nSTART_CUSTOM_VALUES\nBottomLiftHeight_4\nBottomLiftSpeed_600\nBottomLiftAcceleration_4\nBottomLiftHeight2_3\nBottomLiftSpeed2_600\nBottomLiftAcceleration2_100\nBottomWaitTimeAfterLift_0\nBottomRetractSpeed_600\nBottomRetractAcceleration_100\nBottomRetractHeight2_1.5\nBottomRetractSpeed2_600\nBottomRetractAcceleration2_4\nBottomWaitTimeBeforeCure_3\nBottomWaitTimeAfterCure_3\n\nLiftHeight_4\nLiftSpeed_600\nLiftAcceleration_4\nLiftHeight2_3\nLiftSpeed2_600\nLiftAcceleration2_100\nWaitTimeAfterLift_0\nRetractSpeed_600\nRetractAcceleration_100\nRetractHeight2_1.5\nRetractSpeed2_600\nRetractAcceleration2_4\nWaitTimeBeforeCure_2\nWaitTimeAfterCure_1\nEND_CUSTOM_VALUES
printer_settings_id =
printer_technology = SLA
printer_variant = default
diff --git a/PrusaSlicer/sla_print/Universal 0.10 - Light Supports.ini b/PrusaSlicer/sla_print/Universal 0.10 - Light Supports.ini
index 06e15b55..4815d16c 100644
--- a/PrusaSlicer/sla_print/Universal 0.10 - Light Supports.ini
+++ b/PrusaSlicer/sla_print/Universal 0.10 - Light Supports.ini
@@ -1,4 +1,4 @@
-# generated by PrusaSlicer 2.6.0+win64 on 2023-06-24 at 15:32:46 UTC
+# generated by PrusaSlicer 2.9.0 on 2024-12-28 at 19:13:46 UTC
branchingsupport_base_diameter = 4
branchingsupport_base_height = 1
branchingsupport_base_safety_distance = 1
@@ -48,7 +48,7 @@ support_base_safety_distance = 1
support_buildplate_only = 0
support_critical_angle = 45
support_enforcers_only = 0
-support_head_front_diameter = 0.6
+support_head_front_diameter = 0.5
support_head_penetration = 0.4
support_head_width = 3
support_max_bridge_length = 10
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 156c779f..608f2a44 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,3 +1,11 @@
-- (Fix) Remove a condition that prevents the new Anycubic file format from being used
-- (Upgrade) AvaloniaUI from 11.1.3 to 11.2.2
+- Anycubic file format:
+ - (Fix) Reset TSMC values to comply with globals when decoding file and AdvancedMode is disabled (#971)
+ - (Fix) Setting the LiftHeight2 was setting the base value to BottomLiftHeight2
+ - (Fix) Setting the BottomRetractSpeed was not applying the value in the base property
+- Multiple exposure finder:
+ - (Fix) Counter triangles not taking all the new left space
+ - (Fix) When doing multiple heights the text label always show the base height
+- (Improvement) Layer image viewer internal handling
+- (Fix) Settings - Send to process: Unable to pick a process file, it was selecting folder instead
+- (Fix) Save As can show incorrect file extension description when there are other file formats with the same extension
diff --git a/UVtools.AvaloniaControls/AdvancedImageBox.cs b/UVtools.AvaloniaControls/AdvancedImageBox.cs
index fc3a9948..df3ec3f3 100644
--- a/UVtools.AvaloniaControls/AdvancedImageBox.cs
+++ b/UVtools.AvaloniaControls/AdvancedImageBox.cs
@@ -1221,7 +1221,7 @@ static AdvancedImageBox()
GridColorProperty,
GridColorAlternateProperty,
PixelGridColorProperty,
- ImageProperty,
+ //ImageProperty,
SelectionRegionProperty
);
}
@@ -1297,6 +1297,13 @@ protected override void OnLoaded(RoutedEventArgs e)
}
}
+ protected override void OnSizeChanged(SizeChangedEventArgs e)
+ {
+ base.OnSizeChanged(e);
+ UpdateViewPort();
+ e.Handled = true;
+ }
+
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
@@ -1339,6 +1346,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e)
else if (ReferenceEquals(e.Property, SizeModeProperty))
{
SizeModeChanged();
+ TriggerRender();
RaisePropertyChanged(nameof(IsHorizontalBarVisible));
RaisePropertyChanged(nameof(IsVerticalBarVisible));
}
@@ -1355,6 +1363,11 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e)
RaisePropertyChanged(nameof(ScaledImageSize));
RaisePropertyChanged(nameof(Extent));
}
+ else if(ReferenceEquals(e.Property, PaddingProperty))
+ {
+ UpdateViewPort();
+ TriggerRender();
+ }
}
#endregion
@@ -1371,7 +1384,7 @@ public override void Render(DrawingContext context)
{
//Debug.WriteLine($"Render: {DateTime.Now.Ticks}");
base.Render(context);
-
+
var viewPortSize = Viewport;
// Draw Grid
var gridCellSize = GridCellSize;
@@ -1466,7 +1479,7 @@ private bool UpdateViewPort()
var verticalScrollBar = VerticalScrollBar;
if (verticalScrollBar is null) return false;
- if (!IsImageLoaded)
+ if (!IsImageLoaded || SizeMode != SizeModes.Normal)
{
horizontalScrollBar.Maximum = 0;
verticalScrollBar.Maximum = 0;
@@ -2728,6 +2741,8 @@ public Rect GetImageViewPort()
double width = 0.0;
double height = 0.0;
+ var padding = Padding;
+
switch (SizeMode)
{
case SizeModes.Normal:
@@ -2736,16 +2751,23 @@ public Rect GetImageViewPort()
xOffset = (!IsHorizontalBarVisible ? (viewPortSize.Width - ScaledImageWidth) / 2.0 : 0.0);
yOffset = (!IsVerticalBarVisible ? (viewPortSize.Height - ScaledImageHeight) / 2.0 : 0.0);
}
-
+
width = Math.Min(ScaledImageWidth - Math.Abs(Offset.X), viewPortSize.Width);
height = Math.Min(ScaledImageHeight - Math.Abs(Offset.Y), viewPortSize.Height);
break;
case SizeModes.Stretch:
- width = viewPortSize.Width;
- height = viewPortSize.Height;
+ width = viewPortSize.Width - padding.Left - padding.Right;
+ if (width <= 0) return new Rect();
+ height = viewPortSize.Height - padding.Top - padding.Bottom;
+ if (height <= 0) return new Rect();
+
+ xOffset = padding.Left;
+ yOffset = padding.Top;
break;
case SizeModes.Fit:
- double scaleFactor = Math.Min(viewPortSize.Width / image.Size.Width, viewPortSize.Height / image.Size.Height);
+ double scaleFactor = Math.Min((viewPortSize.Width - padding.Left - padding.Right) / image.Size.Width, (viewPortSize.Height - padding.Top - padding.Bottom) / image.Size.Height);
+
+ if (scaleFactor <= 0) return new Rect();
width = Math.Floor(image.Size.Width * scaleFactor);
height = Math.Floor(image.Size.Height * scaleFactor);
@@ -2755,13 +2777,18 @@ public Rect GetImageViewPort()
xOffset = (viewPortSize.Width - width) / 2.0;
yOffset = (viewPortSize.Height - height) / 2.0;
}
+ else
+ {
+ xOffset = padding.Left;
+ yOffset = padding.Top;
+ }
break;
default:
throw new ArgumentOutOfRangeException(nameof(SizeMode), SizeMode, null);
}
- return new(xOffset, yOffset, width, height);
+ return new Rect(xOffset, yOffset, width, height);
}
#endregion
diff --git a/UVtools.AvaloniaControls/UVtools.AvaloniaControls.csproj b/UVtools.AvaloniaControls/UVtools.AvaloniaControls.csproj
index 5ffc9fa4..f01ef945 100644
--- a/UVtools.AvaloniaControls/UVtools.AvaloniaControls.csproj
+++ b/UVtools.AvaloniaControls/UVtools.AvaloniaControls.csproj
@@ -9,7 +9,7 @@
- ExtendedNumericUpDown: Initial value with a reset button and value unit label
- IndexSelector: Allow to choose an index from a collection count and display the selected number
- GroupBox: Similar to GroupBox of WinForms, it contain an Header and Content
- 4.0.1
+ 4.0.2
MIT
https://github.com/sn4k3/UVtools/tree/master/UVtools.AvaloniaControls
diff --git a/UVtools.Core/FileFormats/AnycubicFile.cs b/UVtools.Core/FileFormats/AnycubicFile.cs
index 0694e3f9..f1da8e6a 100644
--- a/UVtools.Core/FileFormats/AnycubicFile.cs
+++ b/UVtools.Core/FileFormats/AnycubicFile.cs
@@ -1382,7 +1382,9 @@ public override float ExposureTime
public override float BottomLiftHeight
{
- get => FileMarkSettings.Version >= VERSION_516 ? ExtraSettings.BottomLiftHeight1 : base.BottomLiftHeight;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? ExtraSettings.BottomLiftHeight1
+ : base.BottomLiftHeight;
set
{
value = (float)Math.Round(value, 2);
@@ -1402,7 +1404,7 @@ public override float BottomLiftHeight
public override float BottomLiftSpeed
{
- get => FileMarkSettings.Version >= VERSION_516
+ get => FileMarkSettings.Version >= VERSION_516
? SpeedConverter.Convert(ExtraSettings.BottomLiftSpeed1, FormatSpeedUnit, CoreSpeedUnit)
: base.BottomLiftSpeed;
set
@@ -1415,7 +1417,9 @@ public override float BottomLiftSpeed
public override float LiftHeight
{
- get => FileMarkSettings.Version >= VERSION_516 ? ExtraSettings.LiftHeight1 : HeaderSettings.LiftHeight;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? ExtraSettings.LiftHeight1
+ : HeaderSettings.LiftHeight;
set
{
value = (float)Math.Round(value, 2);
@@ -1435,7 +1439,9 @@ public override float LiftHeight
public override float LiftSpeed
{
- get => SpeedConverter.Convert(FileMarkSettings.Version >= VERSION_516 ? ExtraSettings.LiftSpeed1 : HeaderSettings.LiftSpeed, FormatSpeedUnit, CoreSpeedUnit);
+ get => SpeedConverter.Convert(FileMarkSettings.Version >= VERSION_516
+ ? ExtraSettings.LiftSpeed1
+ : HeaderSettings.LiftSpeed, FormatSpeedUnit, CoreSpeedUnit);
set
{
value = (float)Math.Round(value, 2);
@@ -1446,7 +1452,9 @@ public override float LiftSpeed
public override float BottomLiftHeight2
{
- get => FileMarkSettings.Version >= VERSION_516 ? ExtraSettings.BottomLiftHeight2 : 0;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? ExtraSettings.BottomLiftHeight2
+ : 0;
set
{
if (FileMarkSettings.Version < VERSION_516) return;
@@ -1455,12 +1463,15 @@ public override float BottomLiftHeight2
BottomLiftHeight = bottomLiftHeight;
base.BottomLiftHeight2 = ExtraSettings.BottomLiftHeight2;
HeaderSettings.AdvancedMode = System.Convert.ToUInt32(IsUsingTSMC);
+ RaisePropertyChanged();
}
}
public override float BottomLiftSpeed2
{
- get => FileMarkSettings.Version >= VERSION_516 ? SpeedConverter.Convert(ExtraSettings.BottomLiftSpeed2, FormatSpeedUnit, CoreSpeedUnit) : 0;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? SpeedConverter.Convert(ExtraSettings.BottomLiftSpeed2, FormatSpeedUnit, CoreSpeedUnit)
+ : 0;
set
{
if (FileMarkSettings.Version < VERSION_516) return;
@@ -1472,21 +1483,26 @@ public override float BottomLiftSpeed2
public override float LiftHeight2
{
- get => FileMarkSettings.Version >= VERSION_516 ? ExtraSettings.LiftHeight2 : 0;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? ExtraSettings.LiftHeight2
+ : 0;
set
{
if (FileMarkSettings.Version < VERSION_516) return;
var liftHeight = LiftHeight;
ExtraSettings.LiftHeight2 = (float)Math.Round(value, 2);
LiftHeight = liftHeight;
- base.BottomLiftHeight2 = ExtraSettings.LiftHeight2;
+ base.LiftHeight2 = ExtraSettings.LiftHeight2;
HeaderSettings.AdvancedMode = System.Convert.ToUInt32(IsUsingTSMC);
+ RaisePropertyChanged();
}
}
public override float LiftSpeed2
{
- get => FileMarkSettings.Version >= VERSION_516 ? SpeedConverter.Convert(ExtraSettings.LiftSpeed2, FormatSpeedUnit, CoreSpeedUnit) : 0;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? SpeedConverter.Convert(ExtraSettings.LiftSpeed2, FormatSpeedUnit, CoreSpeedUnit)
+ : 0;
set
{
if (FileMarkSettings.Version < VERSION_516) return;
@@ -1498,19 +1514,23 @@ public override float LiftSpeed2
public override float BottomRetractSpeed
{
- get => FileMarkSettings.Version >= VERSION_516 ? SpeedConverter.Convert(ExtraSettings.BottomRetractSpeed1, FormatSpeedUnit, CoreSpeedUnit) : RetractSpeed;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? SpeedConverter.Convert(ExtraSettings.BottomRetractSpeed1, FormatSpeedUnit, CoreSpeedUnit)
+ : RetractSpeed;
set
{
- value = (float)Math.Round(value, 2);
-
if (FileMarkSettings.Version < VERSION_516) return;
+ value = (float)Math.Round(value, 2);
ExtraSettings.BottomRetractSpeed1 = SpeedConverter.Convert(value, CoreSpeedUnit, FormatSpeedUnit);
+ base.BottomRetractSpeed = value;
}
}
public override float RetractSpeed
{
- get => SpeedConverter.Convert(FileMarkSettings.Version >= VERSION_516 ? ExtraSettings.RetractSpeed1 : HeaderSettings.RetractSpeed, FormatSpeedUnit, CoreSpeedUnit);
+ get => SpeedConverter.Convert(FileMarkSettings.Version >= VERSION_516
+ ? ExtraSettings.RetractSpeed1
+ : HeaderSettings.RetractSpeed, FormatSpeedUnit, CoreSpeedUnit);
set
{
value = (float)Math.Round(value, 2);
@@ -1521,7 +1541,9 @@ public override float RetractSpeed
public override float BottomRetractSpeed2
{
- get => FileMarkSettings.Version >= VERSION_516 ? SpeedConverter.Convert(ExtraSettings.BottomRetractSpeed2, FormatSpeedUnit, CoreSpeedUnit) : 0;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? SpeedConverter.Convert(ExtraSettings.BottomRetractSpeed2, FormatSpeedUnit, CoreSpeedUnit)
+ : 0;
set
{
if (FileMarkSettings.Version < VERSION_516) return;
@@ -1533,7 +1555,9 @@ public override float BottomRetractSpeed2
public override float RetractSpeed2
{
- get => FileMarkSettings.Version >= VERSION_516 ? SpeedConverter.Convert(ExtraSettings.RetractSpeed2, FormatSpeedUnit, CoreSpeedUnit) : 0;
+ get => FileMarkSettings.Version >= VERSION_516
+ ? SpeedConverter.Convert(ExtraSettings.RetractSpeed2, FormatSpeedUnit, CoreSpeedUnit)
+ : 0;
set
{
if (FileMarkSettings.Version < VERSION_516) return;
@@ -2040,6 +2064,24 @@ protected override void DecodeInternally(OperationProgress progress)
Debug.Write("Extra -> ");
Debug.WriteLine(ExtraSettings);
//ExtraSettings.ValidateExpecting(24);
+
+ if (HeaderSettings.AdvancedMode == 0)
+ {
+ // Reset TSMC values to comply with globals
+ ExtraSettings.BottomLiftHeight1 = HeaderSettings.LiftHeight;
+ ExtraSettings.BottomLiftSpeed1 = HeaderSettings.LiftSpeed;
+ ExtraSettings.BottomLiftHeight2 = 0;
+ ExtraSettings.BottomLiftSpeed2 = HeaderSettings.LiftSpeed;
+ ExtraSettings.BottomRetractSpeed1 = HeaderSettings.RetractSpeed;
+ ExtraSettings.BottomRetractSpeed2 = HeaderSettings.RetractSpeed;
+
+ ExtraSettings.LiftHeight1 = HeaderSettings.LiftHeight;
+ ExtraSettings.LiftSpeed1 = HeaderSettings.LiftSpeed;
+ ExtraSettings.LiftHeight2 = 0;
+ ExtraSettings.LiftSpeed2 = HeaderSettings.LiftSpeed;
+ ExtraSettings.RetractSpeed1 = HeaderSettings.RetractSpeed;
+ ExtraSettings.RetractSpeed2 = HeaderSettings.RetractSpeed;
+ }
}
if (FileMarkSettings.MachineAddress > 0)
diff --git a/UVtools.Core/FileFormats/AnycubicZipFile.cs b/UVtools.Core/FileFormats/AnycubicZipFile.cs
index 6210daab..2d091a62 100644
--- a/UVtools.Core/FileFormats/AnycubicZipFile.cs
+++ b/UVtools.Core/FileFormats/AnycubicZipFile.cs
@@ -19,6 +19,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
+using Emgu.CV.Structure;
using Emgu.CV.Util;
using UVtools.Core.Converters;
using UVtools.Core.EmguCV;
@@ -603,7 +604,8 @@ private Mat DecodeLayerRle(AnycubicZipRleFormat format, byte[] encodedRle)
var startPoint = DisplayToPixelPosition(startX, startY);
var endPoint = DisplayToPixelPosition(endX, endY);
- CvInvoke.Line(mat, startPoint, endPoint, EmguExtensions.WhiteColor);
+ //CvInvoke.Line(mat, startPoint, endPoint, EmguExtensions.WhiteColor);
+ CvInvoke.Line(mat, startPoint, endPoint, new MCvScalar((1+i)*15));
}
var boundingRectangle = CvInvoke.BoundingRectangle(mat);
@@ -616,11 +618,27 @@ private Mat DecodeLayerRle(AnycubicZipRleFormat format, byte[] encodedRle)
foreach (var family in contours.Families)
{
newContours.Push(family.TraverseTree()
- .Where(traverseFamily => traverseFamily.Depth % 2 == 0) // Ignore all non-welcomers
+ .Where(traverseFamily => traverseFamily.IsPositive) // Ignore all non-welcomers
.Select(traverseFamily => traverseFamily.Self.Vector).ToArray());
}
+
+
+ /*for (var i = 0; i < contours.Vector.Size; i++)
+ {
+ var x = Random.Shared.Next(0, contours.Vector[i].Size);
+ CvInvoke.PutText(mat, contours.Hierarchy[i, EmguContour.HierarchyParent].ToString(), contours.Vector[i][0], FontFace.HersheyDuplex, 1, new MCvScalar(127), 1);
+ }*/
CvInvoke.DrawContours(mat, newContours, -1, EmguExtensions.WhiteColor, -1);
+
+ /*foreach (var family in contours.Families)
+ {
+ foreach (var me in family.TraverseTree())
+ {
+ var i = Random.Shared.Next(0, me.Self.Vector.Size);
+ CvInvoke.PutText(mat, me.Depth.ToString(), me.Self.Vector[0], FontFace.HersheyDuplex, 1, new MCvScalar(127), 1);
+ }
+ }*/
}
}
@@ -760,8 +778,8 @@ protected override void OnBeforeEncode(bool isPartialEncode)
{
Settings.MachineType.PixelWidthMicrons = PixelWidthMicrons;
Settings.MachineType.PixelHeightMicrons = PixelHeightMicrons;
- Settings.MachineType.PreviewImageSize = new []{ ThumbnailsOriginalSize[0].Width, ThumbnailsOriginalSize[0].Height };
- Settings.MachineType.Preview2ImageSize = new []{ ThumbnailsOriginalSize[1].Width, ThumbnailsOriginalSize[1].Height };
+ Settings.MachineType.PreviewImageSize = [ThumbnailsOriginalSize[0].Width, ThumbnailsOriginalSize[0].Height];
+ Settings.MachineType.Preview2ImageSize = [ThumbnailsOriginalSize[1].Width, ThumbnailsOriginalSize[1].Height];
if (Settings.MachineType.Screens.Length > 0)
{
diff --git a/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs b/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs
index 0a30c632..099fae49 100644
--- a/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs
+++ b/UVtools.Core/Operations/OperationCalibrateExposureFinder.cs
@@ -1615,7 +1615,7 @@ public Mat[] GetLayers(out Point markingTextPositivePosition, out Point markingT
if (negativeSideWidth >= 200 && _counterTrianglesEnabled)
{
- xPos = 120;
+ xPos = featuresMarginX;
int triangleHeight = TextMarkingSpacing + 19;
int triangleWidth = (negativeSideWidth - xPos - featuresMarginX) / 2;
int triangleWidthQuarter = triangleWidth / 4;
@@ -2084,11 +2084,11 @@ lastExposureItem is not null &&
}
}
- matRoi.PutTextExtended($"{Microns}u\n{bottomExposureTemp}s\n{normalExposureTemp}s", markingTextPositivePosition,
+ matRoi.PutTextExtended($"{microns}u\n{bottomExposureTemp}s\n{normalExposureTemp}s", markingTextPositivePosition,
_textFont, _textScale, EmguExtensions.WhiteColor, _textThickness, 10, _enableAntiAliasing ? LineType.AntiAlias : LineType.EightConnected);
if (holes.Length > 0)
{
- matRoi.PutTextExtended($"{Microns}u\n{bottomExposureTemp}s\n{normalExposureTemp}s", markingTextNegativePosition,
+ matRoi.PutTextExtended($"{microns}u\n{bottomExposureTemp}s\n{normalExposureTemp}s", markingTextNegativePosition,
_textFont, _textScale, EmguExtensions.BlackColor, _textThickness, 10, _enableAntiAliasing ? LineType.AntiAlias : LineType.EightConnected);
}
diff --git a/UVtools.UI/MainWindow.axaml.cs b/UVtools.UI/MainWindow.axaml.cs
index 4845d1e3..2fe60465 100644
--- a/UVtools.UI/MainWindow.axaml.cs
+++ b/UVtools.UI/MainWindow.axaml.cs
@@ -997,7 +997,8 @@ public async void MenuFileSaveAsClicked()
var filename = FileFormat.GetFileNameStripExtensions(SlicerFile!.FileFullPath!, out var ext);
//var ext = Path.GetExtension(SlicerFile.FileFullPath);
//var extNoDot = ext.Remove(0, 1);
- var extension = FileExtension.Find(ext);
+ //var extension = FileExtension.Find(ext);
+ var extension = SlicerFile.FileExtensions.FirstOrDefault(fileExtension => fileExtension.Extension == ext);
if (extension is null)
{
await this.MessageBoxError("Unable to find the target extension.", "Invalid extension");
diff --git a/UVtools.UI/UVtools.UI.csproj b/UVtools.UI/UVtools.UI.csproj
index 6c4f0594..10f81551 100644
--- a/UVtools.UI/UVtools.UI.csproj
+++ b/UVtools.UI/UVtools.UI.csproj
@@ -33,9 +33,9 @@
-
-
-
+
+
+
diff --git a/UVtools.UI/UserSettings.cs b/UVtools.UI/UserSettings.cs
index 3ead11fc..95a3d739 100644
--- a/UVtools.UI/UserSettings.cs
+++ b/UVtools.UI/UserSettings.cs
@@ -2054,7 +2054,7 @@ public static void Load()
{
var application = new MappedProcess(executable, "Open archive: WinRAR")
{
- CompatibleExtensions = "zip;sl1;sl1s;cws;zcode;zcodex;jxs;nanodlp;vdt;uvj"
+ CompatibleExtensions = "zip;sl1;sl1s;cws;zcode;zcodex;jxs;nanodlp;vdt;uvj;pm7;pm7m;pm4u;pwsz"
};
_instance.General.SendToProcess.Add(application);
}
@@ -2069,7 +2069,7 @@ public static void Load()
{
var application = new MappedProcess(executable, "Open archive: 7-Zip")
{
- CompatibleExtensions = "zip;sl1;sl1s;cws;zcode;zcodex;vdt;uvj"
+ CompatibleExtensions = "zip;sl1;sl1s;cws;zcode;zcodex;jxs;nanodlp;vdt;uvj;pm7;pm7m;pm4u;pwsz"
};
_instance.General.SendToProcess.Add(application);
}
diff --git a/UVtools.UI/Windows/SettingsWindow.axaml.cs b/UVtools.UI/Windows/SettingsWindow.axaml.cs
index 13288b56..6d7e939a 100644
--- a/UVtools.UI/Windows/SettingsWindow.axaml.cs
+++ b/UVtools.UI/Windows/SettingsWindow.axaml.cs
@@ -191,13 +191,13 @@ public async void SendToRemoveCustomLocations()
public async void SendToAddProcess()
{
- var folders = await OpenFolderPickerAsync();
- if (folders.Count == 0) return;
- var file = new MappedProcess(folders[0].TryGetLocalPath()!);
+ var files = await OpenFilePickerAsync();
+ if (files.Count == 0) return;
+ var file = new MappedProcess(files[0].TryGetLocalPath()!);
if (Settings.General.SendToProcess.Contains(file))
{
await this.MessageBoxError("The selected process already exists on the list:\n" +
- $"{folders[0].TryGetLocalPath()}");
+ $"{files[0].TryGetLocalPath()}");
return;
}