Skip to content

Commit beda0ac

Browse files
committed
v5.2.1
- (Add) PrusaSlicer printer: Elegoo Mars 5 (#1063) - (Fix) PCB Exposure Tool: Incorrect oval apertures (#1066) - (Fix) NanoDLP: Revert "Fill TotalSolidArea with the resin millimeters (#1057)" to solid area in mm² (#1069) - (Fix) Crash when launch software without internet connection (#1070) - (Upgrade) AvaloniaUI from 11.3.4 to 11.3.6 - (Upgrade) .NET from 9.0.8 to 9.0.9
1 parent 5dcbcc9 commit beda0ac

File tree

9 files changed

+99
-31
lines changed

9 files changed

+99
-31
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Changelog
22

3-
## 13/08/2025 - v5.2.0
3+
## 26/09/2025 - v5.2.1
4+
- (Add) PrusaSlicer printer: Elegoo Mars 5 (#1063)
5+
- (Fix) PCB Exposure Tool: Incorrect oval apertures (#1066)
6+
- (Fix) NanoDLP: Revert "Fill TotalSolidArea with the resin millimeters (#1057)" to solid area in mm² (#1069)
7+
- (Fix) Crash when launch software without internet connection (#1070)
8+
- (Upgrade) AvaloniaUI from 11.3.4 to 11.3.6
9+
- (Upgrade) .NET from 9.0.8 to 9.0.9
10+
11+
## 23/08/2025 - v5.2.0
412
- (Change) Setting: Default layer compression codec from `LZ4` to `PNG`, this will reduce the memory usage and better RAM management when handling large resolution files. For current users is required to change on settings if you want to switch
513
- (Change) Setting: Default available RAM limit from `1GB` to `0` (Disabled)
614
- (Change) PrusaSlicer printers: Rename all `AnyCubic` printers to `Anycubic`

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
3939

4040
<!-- Versions -->
41-
<UVtoolsVersion>5.2.0</UVtoolsVersion>
42-
<AvaloniaVersion>11.3.4</AvaloniaVersion>
41+
<UVtoolsVersion>5.2.1</UVtoolsVersion>
42+
<AvaloniaVersion>11.3.6</AvaloniaVersion>
4343

4444
<!-- MvvmToolkit -->
4545
<MvvmToolkitEnableINotifyPropertyChangingSupport>false</MvvmToolkitEnableINotifyPropertyChangingSupport>

RELEASE_NOTES.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
- (Change) Setting: Default layer compression codec from `LZ4` to `PNG`, this will reduce the memory usage and better RAM management when handling large resolution files. For current users is required to change on settings if you want to switch
2-
- (Change) Setting: Default available RAM limit from `1GB` to `0` (Disabled)
3-
- (Change) PrusaSlicer printers: Rename all `AnyCubic` printers to `Anycubic`
4-
- (Improvement) Allocate some arrays as uninitialized to improve the performance
5-
- (Improvement) CTB: Less allocations while encrypting/decrypting layers
6-
- (Improvement) Less allocations when getting compressed zip entries to bytes
7-
- (Improvement) Less memory pressure when using `LZ4` layer compression
8-
- (Improvement) When read archive file formats with 8 bit png and PNG compressor, initialize the layer with the image instead of the bytes to force calculations
9-
- (Fix) Crash when checking for updates in some cases (#1054)
10-
- (Fix) NanoDLP: Fill TotalSolidArea with the resin millimeters (#1057)
11-
- (Fix) Anycubic PrusaSlicer printers name: File parameter, version number mismatch (#1055)
12-
- (Fix) Archive file formats when using PNG compressor are saving incomplete images and not loading the layer height
13-
- (Fix) Memory leak setting layer PNG bytes when using other compressor than PNG
14-
- (Fix) File - Extract when using PNG compressor was not extracting the whole layer image area
15-
- (Upgrade) AvaloniaUI from 11.3.3 to 11.3.4
1+
- (Add) PrusaSlicer printer: Elegoo Mars 5 (#1063)
2+
- (Fix) PCB Exposure Tool: Incorrect oval apertures (#1066)
3+
- (Fix) NanoDLP: Revert "Fill TotalSolidArea with the resin millimeters (#1057)" to solid area in mm² (#1069)
4+
- (Fix) Crash when launch software without internet connection (#1070)
5+
- (Upgrade) AvaloniaUI from 11.3.4 to 11.3.6
6+
- (Upgrade) .NET from 9.0.8 to 9.0.9
167

UVtools.Core/FileFormats/NanoDLPFile.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,7 @@ protected override void EncodeInternally(OperationProgress progress)
964964
if (pixelArea > 0)
965965
{
966966
var contours = layer.Contours;
967-
//item.TotalSolidArea = MathF.Round((float)contours.TotalSolidArea * pixelArea, 4, MidpointRounding.AwayFromZero);
968-
item.TotalSolidArea = layer.MaterialMilliliters;
967+
item.TotalSolidArea = MathF.Round((float)contours.TotalSolidArea * pixelArea, 4, MidpointRounding.AwayFromZero);
969968
item.SmallestArea = MathF.Round((float)contours.MinSolidArea * pixelArea, 4, MidpointRounding.AwayFromZero);
970969
item.LargestArea = MathF.Round((float)contours.MaxSolidArea * pixelArea, 4, MidpointRounding.AwayFromZero);
971970
item.AreaCount = (uint)contours.ExternalContoursCount;

UVtools.Core/Gerber/Apertures/ObroundAperture.cs

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* of this license document, but changing it is not allowed.
77
*/
88

9+
using System;
910
using Emgu.CV;
1011
using Emgu.CV.CvEnum;
1112
using Emgu.CV.Structure;
@@ -39,7 +40,74 @@ public ObroundAperture(GerberFormat document, int index, SizeF axes, double hole
3940
public override void DrawFlashD3(Mat mat, PointF at, MCvScalar color, LineType lineType = LineType.EightConnected)
4041
{
4142
var location = Document.PositionMmToPx(at);
42-
// Calculate radii of the semicircles
43+
44+
// full (width,height) in pixels
45+
var fullPx = Document.SizeMmToPx(Axes.Width, Axes.Height);
46+
47+
// half sizes (halfWidth, halfHeight) in pixels
48+
var halfPx = Document.SizeMmToPx(Axes.Width / 2.0, Axes.Height / 2.0);
49+
50+
// "circle" radii derived from half-height and half-width (square sizes)
51+
var halfFromHeight = Document.SizeMmToPx(Axes.Height / 2.0, Axes.Height / 2.0); // (halfHeightPx, halfHeightPx)
52+
var halfFromWidth = Document.SizeMmToPx(Axes.Width / 2.0, Axes.Width / 2.0); // (halfWidthPx, halfWidthPx)
53+
54+
// If wider than tall -> left/right semicircles + horizontal rectangle
55+
if (fullPx.Width >= fullPx.Height)
56+
{
57+
var leftCenterX = location.X - halfPx.Width + halfFromHeight.Width;
58+
var rightCenterX = location.X + halfPx.Width - halfFromHeight.Width;
59+
60+
var leftCenter = new Point(leftCenterX, location.Y);
61+
var rightCenter = new Point(rightCenterX, location.Y);
62+
63+
// draw end-caps (full circles) and the connecting rectangle
64+
CvInvoke.Ellipse(mat, leftCenter, halfFromHeight, 0, 0, 360, color, -1, lineType);
65+
CvInvoke.Ellipse(mat, rightCenter, halfFromHeight, 0, 0, 360, color, -1, lineType);
66+
67+
var rectX = leftCenter.X;
68+
var rectY = location.Y - halfFromHeight.Height;
69+
var rectW = (int)Math.Round(fullPx.Width - 2.0 * halfFromHeight.Width, MidpointRounding.AwayFromZero); // width - 2 * halfHeightPx
70+
var rectH = (int)Math.Round(2.0 * halfFromHeight.Height, MidpointRounding.AwayFromZero);
71+
72+
if (rectW > 0 && rectH > 0)
73+
CvInvoke.Rectangle(mat, new Rectangle(rectX, rectY, rectW, rectH), color, -1, lineType);
74+
}
75+
else
76+
{
77+
// Taller than wide -> top/bottom end-caps + vertical rectangle
78+
var topCenterY = location.Y - halfPx.Height + halfFromWidth.Height;
79+
var bottomCenterY = location.Y + halfPx.Height - halfFromWidth.Height;
80+
81+
var topCenter = new Point(location.X, topCenterY);
82+
var bottomCenter = new Point(location.X, bottomCenterY);
83+
84+
CvInvoke.Ellipse(mat, topCenter, halfFromWidth, 0, 0, 360, color, -1, lineType);
85+
CvInvoke.Ellipse(mat, bottomCenter, halfFromWidth, 0, 0, 360, color, -1, lineType);
86+
87+
var rectX = location.X - halfFromWidth.Width;
88+
var rectY = topCenter.Y;
89+
var rectW = (int)Math.Round(2.0 * halfFromWidth.Width, MidpointRounding.AwayFromZero);
90+
var rectH = (int)Math.Round(fullPx.Height - 2.0 * halfFromWidth.Height, MidpointRounding.AwayFromZero); // height - 2 * halfWidthPx
91+
92+
if (rectW > 0 && rectH > 0)
93+
CvInvoke.Rectangle(mat, new Rectangle(rectX, rectY, rectW, rectH), color, -1, lineType);
94+
}
95+
96+
// hole (unchanged)
97+
if (HoleDiameter > 0)
98+
{
99+
var invertColor = color.Equals(EmguExtensions.BlackColor) ? EmguExtensions.WhiteColor : EmguExtensions.BlackColor;
100+
CvInvoke.Ellipse(mat,
101+
location,
102+
Document.SizeMmToPx(HoleDiameter / 2.0, HoleDiameter / 2.0),
103+
0, 0, 360, invertColor, -1, lineType);
104+
}
105+
106+
return;
107+
108+
/*
109+
var location = Document.PositionMmToPx(at);
110+
// Calculate radius of the semicircles
43111
var radius = Document.SizeMmToPx(Axes.Width / 2, Axes.Height / 2);
44112
var radiusFromHeight = Document.SizeMmToPx(Axes.Height / 2, Axes.Height / 2);
45113
var diameter = Document.SizeMmToPx(Axes.Width, Axes.Height);
@@ -52,10 +120,10 @@ public override void DrawFlashD3(Mat mat, PointF at, MCvScalar color, LineType l
52120
CvInvoke.Ellipse(mat, leftCircleCenter, radiusFromHeight, 0, 90, 270, color, -1, lineType);
53121
CvInvoke.Ellipse(mat, rightCircleCenter, radiusFromHeight, 0, -90, 90, color, -1, lineType);
54122
55-
/*CvInvoke.Ellipse(mat,
56-
location,
57-
radius,
58-
0, 0, 360, color, -1, lineType);*/
123+
//CvInvoke.Ellipse(mat,
124+
// location,
125+
// radius,
126+
// 0, 0, 360, color, -1, lineType);
59127
60128
// Draw the rectangle connecting the semicircles
61129
var rect = new Rectangle(leftCircleCenter with { Y = location.Y - radius.Height },
@@ -70,5 +138,6 @@ public override void DrawFlashD3(Mat mat, PointF at, MCvScalar color, LineType l
70138
Document.SizeMmToPx(HoleDiameter / 2.0, HoleDiameter / 2.0),
71139
0, 0, 360, invertColor, -1, lineType);
72140
}
141+
*/
73142
}
74143
}

UVtools.Core/Printer/Machine.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ public Machine Clone()
316316
new(PrinterBrand.Elegoo, "Mars 4 DLP", 4098, 2560, 132.8f, 74.7f, 150f, FlipDirection.Horizontally),
317317
new(PrinterBrand.Elegoo, "Mars 4 Max", 5760, 3600, 195.84f, 122.4f, 150f, FlipDirection.Horizontally),
318318
new(PrinterBrand.Elegoo, "Mars 4 Ultra", 8520, 4320, 153.36f, 77.76f, 165f, FlipDirection.Horizontally),
319+
new(PrinterBrand.Elegoo, "Mars 5", 4098, 2560, 143.43f, 89.6f, 150f, FlipDirection.Horizontally),
319320
new(PrinterBrand.Elegoo, "Mars 5 Ultra", 8520, 4320, 153.36f, 77.76f, 165f, FlipDirection.Horizontally),
320321
new(PrinterBrand.Elegoo, "Mars C", 1440, 2560, 68.04f, 120.96f, 150f, FlipDirection.Horizontally),
321322
new(PrinterBrand.Elegoo, "Saturn", 3840, 2400, 192f, 120f, 200f, FlipDirection.Horizontally),

UVtools.Core/UVtools.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<PackageReference Include="System.Net.Http" Version="4.3.4" />
3030
<PackageReference Include="System.Memory" Version="4.6.3" />
3131
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
32-
<PackageReference Include="System.Text.Json" Version="9.0.8" />
32+
<PackageReference Include="System.Text.Json" Version="9.0.9" />
3333
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.4.0" />
3434
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
3535
<PackageReference Include="K4os.Compression.LZ4" Version="1.3.8" />

UVtools.Installer/UVtools.Installer.wixproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="WixToolset.Sdk/6.0.1">
1+
<Project Sdk="WixToolset.Sdk/6.0.2">
22
<PropertyGroup>
33
<Platform Condition="'$(Platform)' == ''">x64</Platform>
44
<ProductVersion>$(UVtoolsVersion)</ProductVersion>
@@ -25,9 +25,9 @@
2525
<DefineConstants>Debug;$(DefineConstants)</DefineConstants>
2626
</PropertyGroup>
2727
<ItemGroup>
28-
<PackageReference Include="WixToolset.Util.wixext" Version="6.0.1" />
29-
<PackageReference Include="WixToolset.Iis.wixext" Version="6.0.1" />
30-
<PackageReference Include="WixToolset.UI.wixext" Version="6.0.1" />
28+
<PackageReference Include="WixToolset.Util.wixext" Version="6.0.2" />
29+
<PackageReference Include="WixToolset.Iis.wixext" Version="6.0.2" />
30+
<PackageReference Include="WixToolset.UI.wixext" Version="6.0.2" />
3131
</ItemGroup>
3232
<ItemGroup>
3333
<Folder Include="Resources" />

UVtools.UI/MainWindow.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ protected override async void OnOpened(EventArgs e)
806806
//_ = Task.Run(() => VersionChecker.Check());
807807
try
808808
{
809-
_ = AppUpdater.CheckForUpdatesAsync();
809+
_ = await AppUpdater.CheckForUpdatesAsync();
810810
}
811811
catch (Exception ex)
812812
{

0 commit comments

Comments
 (0)