Skip to content

Commit c07cd09

Browse files
committed
v5.1.7
- (Fix) CTB and GOO: Set lift values to fixed 0.05 and TSMC values to 0 for tilting vat printers (#1052) - (Upgrade) OpenCV from 4.10.0 to 4.11.0 - (Upgrade) .NET from 9.0.7 to 9.0.8
1 parent 4b33503 commit c07cd09

22 files changed

+244
-188
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 06/08/2025 - v5.1.7
4+
- (Fix) CTB and GOO: Set lift values to fixed 0.05 and TSMC values to 0 for tilting vat printers (#1052)
5+
- (Upgrade) OpenCV from 4.10.0 to 4.11.0
6+
- (Upgrade) .NET from 9.0.7 to 9.0.8
7+
38
## 28/07/2025 - v5.1.6
49
- (Add) Setting - File formats - Per-layer settings: Controls if the per-layer settings can be used or not, default: Enabled (But exclude known problematic file formats)
510
- Fixes (#1049, #1013, #997, #941)

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.1.6</UVtoolsVersion>
42-
<AvaloniaVersion>11.3.2</AvaloniaVersion>
41+
<UVtoolsVersion>5.1.7</UVtoolsVersion>
42+
<AvaloniaVersion>11.3.3</AvaloniaVersion>
4343

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

RELEASE_NOTES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
- (Add) Setting - File formats - Per-layer settings: Controls if the per-layer settings can be used or not, default: Enabled (But exclude known problematic file formats)
2-
- Fixes (#1049, #1013, #997, #941)
1+
- (Fix) CTB and GOO: Set lift values to fixed 0.05 and TSMC values to 0 for tilting vat printers (#1052)
2+
- (Upgrade) OpenCV from 4.10.0 to 4.11.0
3+
- (Upgrade) .NET from 9.0.7 to 9.0.8
34

UVtools.Core/FileFormats/AnycubicFile.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ public sealed class Header : AnycubicNamedTable
354354
/// <summary>
355355
/// 80
356356
/// </summary>
357-
[FieldOrder(17)] [SerializeAs(SerializedType.UInt4)] public bool PerLayerOverride { get; set; } // bool
357+
[FieldOrder(17)] [SerializeAs(SerializedType.UInt4)] public bool PerLayerSettings { get; set; } // bool
358358

359359
[FieldOrder(18)] public uint PrintTime { get; set; }
360360

@@ -396,7 +396,7 @@ public sealed class Header : AnycubicNamedTable
396396

397397
public override string ToString()
398398
{
399-
return $"{base.ToString()}, {nameof(PixelSizeUm)}: {PixelSizeUm}, {nameof(LayerHeight)}: {LayerHeight}, {nameof(ExposureTime)}: {ExposureTime}, {nameof(WaitTimeBeforeCure)}: {WaitTimeBeforeCure}, {nameof(BottomExposureTime)}: {BottomExposureTime}, {nameof(BottomLayersCount)}: {BottomLayersCount}, {nameof(LiftHeight)}: {LiftHeight}, {nameof(LiftSpeed)}: {LiftSpeed}, {nameof(RetractSpeed)}: {RetractSpeed}, {nameof(VolumeMl)}: {VolumeMl}, {nameof(AntiAliasing)}: {AntiAliasing}, {nameof(ResolutionX)}: {ResolutionX}, {nameof(ResolutionY)}: {ResolutionY}, {nameof(WeightG)}: {WeightG}, {nameof(Price)}: {Price}, {nameof(PriceCurrencySymbol)}: {PriceCurrencySymbol}, {nameof(PerLayerOverride)}: {PerLayerOverride}, {nameof(PrintTime)}: {PrintTime}, {nameof(TransitionLayerCount)}: {TransitionLayerCount}, {nameof(TransitionLayerType)}: {TransitionLayerType}, {nameof(AdvancedMode)}: {AdvancedMode}, {nameof(Grey)}: {Grey}, {nameof(BlurLevel)}: {BlurLevel}, {nameof(ResinType)}: {ResinType}, {nameof(IntelligentMode)}: {IntelligentMode}";
399+
return $"{base.ToString()}, {nameof(PixelSizeUm)}: {PixelSizeUm}, {nameof(LayerHeight)}: {LayerHeight}, {nameof(ExposureTime)}: {ExposureTime}, {nameof(WaitTimeBeforeCure)}: {WaitTimeBeforeCure}, {nameof(BottomExposureTime)}: {BottomExposureTime}, {nameof(BottomLayersCount)}: {BottomLayersCount}, {nameof(LiftHeight)}: {LiftHeight}, {nameof(LiftSpeed)}: {LiftSpeed}, {nameof(RetractSpeed)}: {RetractSpeed}, {nameof(VolumeMl)}: {VolumeMl}, {nameof(AntiAliasing)}: {AntiAliasing}, {nameof(ResolutionX)}: {ResolutionX}, {nameof(ResolutionY)}: {ResolutionY}, {nameof(WeightG)}: {WeightG}, {nameof(Price)}: {Price}, {nameof(PriceCurrencySymbol)}: {PriceCurrencySymbol}, {nameof(PerLayerSettings)}: {PerLayerSettings}, {nameof(PrintTime)}: {PrintTime}, {nameof(TransitionLayerCount)}: {TransitionLayerCount}, {nameof(TransitionLayerType)}: {TransitionLayerType}, {nameof(AdvancedMode)}: {AdvancedMode}, {nameof(Grey)}: {Grey}, {nameof(BlurLevel)}: {BlurLevel}, {nameof(ResinType)}: {ResinType}, {nameof(IntelligentMode)}: {IntelligentMode}";
400400
}
401401
}
402402

@@ -1823,7 +1823,7 @@ public override void Clear()
18231823

18241824
protected override void OnBeforeEncode(bool isPartialEncode)
18251825
{
1826-
HeaderSettings.PerLayerOverride = SupportPerLayerSettings && UsingPerLayerSettings;
1826+
HeaderSettings.PerLayerSettings = SupportPerLayerSettings && UsingPerLayerSettings;
18271827
}
18281828

18291829
protected override void EncodeInternally(OperationProgress progress)

UVtools.Core/FileFormats/CTBEncryptedFile.cs

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,31 +1303,37 @@ protected override void DecodeInternally(OperationProgress progress)
13031303

13041304
protected override void OnBeforeEncode(bool isPartialEncode)
13051305
{
1306-
Settings.PerLayerSettings = AllLayersAreUsingGlobalParameters
1307-
? PERLAYER_SETTINGS_DISALLOW
1308-
: PERLAYER_SETTINGS_ALLOW;
1306+
Settings.PerLayerSettings = SupportPerLayerSettings && UsingPerLayerSettings
1307+
? PERLAYER_SETTINGS_ALLOW
1308+
: PERLAYER_SETTINGS_DISALLOW;
13091309

13101310
if (HaveTiltingVat)
13111311
{
1312-
var lift = LayerHeight;
1313-
var speed = 60;
1312+
const float lift = 0.05f;
1313+
const float speed = lift;
13141314

13151315

13161316
BottomLiftHeight = lift;
1317-
BottomLiftHeight2 = lift;
13181317
BottomLiftSpeed = speed;
1319-
BottomLiftSpeed2 = speed;
1320-
BottomRetractHeight2 = lift;
1318+
1319+
BottomLiftHeight2 = 0;
1320+
BottomLiftSpeed2 = 0;
1321+
1322+
BottomRetractHeight2 = 0;
1323+
BottomRetractSpeed2 = 0;
1324+
13211325
BottomRetractSpeed = speed;
1322-
BottomRetractSpeed2 = speed;
13231326

13241327
LiftHeight = lift;
1325-
LiftHeight2 = lift;
13261328
LiftSpeed = speed;
1327-
LiftSpeed2 = speed;
1328-
RetractHeight2 = lift;
1329+
1330+
LiftHeight2 = 0;
1331+
LiftSpeed2 = 0;
1332+
1333+
RetractHeight2 = 0;
1334+
RetractSpeed2 = 0;
1335+
13291336
RetractSpeed = speed;
1330-
RetractSpeed2 = speed;
13311337
}
13321338

13331339
Settings.ModifiedTimestampMinutes = (uint)DateTimeExtensions.TimestampMinutes;

UVtools.Core/FileFormats/ChituboxFile.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,9 +1770,9 @@ protected override void OnBeforeEncode(bool isPartialEncode)
17701770
}
17711771
}
17721772

1773-
SlicerInfoSettings.PerLayerSettings = SupportPerLayerSettings && AllLayersAreUsingGlobalParameters
1774-
? PERLAYER_SETTINGS_DISALLOW
1775-
: (byte)(Version * 0x10); // 0x10, 0x20, 0x30, 0x40, 0x50, ...
1773+
SlicerInfoSettings.PerLayerSettings = SupportPerLayerSettings && UsingPerLayerSettings
1774+
? (byte)(Version * 0x10) // 0x10, 0x20, 0x30, 0x40, 0x50, ...
1775+
: PERLAYER_SETTINGS_DISALLOW;
17761776

17771777
SlicerInfoSettings.ModifiedTimestampMinutes = (uint)DateTimeExtensions.TimestampMinutes;
17781778
}

UVtools.Core/FileFormats/FileFormat.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4472,7 +4472,7 @@ public bool SetThumbnails(string filePath)
44724472
{
44734473
if (ThumbnailsCount == 0) return false;
44744474
if (!File.Exists(filePath)) return false;
4475-
using var image = CvInvoke.Imread(filePath, ImreadModes.Color);
4475+
using var image = CvInvoke.Imread(filePath, ImreadModes.ColorBgr);
44764476
return SetThumbnails(image);
44774477
}
44784478

@@ -4507,7 +4507,7 @@ public bool SetThumbnail(int index, string filePath)
45074507
{
45084508
if (index >= ThumbnailsCount) return false;
45094509
if (!File.Exists(filePath)) return false;
4510-
return SetThumbnail(index, CvInvoke.Imread(filePath, ImreadModes.Color));
4510+
return SetThumbnail(index, CvInvoke.Imread(filePath, ImreadModes.ColorBgr));
45114511
}
45124512

45134513
/// <summary>
@@ -5005,7 +5005,7 @@ public void DecodeLayersFromZip(ZipArchiveEntry[] layerEntries, OperationProgres
50055005
case ImageFormat.Png24BgrAA:
50065006
{
50075007
using var bgrMat = new Mat();
5008-
CvInvoke.Imdecode(pngBytes, ImreadModes.Color, bgrMat);
5008+
CvInvoke.Imdecode(pngBytes, ImreadModes.ColorBgr, bgrMat);
50095009
using var greyMat = bgrMat.Reshape(1);
50105010

50115011
_layers[layerIndex] = new Layer((uint) layerIndex, greyMat, this);
@@ -5015,7 +5015,7 @@ public void DecodeLayersFromZip(ZipArchiveEntry[] layerEntries, OperationProgres
50155015
case ImageFormat.Png24RgbAA:
50165016
{
50175017
using Mat rgbMat = new();
5018-
CvInvoke.Imdecode(pngBytes, ImreadModes.Color, rgbMat);
5018+
CvInvoke.Imdecode(pngBytes, ImreadModes.ColorBgr, rgbMat);
50195019
CvInvoke.CvtColor(rgbMat, rgbMat, ColorConversion.Bgr2Rgb);
50205020
using var greyMat = rgbMat.Reshape(1);
50215021

UVtools.Core/FileFormats/GooFile.cs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,24 +1086,31 @@ protected override void OnBeforeEncode(bool isPartialEncode)
10861086

10871087
if (HaveTiltingVat)
10881088
{
1089-
const float lift = 0;
1090-
const float speed = 0;
1089+
const float lift = 0.05f;
1090+
const float speed = lift;
1091+
10911092

10921093
BottomLiftHeight = lift;
1093-
BottomLiftHeight2 = lift;
10941094
BottomLiftSpeed = speed;
1095-
BottomLiftSpeed2 = speed;
1096-
BottomRetractHeight2 = lift;
1095+
1096+
BottomLiftHeight2 = 0;
1097+
BottomLiftSpeed2 = 0;
1098+
1099+
BottomRetractHeight2 = 0;
1100+
BottomRetractSpeed2 = 0;
1101+
10971102
BottomRetractSpeed = speed;
1098-
BottomRetractSpeed2 = speed;
10991103

11001104
LiftHeight = lift;
1101-
LiftHeight2 = lift;
11021105
LiftSpeed = speed;
1103-
LiftSpeed2 = speed;
1104-
RetractHeight2 = lift;
1106+
1107+
LiftHeight2 = 0;
1108+
LiftSpeed2 = 0;
1109+
1110+
RetractHeight2 = 0;
1111+
RetractSpeed2 = 0;
1112+
11051113
RetractSpeed = speed;
1106-
RetractSpeed2 = speed;
11071114
}
11081115
}
11091116

UVtools.Core/GCode/GCodeBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ public void ParseLayersFromGCode(FileFormat slicerFile, string? gcode, bool rebu
11831183
var pngBytes = Convert.FromBase64String(base64Thumbnail.ToString());
11841184

11851185
var mat = new Mat();
1186-
CvInvoke.Imdecode(pngBytes, ImreadModes.Color, mat);
1186+
CvInvoke.Imdecode(pngBytes, ImreadModes.ColorBgr, mat);
11871187
if (mat.IsEmpty) break;
11881188
slicerFile.Thumbnails.Add(mat);
11891189

UVtools.Core/UVtools.Core.csproj

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<Version>$(UVtoolsVersion)</Version>
5-
6-
<GenerateDocumentationFile>True</GenerateDocumentationFile>
7-
<DocumentationFile>..\documentation\$(AssemblyName).xml</DocumentationFile>
8-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
9-
<IncludeSymbols>true</IncludeSymbols>
10-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
11-
12-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
13-
14-
<NoWarn>1701;1702;1591</NoWarn>
15-
</PropertyGroup>
16-
17-
<ItemGroup>
18-
<Compile Remove="Voxel\MarchingCubesTable.cs" />
19-
</ItemGroup>
20-
21-
<ItemGroup>
22-
<None Include="Voxel\MarchingCubesTable.cs" />
23-
</ItemGroup>
24-
25-
<ItemGroup>
26-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
27-
<PackageReference Include="BinarySerializer" Version="8.6.4.1" />
28-
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.4.0" />
29-
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
30-
<PackageReference Include="Emgu.CV" Version="4.10.0.5680" />
31-
<PackageReference Include="Emgu.CV.runtime.mini.macos" Version="4.10.0.5683" />
32-
<PackageReference Include="Emgu.CV.runtime.mini.ubuntu-x64" Version="4.10.0.5680" />
33-
<PackageReference Include="Emgu.CV.runtime.mini.windows" Version="4.10.0.5680" />
34-
<PackageReference Include="K4os.Compression.LZ4" Version="1.3.8" />
35-
<PackageReference Include="KdTree" Version="1.4.1" />
36-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.14.0" />
37-
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
38-
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
39-
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
40-
<PackageReference Include="System.Memory" Version="4.6.3" />
41-
<PackageReference Include="System.Net.Http" Version="4.3.4" />
42-
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
43-
<PackageReference Include="System.Text.Json" Version="9.0.7" />
44-
<PackageReference Include="ZLinq" Version="1.5.2" />
45-
</ItemGroup>
46-
47-
<Target Name="PreparePackageReleaseNotesFromFile" BeforeTargets="GenerateNuspec" Condition="Exists('..\RELEASE_NOTES.md')">
48-
<ReadLinesFromFile File="..\RELEASE_NOTES.md">
49-
<Output TaskParameter="Lines" ItemName="ReleaseNoteLines" />
50-
</ReadLinesFromFile>
51-
<PropertyGroup>
52-
<PackageReleaseNotes>@(ReleaseNoteLines, '%0a')</PackageReleaseNotes>
53-
</PropertyGroup>
54-
</Target>
55-
56-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Version>$(UVtoolsVersion)</Version>
5+
6+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
7+
<DocumentationFile>..\documentation\$(AssemblyName).xml</DocumentationFile>
8+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
9+
<IncludeSymbols>true</IncludeSymbols>
10+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
11+
12+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
13+
14+
<NoWarn>1701;1702;1591</NoWarn>
15+
</PropertyGroup>
16+
17+
<ItemGroup>
18+
<Compile Remove="Voxel\MarchingCubesTable.cs" />
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<None Include="Voxel\MarchingCubesTable.cs" />
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
27+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.14.0" />
28+
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
29+
<PackageReference Include="System.Net.Http" Version="4.3.4" />
30+
<PackageReference Include="System.Memory" Version="4.6.3" />
31+
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
32+
<PackageReference Include="System.Text.Json" Version="9.0.8" />
33+
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.4.0" />
34+
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
35+
<PackageReference Include="K4os.Compression.LZ4" Version="1.3.8" />
36+
<PackageReference Include="BinarySerializer" Version="8.6.4.1" />
37+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
38+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
39+
<PackageReference Include="Emgu.CV" Version="4.11.0.5746" />
40+
<PackageReference Include="Emgu.CV.runtime.mini.macos" Version="4.11.0.5746" />
41+
<PackageReference Include="Emgu.CV.runtime.mini.ubuntu-x64" Version="4.11.0.5746" />
42+
<PackageReference Include="Emgu.CV.runtime.mini.windows" Version="4.11.0.5746" />
43+
<PackageReference Include="KdTree" Version="1.4.1" />
44+
<PackageReference Include="ZLinq" Version="1.5.2" />
45+
</ItemGroup>
46+
47+
<Target Name="PreparePackageReleaseNotesFromFile" BeforeTargets="GenerateNuspec" Condition="Exists('..\RELEASE_NOTES.md')">
48+
<ReadLinesFromFile File="..\RELEASE_NOTES.md">
49+
<Output TaskParameter="Lines" ItemName="ReleaseNoteLines" />
50+
</ReadLinesFromFile>
51+
<PropertyGroup>
52+
<PackageReleaseNotes>@(ReleaseNoteLines, '%0a')</PackageReleaseNotes>
53+
</PropertyGroup>
54+
</Target>
55+
56+
</Project>

0 commit comments

Comments
 (0)