- (Improvement) Remove developer machine path in PDB / error messages
- (Fix) HoneyComb infill not going to the right most edge of the image (#649)
- (Fix) AnyCubic machine names were not showing in most files
- (Fix) PWMX: Unable to set version 1
- (Fix) LGS: Converted files to lgs cause program to crash with `Value was either too large or too small for a Decimal` (#653)
This commit is contained in:
Tiago Conceição
2023-01-31 01:41:30 +00:00
parent e953d6262d
commit 86cd97b526
14 changed files with 101 additions and 87 deletions
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## 30/01/2023 - v3.11.1
- (Improvement) Remove developer machine path in PDB / error messages
- (Fix) HoneyComb infill not going to the right most edge of the image (#649)
- (Fix) AnyCubic machine names were not showing in most files
- (Fix) PWMX: Unable to set version 1
- (Fix) LGS: Converted files to lgs cause program to crash with `Value was either too large or too small for a Decimal` (#653)
## 15/01/2023 - v3.11.0
- **UI:**
+5
View File
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<PathMap>$(MSBuildProjectDirectory)=$(MSBuildProjectName)</PathMap>
</PropertyGroup>
</Project>
+5 -21
View File
@@ -1,22 +1,6 @@
- **UI:**
- (Improvement) Layer navigation load time by parallel `Mat` to `Bitmap` conversion
- (Improvement) Allow to show exceptions without the stack trace and detailed trigger action by using the `MessageExceiption` (#644)
- (Improvement) Allow progress to have and display a detailed log (#644)
- (Improvement) Convert format to another with multiple versions will now only show the possible versions for the extension
- **Suggestion - Wait time before cure:**
- (Improvement) Set the first wait time based on first valid layer mass rather than use the fixed limit
- (Improvement) Set zero time to empty and dummy layers
- (Improvement) When creating the dummy layer also increment the bottom layer count as the created layer count as one
- **PCB Exposure:**
- (Add) Excellon Drill Format (drl) to cut off holes (Implementation may lack some advanced features, please confirm the result) (#646)
- (Fix) Arc (G03) with negative offsets (I-/J-) was not drawing the shape correctly
- (Fix) Implement the rotation for the outline primitive (#645)
- **File formats:**
- (Improvement) Formats now sanitize the selected version before encode given the file extension, if version is out of range it will force the last known version
- (Fix) CBDDLP: Remove a table from the file that might cause layer corruption
- (Add) Operations - `AfterCompleteReport` property: Gets or sets an report to show to the user after complete the operation with success
- (Improvement) Suggestion - Wait time after cure: Set zero time to empty and dummy layers
- (Improvement) Slight improvement on the contour intersection check, yields better performance on resin and suction cup detection
- (Improvement) Allow to trigger message boxes from operations and scripts (#644)
- (Upgrade) .NET from 6.0.12 to 6.0.13
- (Improvement) Remove developer machine path in PDB / error messages
- (Fix) HoneyComb infill not going to the right most edge of the image (#649)
- (Fix) AnyCubic machine names were not showing in most files
- (Fix) PWMX: Unable to set version 1
- (Fix) LGS: Converted files to lgs cause program to crash with `Value was either too large or too small for a Decimal` (#653)
+22 -12
View File
@@ -1566,6 +1566,11 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
RaisePropertyChanged(nameof(DisplayAspectRatioStr));
RaisePropertyChanged(nameof(IsDisplayPortrait));
RaisePropertyChanged(nameof(IsDisplayLandscape));
RaisePropertyChanged(nameof(Xppmm));
RaisePropertyChanged(nameof(PixelWidth));
RaisePropertyChanged(nameof(PixelWidthMicrons));
NotifyAspectChange();
}
}
@@ -1586,6 +1591,11 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
RaisePropertyChanged(nameof(DisplayAspectRatioStr));
RaisePropertyChanged(nameof(IsDisplayPortrait));
RaisePropertyChanged(nameof(IsDisplayLandscape));
RaisePropertyChanged(nameof(Yppmm));
RaisePropertyChanged(nameof(PixelHeight));
RaisePropertyChanged(nameof(PixelHeightMicrons));
NotifyAspectChange();
}
}
@@ -1626,6 +1636,9 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
RaisePropertyChanged(nameof(Display));
RaisePropertyChanged(nameof(DisplayDiagonal));
RaisePropertyChanged(nameof(DisplayDiagonalInches));
RaisePropertyChanged(nameof(Xppmm));
RaisePropertyChanged(nameof(PixelWidth));
RaisePropertyChanged(nameof(PixelWidthMicrons));
NotifyAspectChange();
}
}
@@ -1642,6 +1655,9 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
RaisePropertyChanged(nameof(Display));
RaisePropertyChanged(nameof(DisplayDiagonal));
RaisePropertyChanged(nameof(DisplayDiagonalInches));
RaisePropertyChanged(nameof(Yppmm));
RaisePropertyChanged(nameof(PixelHeight));
RaisePropertyChanged(nameof(PixelHeightMicrons));
NotifyAspectChange();
}
}
@@ -1704,12 +1720,12 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
/// <summary>
/// Gets or sets the pixels per mm on X direction
/// </summary>
public virtual float Xppmm => DisplayWidth > 0 ? ResolutionX / DisplayWidth : 0;
public virtual float Xppmm => ResolutionX > 0 && DisplayWidth > 0 ? ResolutionX / DisplayWidth : 0;
/// <summary>
/// Gets or sets the pixels per mm on Y direction
/// </summary>
public virtual float Yppmm => DisplayHeight > 0 ? ResolutionY / DisplayHeight : 0;
public virtual float Yppmm => ResolutionY > 0 && DisplayHeight > 0 ? ResolutionY / DisplayHeight : 0;
/// <summary>
/// Gets or sets the pixels per mm
@@ -1749,12 +1765,12 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
/// <summary>
/// Gets the pixel width in microns
/// </summary>
public float PixelWidthMicrons => DisplayWidth > 0 ? (float)Math.Round(DisplayWidth / ResolutionX * 1000, 3) : 0;
public float PixelWidthMicrons => DisplayWidth > 0 && ResolutionX > 0 ? (float)Math.Round(DisplayWidth / ResolutionX * 1000, 3) : 0;
/// <summary>
/// Gets the pixel height in microns
/// </summary>
public float PixelHeightMicrons => DisplayHeight > 0 ? (float)Math.Round(DisplayHeight / ResolutionY * 1000, 3) : 0;
public float PixelHeightMicrons => DisplayHeight > 0 && ResolutionY > 0 ? (float)Math.Round(DisplayHeight / ResolutionY * 1000, 3) : 0;
/// <summary>
/// Gets the pixel size in microns
@@ -3241,20 +3257,14 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
/// </summary>
protected void NotifyAspectChange()
{
RaisePropertyChanged(nameof(Xppmm));
RaisePropertyChanged(nameof(Yppmm));
RaisePropertyChanged(nameof(Ppmm));
RaisePropertyChanged(nameof(PpmmMax));
RaisePropertyChanged(nameof(PixelSizeMicrons));
RaisePropertyChanged(nameof(PixelArea));
RaisePropertyChanged(nameof(PixelAreaMicrons));
RaisePropertyChanged(nameof(PixelSizeMicronsMax));
RaisePropertyChanged(nameof(PixelHeight));
RaisePropertyChanged(nameof(PixelHeightMicrons));
RaisePropertyChanged(nameof(PixelSize));
RaisePropertyChanged(nameof(PixelSizeMax));
RaisePropertyChanged(nameof(PixelWidth));
RaisePropertyChanged(nameof(PixelWidthMicrons));
}
#endregion
@@ -6443,10 +6453,10 @@ public abstract class FileFormat : BindableBase, IDisposable, IEquatable<FileFor
public Mat GenerateHeatmap(Rectangle roi, OperationProgress? progress = null) => GenerateHeatmap(0, uint.MaxValue, roi, progress);
public Task<Mat> GenerateHeatmapAsync(uint layerIndexStart = 0, uint layerIndexEnd = uint.MaxValue, Rectangle roi = default, OperationProgress? progress = null)
=> Task.Run(() => GenerateHeatmap(layerIndexStart, layerIndexEnd, roi, progress));
=> Task.Run(() => GenerateHeatmap(layerIndexStart, layerIndexEnd, roi, progress), progress?.Token ?? default);
public Task<Mat> GenerateHeatmapAsync(Rectangle roi, OperationProgress? progress = null)
=> Task.Run(() => GenerateHeatmap(0, uint.MaxValue, roi, progress));
=> Task.Run(() => GenerateHeatmap(0, uint.MaxValue, roi, progress), progress?.Token ?? default);
#endregion
}
+15 -23
View File
@@ -11,7 +11,6 @@ using Emgu.CV;
using Emgu.CV.CvEnum;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
@@ -298,6 +297,7 @@ public sealed class LGSFile : FileFormat
{
HeaderSettings.ResolutionX = value;
base.ResolutionX = value;
HeaderSettings.PixelPerMmX = Xppmm;
}
}
@@ -308,19 +308,28 @@ public sealed class LGSFile : FileFormat
{
HeaderSettings.ResolutionY = value;
base.ResolutionY = value;
HeaderSettings.PixelPerMmY = Yppmm;
}
}
public override float DisplayWidth
{
get => ResolutionX / HeaderSettings.PixelPerMmX;
set { }
get => (float) Math.Round(ResolutionX / HeaderSettings.PixelPerMmX, 3);
set
{
base.DisplayWidth = value;
HeaderSettings.PixelPerMmX = Xppmm;
}
}
public override float DisplayHeight
{
get => ResolutionY / HeaderSettings.PixelPerMmY;
set { }
get => (float)Math.Round(ResolutionY / HeaderSettings.PixelPerMmY, 3);
set
{
base.DisplayHeight = value;
HeaderSettings.PixelPerMmY = Yppmm;
}
}
public override float MachineZ
@@ -439,23 +448,6 @@ public sealed class LGSFile : FileFormat
#endregion
#region Methods
protected override void OnPropertyChanged(PropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
switch (e.PropertyName)
{
case nameof(Xppmm):
HeaderSettings.PixelPerMmX = Xppmm;
RaisePropertyChanged(nameof(DisplayWidth));
break;
case nameof(Yppmm):
HeaderSettings.PixelPerMmY = Yppmm;
RaisePropertyChanged(nameof(DisplayHeight));
break;
}
}
protected override void EncodeInternally(OperationProgress progress)
{
if (FileEndsWith(".lgs")) // Longer Orange 10
@@ -542,7 +534,7 @@ public sealed class LGSFile : FileFormat
{
throw new FileLoadException("Not a valid LGS file!", FileFullPath);
}
//if (HeaderSettings.PrinterModel is 10 or 30 or 120)
//{
// Fix inconsistencies found of different version of plugin and slicers
@@ -1125,13 +1125,13 @@ public sealed class PhotonWorkshopFile : FileFormat
case "pw0":
case "pwx":
return new uint[] {VERSION_1};
case "pwmx":
case "pwmo":
case "pwms":
case "pmsq":
case "dlp":
return new uint[] { VERSION_1, VERSION_515 };
case "pwma":
case "pwmx":
case "pm3":
case "pm3m":
return new uint[] { VERSION_515, VERSION_516 };
@@ -1523,7 +1523,7 @@ public sealed class PhotonWorkshopFile : FileFormat
{
get
{
if (string.IsNullOrWhiteSpace(MachineSettings.MachineName)) return MachineSettings.MachineName;
if (!string.IsNullOrWhiteSpace(MachineSettings.MachineName)) return MachineSettings.MachineName;
return PrinterModel switch
{
AnyCubicMachine.PhotonS => "Photon S",
+21 -15
View File
@@ -161,6 +161,8 @@ public sealed class OperationInfill : Operation
if (_infillType == InfillAlgorithm.Honeycomb)
{
mask = GetHoneycombMask(GetRoiSizeOrVolumeSize());
CvInvoke.Imshow("Honeycomb", mask);
CvInvoke.WaitKey();
}
else if (_infillType == InfillAlgorithm.Concentric)
{
@@ -484,20 +486,24 @@ public sealed class OperationInfill : Operation
{
var patternMask = EmguExtensions.InitMat(targetSize);
var halfInfillSpacing = _infillSpacing / 2;
var halfInfillSpacingD = _infillSpacing / 2.0;
var halfInfillSpacing = (int)Math.Round(halfInfillSpacingD);
var halfThickenss = _infillThickness / 2;
int width = (int)Math.Round(4 * (_infillSpacing / 2.0 / Math.Sqrt(3)));
int width = (int)Math.Round(4 * (halfInfillSpacing / Math.Sqrt(3)));
var infillColor = new MCvScalar(_infillBrightness);
for (int col = 0; col <= targetSize.Width / _infillSpacing; col++)
int cols = (int)Math.Ceiling((float)targetSize.Width / _infillSpacing) + 2;
int rows = (int)Math.Ceiling((float)targetSize.Height / _infillSpacing);
for (int col = 0; col <= cols; col++)
{
for (int row = 0; row <= targetSize.Height / _infillSpacing; row++)
for (int row = 0; row <= rows; row++)
{
// Move over for the column number.
int x = (int)Math.Round(col * (width * 0.75f));
int x = (int)Math.Round(halfThickenss + col * (width * 0.75f));
// Move down the required number of rows.
int y = row * _infillSpacing;
int y = halfThickenss + halfInfillSpacing + row * _infillSpacing;
// If the column is odd, move down half a hex more.
if (col % 2 == 1) y += halfInfillSpacing;
@@ -505,11 +511,11 @@ public sealed class OperationInfill : Operation
var points = new Point[]
{
new(x, y),
new((int) Math.Round(x + width * 0.25f), y - _infillSpacing / 2),
new((int) Math.Round(x + width * 0.75f), y - _infillSpacing / 2),
new((int) Math.Round(x + width * 0.25f), y - halfInfillSpacing),
new((int) Math.Round(x + width * 0.75f), y - halfInfillSpacing),
new(x + width, y),
new((int) Math.Round(x + width * 0.75f), y + _infillSpacing / 2),
new((int) Math.Round(x + width * 0.25f), y + _infillSpacing / 2),
new((int) Math.Round(x + width * 0.75f), y + halfInfillSpacing),
new((int) Math.Round(x + width * 0.25f), y + halfInfillSpacing),
};
CvInvoke.Polylines(patternMask, points, true, infillColor, _infillThickness);
@@ -525,7 +531,7 @@ public sealed class OperationInfill : Operation
//var halfInfillSpacing = _infillSpacing / 2;
//var halfThickenss = _infillThickness / 2;
int multiplicator = 1;
int multiplier = 1;
byte position = 0;
int x = patternMask.Width / 2;
@@ -550,18 +556,18 @@ public sealed class OperationInfill : Operation
while (hitLimits.Any(hitLimit => !hitLimit))
{
x += directions[position].X * multiplicator;
y += directions[position].Y * multiplicator;
x += directions[position].X * multiplier;
y += directions[position].Y * multiplier;
if (x < 0 || y < 0 || x >= patternMask.Width || y >= patternMask.Height) hitLimits[position] = true;
points.Add(new Point(x, y));
position++;
if (position == 2)
{
multiplicator++;
multiplier++;
}
else if (position == 4)
{
multiplicator++;
multiplier++;
position = 0;
}
}
+6 -2
View File
@@ -10,7 +10,7 @@
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl>
<Description>MSLA/DLP, file analysis, calibration, repair, conversion and manipulation</Description>
<Version>3.11.0</Version>
<Version>3.11.1</Version>
<Copyright>Copyright © 2020 PTRTECH</Copyright>
<PackageIcon>UVtools.png</PackageIcon>
<Platforms>AnyCPU;x64</Platforms>
@@ -27,24 +27,28 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>..\documentation\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>..\documentation\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>..\documentation\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>..\documentation\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
@@ -74,7 +78,7 @@
<ItemGroup>
<PackageReference Include="AnimatedGif" Version="1.0.5" />
<PackageReference Include="BinarySerializer" Version="8.6.3.2" />
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.1.0" />
<PackageReference Include="Emgu.CV" Version="4.6.0.5131" />
<PackageReference Include="Emgu.CV.runtime.ubuntu-x64" Version="4.6.0.5131" />
<PackageReference Include="Emgu.CV.runtime.windows" Version="4.6.0.5131" />
+3 -3
View File
@@ -295,7 +295,7 @@ public partial class MainWindow
}
return true;
});
}, Progress.Token);
IsGUIEnabled = true;
@@ -469,7 +469,7 @@ public partial class MainWindow
}
return null;
});
}, Progress.Token);
IsGUIEnabled = true;
@@ -674,7 +674,7 @@ public partial class MainWindow
}
return null;
});
}, Progress.Token);
IsGUIEnabled = true;
+1 -1
View File
@@ -855,7 +855,7 @@ public partial class MainWindow
InvalidateLayerNavigation();
}
if (_actualLayer >= SlicerFile.LayerCount) // No valid layer
if (_actualLayer >= SlicerFile.LayerCount) // No valid layer but should never happen
{
CurrentLayerProperties.Clear();
LayerImageBox.Image = null;
+1 -1
View File
@@ -576,7 +576,7 @@ public partial class MainWindow
}
return Task.FromResult(false);
});
}, Progress.Token);
IsGUIEnabled = true;
+6 -6
View File
@@ -658,7 +658,7 @@ public partial class MainWindow : WindowEx
}
return false;
});
}, Progress.Token);
if (!ejectResult)
{
@@ -1356,7 +1356,7 @@ public partial class MainWindow : WindowEx
}
return false;
});
}, Progress.Token);
IsGUIEnabled = true;
@@ -1485,7 +1485,7 @@ public partial class MainWindow : WindowEx
}
return false;
});
}, Progress.Token);
IsGUIEnabled = true;
@@ -1861,7 +1861,7 @@ public partial class MainWindow : WindowEx
}
return false;
});
}, Progress.Token);
IsGUIEnabled = true;
@@ -1950,7 +1950,7 @@ public partial class MainWindow : WindowEx
}
return false;
});
}, Progress.Token);
IsGUIEnabled = true;
@@ -2193,7 +2193,7 @@ public partial class MainWindow : WindowEx
}
return false;
});
}, Progress.Token);
IsGUIEnabled = true;
+5 -1
View File
@@ -12,7 +12,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<Version>3.11.0</Version>
<Version>3.11.1</Version>
<Platforms>AnyCPU;x64</Platforms>
<PackageIcon>UVtools.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
@@ -24,19 +24,23 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;</NoWarn>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.18" />
+1
View File
@@ -39,6 +39,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{E91CEB7A-5
ProjectSection(SolutionItems) = preProject
CHANGELOG.md = CHANGELOG.md
CREDITS.md = CREDITS.md
Directory.Build.props = Directory.Build.props
LICENSE = LICENSE
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md