Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Conceição <Tiago_caza@hotmail.com>2020-11-16 05:10:55 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2020-11-16 05:10:55 +0300
commit1d17f6ceb6ca3299b95746548ab681fd9f00ee75 (patch)
treefcc734000e19705654dc53f5009f1f977ead1ba3
parenta2e2f5c7f3afa9263d9ad1a9cbc0673d5d86cfe4 (diff)
v1.3.1v1.3.1
* (Add) File format: PWX (AnyCubic Photon X) (#93) * (Add) File format: PWMO (AnyCubic Photon Mono) (#93) * (Add) File format: PWMS (AnyCubic Photon Mono SE) (#93) * (Add) PrusaSlicer printer: AnyCubic Photon X * (Add) PrusaSlicer printer: AnyCubic Photon Mono * (Add) PrusaSlicer printer: AnyCubic Photon Mono SE * (Add) PrusaSlicer printer: AnyCubic Photon Mono X * (Change) "Save as" file filter dialog with better file extension description * (Fix) Tool - Infill: Allow save profiles * (Fix) Material cost was showing as ml instead of currency
-rw-r--r--CHANGELOG.md12
-rw-r--r--ImportPrusaSlicerData.bat70
-rw-r--r--PrusaSlicer/printer/AnyCubic Photon Mono SE.ini37
-rw-r--r--PrusaSlicer/printer/AnyCubic Photon Mono X.ini37
-rw-r--r--PrusaSlicer/printer/AnyCubic Photon Mono.ini37
-rw-r--r--PrusaSlicer/printer/AnyCubic Photon X.ini37
-rw-r--r--README.md5
-rw-r--r--UVtools.Core/FileFormats/ChituboxFile.cs6
-rw-r--r--UVtools.Core/FileFormats/ChituboxZipFile.cs6
-rw-r--r--UVtools.Core/FileFormats/FileExtension.cs21
-rw-r--r--UVtools.Core/FileFormats/FileFormat.cs9
-rw-r--r--UVtools.Core/FileFormats/PHZFile.cs6
-rw-r--r--UVtools.Core/FileFormats/PhotonWorkshopFile.cs (renamed from UVtools.Core/FileFormats/PWSFile.cs)220
-rw-r--r--UVtools.Core/FileFormats/SL1File.cs8
-rw-r--r--UVtools.Core/FileFormats/UVJFile.cs6
-rw-r--r--UVtools.Core/UVtools.Core.csproj2
-rw-r--r--UVtools.GUI/UVtools.GUI.csproj4
-rw-r--r--UVtools.GUI/packages.config4
-rw-r--r--UVtools.InstallerMM/UVtools.InstallerMM.wxs12
-rw-r--r--UVtools.WPF/MainWindow.axaml.cs24
-rw-r--r--UVtools.WPF/UVtools.WPF.csproj2
21 files changed, 380 insertions, 185 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d106033..0b841c0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,15 @@
# Changelog
-## /11/2020 - v1.3.1
-
+## 16/11/2020 - v1.3.1
+
+* (Add) File format: PWX (AnyCubic Photon X) (#93)
+* (Add) File format: PWMO (AnyCubic Photon Mono) (#93)
+* (Add) File format: PWMS (AnyCubic Photon Mono SE) (#93)
+* (Add) PrusaSlicer printer: AnyCubic Photon X
+* (Add) PrusaSlicer printer: AnyCubic Photon Mono
+* (Add) PrusaSlicer printer: AnyCubic Photon Mono SE
+* (Add) PrusaSlicer printer: AnyCubic Photon Mono X
+* (Change) "Save as" file filter dialog with better file extension description
* (Fix) Tool - Infill: Allow save profiles
* (Fix) Material cost was showing as ml instead of currency
diff --git a/ImportPrusaSlicerData.bat b/ImportPrusaSlicerData.bat
index 0197b13..7b97991 100644
--- a/ImportPrusaSlicerData.bat
+++ b/ImportPrusaSlicerData.bat
@@ -20,39 +20,43 @@ SET files[10]=Nova3D Bene4 Mono.ini
SET files[11]=AnyCubic Photon.ini
SET files[12]=AnyCubic Photon S.ini
SET files[13]=AnyCubic Photon Zero.ini
-SET files[14]=Elegoo Mars.ini
-SET files[15]=Elegoo Mars 2 Pro.ini
-SET files[16]=Elegoo Mars C.ini
-SET files[17]=Elegoo Saturn.ini
-SET files[18]=Peopoly Phenom.ini
-SET files[19]=Peopoly Phenom L.ini
-SET files[20]=Peopoly Phenom Noir.ini
-SET files[21]=QIDI Shadow5.5.ini
-SET files[22]=QIDI Shadow6.0 Pro.ini
-SET files[23]=QIDI S-Box.ini
-SET files[24]=Phrozen Shuffle.ini
-SET files[25]=Phrozen Shuffle Lite.ini
-SET files[26]=Phrozen Shuffle XL.ini
-SET files[27]=Phrozen Shuffle XL Lite.ini
-SET files[28]=Phrozen Shuffle 16.ini
-SET files[29]=Phrozen Shuffle 4K.ini
-SET files[30]=Phrozen Sonic.ini
-SET files[31]=Phrozen Sonic 4K.ini
-SET files[32]=Phrozen Sonic Mighty 4K.ini
-SET files[33]=Phrozen Sonic Mini.ini
-SET files[34]=Phrozen Sonic Mini 4K.ini
-SET files[35]=Phrozen Transform.ini
-SET files[36]=Kelant S400.ini
-SET files[37]=Wanhao D7.ini
-SET files[38]=Wanhao D8.ini
-SET files[39]=Creality LD-002R.ini
-SET files[40]=Creality LD-002H.ini
-SET files[41]=Creality LD-006.ini
-SET files[42]=Voxelab Polaris.ini
-SET files[43]=Voxelab Proxima.ini
-SET files[44]=Longer Orange 10.ini
-SET files[45]=Longer Orange 30.ini
-SET files[46]=Longer Orange4K.ini
+SET files[14]=AnyCubic Photon X.ini
+SET files[15]=AnyCubic Photon Mono.ini
+SET files[16]=AnyCubic Photon Mono SE.ini
+SET files[17]=AnyCubic Photon Mono X.ini
+SET files[18]=Elegoo Mars.ini
+SET files[19]=Elegoo Mars 2 Pro.ini
+SET files[20]=Elegoo Mars C.ini
+SET files[21]=Elegoo Saturn.ini
+SET files[22]=Peopoly Phenom.ini
+SET files[23]=Peopoly Phenom L.ini
+SET files[24]=Peopoly Phenom Noir.ini
+SET files[25]=QIDI Shadow5.5.ini
+SET files[26]=QIDI Shadow6.0 Pro.ini
+SET files[27]=QIDI S-Box.ini
+SET files[28]=Phrozen Shuffle.ini
+SET files[29]=Phrozen Shuffle Lite.ini
+SET files[30]=Phrozen Shuffle XL.ini
+SET files[31]=Phrozen Shuffle XL Lite.ini
+SET files[32]=Phrozen Shuffle 16.ini
+SET files[33]=Phrozen Shuffle 4K.ini
+SET files[34]=Phrozen Sonic.ini
+SET files[35]=Phrozen Sonic 4K.ini
+SET files[36]=Phrozen Sonic Mighty 4K.ini
+SET files[37]=Phrozen Sonic Mini.ini
+SET files[38]=Phrozen Sonic Mini 4K.ini
+SET files[39]=Phrozen Transform.ini
+SET files[40]=Kelant S400.ini
+SET files[41]=Wanhao D7.ini
+SET files[42]=Wanhao D8.ini
+SET files[43]=Creality LD-002R.ini
+SET files[44]=Creality LD-002H.ini
+SET files[45]=Creality LD-006.ini
+SET files[46]=Voxelab Polaris.ini
+SET files[47]=Voxelab Proxima.ini
+SET files[48]=Longer Orange 10.ini
+SET files[49]=Longer Orange 30.ini
+SET files[50]=Longer Orange4K.ini
echo PrusaSlicer Printers Instalation
echo This will replace printers, all changes will be discarded
diff --git a/PrusaSlicer/printer/AnyCubic Photon Mono SE.ini b/PrusaSlicer/printer/AnyCubic Photon Mono SE.ini
new file mode 100644
index 0000000..801bf75
--- /dev/null
+++ b/PrusaSlicer/printer/AnyCubic Photon Mono SE.ini
@@ -0,0 +1,37 @@
+# generated by PrusaSlicer 2.2.0+win64 on 2020-11-15 at 17:22:57 UTC
+absolute_correction = 0
+area_fill = 50
+bed_custom_model =
+bed_custom_texture =
+bed_shape = 0x0,82.62x0,82.62x130.56,0x130.56
+default_sla_material_profile = Prusa Orange Tough 0.05
+default_sla_print_profile = 0.05 Normal
+display_height = 130.56
+display_mirror_x = 1
+display_mirror_y = 0
+display_orientation = landscape
+display_pixels_x = 1620
+display_pixels_y = 2560
+display_width = 82.62
+elefant_foot_compensation = 0.2
+elefant_foot_min_width = 0.2
+fast_tilt_time = 5
+gamma_correction = 1
+inherits = Original Prusa SL1
+max_exposure_time = 120
+max_initial_exposure_time = 300
+max_print_height = 160
+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_ANYCUBIC\nPRINTER_MODEL_PHOTON_MONO_SE\n\nSTART_CUSTOM_VALUES\nLayerOffTime_0.5\nBottomLightOffDelay_2\nBottomLiftHeight_6\nLiftHeight_6\nBottomLiftSpeed_150\nLiftSpeed_150\nRetractSpeed_150\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES
+printer_settings_id =
+printer_technology = SLA
+printer_variant = default
+printer_vendor =
+printhost_apikey =
+printhost_cafile =
+relative_correction = 1,1
+slow_tilt_time = 8
+thumbnails = 400x400,800x480
diff --git a/PrusaSlicer/printer/AnyCubic Photon Mono X.ini b/PrusaSlicer/printer/AnyCubic Photon Mono X.ini
new file mode 100644
index 0000000..24333d0
--- /dev/null
+++ b/PrusaSlicer/printer/AnyCubic Photon Mono X.ini
@@ -0,0 +1,37 @@
+# generated by PrusaSlicer 2.2.0+win64 on 2020-11-15 at 17:27:21 UTC
+absolute_correction = 0
+area_fill = 50
+bed_custom_model =
+bed_custom_texture =
+bed_shape = 0x0,192x0,192x120,0x120
+default_sla_material_profile = Prusa Orange Tough 0.05
+default_sla_print_profile = 0.05 Normal
+display_height = 120
+display_mirror_x = 1
+display_mirror_y = 0
+display_orientation = landscape
+display_pixels_x = 3840
+display_pixels_y = 2400
+display_width = 192
+elefant_foot_compensation = 0.2
+elefant_foot_min_width = 0.2
+fast_tilt_time = 5
+gamma_correction = 1
+inherits = Original Prusa SL1
+max_exposure_time = 120
+max_initial_exposure_time = 300
+max_print_height = 245
+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_ANYCUBIC\nPRINTER_MODEL_PHOTON_MONO_X\n\nSTART_CUSTOM_VALUES\nLayerOffTime_0.5\nBottomLightOffDelay_2\nBottomLiftHeight_8\nLiftHeight_8\nBottomLiftSpeed_120\nLiftSpeed_120\nRetractSpeed_120\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES
+printer_settings_id =
+printer_technology = SLA
+printer_variant = default
+printer_vendor =
+printhost_apikey =
+printhost_cafile =
+relative_correction = 1,1
+slow_tilt_time = 8
+thumbnails = 400x400,800x480
diff --git a/PrusaSlicer/printer/AnyCubic Photon Mono.ini b/PrusaSlicer/printer/AnyCubic Photon Mono.ini
new file mode 100644
index 0000000..9d7c45d
--- /dev/null
+++ b/PrusaSlicer/printer/AnyCubic Photon Mono.ini
@@ -0,0 +1,37 @@
+# generated by PrusaSlicer 2.2.0+win64 on 2020-11-15 at 17:22:43 UTC
+absolute_correction = 0
+area_fill = 50
+bed_custom_model =
+bed_custom_texture =
+bed_shape = 0x0,82.62x0,82.62x130.56,0x130.56
+default_sla_material_profile = Prusa Orange Tough 0.05
+default_sla_print_profile = 0.05 Normal
+display_height = 130.56
+display_mirror_x = 1
+display_mirror_y = 0
+display_orientation = landscape
+display_pixels_x = 1620
+display_pixels_y = 2560
+display_width = 82.62
+elefant_foot_compensation = 0.2
+elefant_foot_min_width = 0.2
+fast_tilt_time = 5
+gamma_correction = 1
+inherits = Original Prusa SL1
+max_exposure_time = 120
+max_initial_exposure_time = 300
+max_print_height = 165
+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_ANYCUBIC\nPRINTER_MODEL_PHOTON_MONO\n\nSTART_CUSTOM_VALUES\nLayerOffTime_0.5\nBottomLightOffDelay_2\nBottomLiftHeight_6\nLiftHeight_6\nBottomLiftSpeed_150\nLiftSpeed_150\nRetractSpeed_150\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES
+printer_settings_id =
+printer_technology = SLA
+printer_variant = default
+printer_vendor =
+printhost_apikey =
+printhost_cafile =
+relative_correction = 1,1
+slow_tilt_time = 8
+thumbnails = 400x400,800x480
diff --git a/PrusaSlicer/printer/AnyCubic Photon X.ini b/PrusaSlicer/printer/AnyCubic Photon X.ini
new file mode 100644
index 0000000..6ac2568
--- /dev/null
+++ b/PrusaSlicer/printer/AnyCubic Photon X.ini
@@ -0,0 +1,37 @@
+# generated by PrusaSlicer 2.2.0+win64 on 2020-11-15 at 17:25:52 UTC
+absolute_correction = 0
+area_fill = 50
+bed_custom_model =
+bed_custom_texture =
+bed_shape = 0x0,192x0,192x120,0x120
+default_sla_material_profile = Prusa Orange Tough 0.05
+default_sla_print_profile = 0.05 Normal
+display_height = 120
+display_mirror_x = 1
+display_mirror_y = 0
+display_orientation = landscape
+display_pixels_x = 2560
+display_pixels_y = 1600
+display_width = 192
+elefant_foot_compensation = 0.2
+elefant_foot_min_width = 0.2
+fast_tilt_time = 5
+gamma_correction = 1
+inherits = Original Prusa SL1
+max_exposure_time = 120
+max_initial_exposure_time = 300
+max_print_height = 245
+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_ANYCUBIC\nPRINTER_MODEL_PHOTON_X\n\nSTART_CUSTOM_VALUES\nLayerOffTime_0.5\nBottomLightOffDelay_2\nBottomLiftHeight_8\nLiftHeight_8\nBottomLiftSpeed_150\nLiftSpeed_150\nRetractSpeed_150\nBottomLightPWM_255\nLightPWM_255\nAntiAliasing_4 ; Use 0 or 1 for disable AntiAliasing with "printer gamma correction" set to 0, otherwise use multiples of 2 and "gamma correction" set to 1 for enable\nEND_CUSTOM_VALUES
+printer_settings_id =
+printer_technology = SLA
+printer_variant = default
+printer_vendor =
+printhost_apikey =
+printhost_cafile =
+relative_correction = 1,1
+slow_tilt_time = 8
+thumbnails = 400x400,800x480
diff --git a/README.md b/README.md
index 5a15398..3f05923 100644
--- a/README.md
+++ b/README.md
@@ -60,7 +60,10 @@ But also, i need victims for test subject. Proceed at your own risk!
* PHZ (Chitubox)
* PWS (Photon Workshop)
* PW0 (Photon Workshop)
-* PWMX (Photon Workshop) [Not finished]
+* PWX (Photon Workshop) [Not confirmed]
+* PWMO (Photon Workshop) [Not confirmed]
+* PWMS (Photon Workshop) [Not confirmed]
+* PWMX (Photon Workshop) [Not confirmed]
* ZCodex (Z-Suite)
* CWS (NovaMaker)
* LGS (Longer Orange 10)
diff --git a/UVtools.Core/FileFormats/ChituboxFile.cs b/UVtools.Core/FileFormats/ChituboxFile.cs
index 2561172..4c12e2d 100644
--- a/UVtools.Core/FileFormats/ChituboxFile.cs
+++ b/UVtools.Core/FileFormats/ChituboxFile.cs
@@ -967,7 +967,7 @@ namespace UVtools.Core.FileFormats
typeof(ChituboxFile),
typeof(ChituboxZipFile),
typeof(PHZFile),
- typeof(PWSFile),
+ typeof(PhotonWorkshopFile),
typeof(ZCodexFile),
typeof(CWSFile),
typeof(UVJFile),
@@ -1787,9 +1787,9 @@ namespace UVtools.Core.FileFormats
return true;
}
- if (to == typeof(PWSFile))
+ if (to == typeof(PhotonWorkshopFile))
{
- PWSFile file = new PWSFile
+ PhotonWorkshopFile file = new PhotonWorkshopFile
{
LayerManager = LayerManager,
HeaderSettings =
diff --git a/UVtools.Core/FileFormats/ChituboxZipFile.cs b/UVtools.Core/FileFormats/ChituboxZipFile.cs
index bdb8fe5..39f9109 100644
--- a/UVtools.Core/FileFormats/ChituboxZipFile.cs
+++ b/UVtools.Core/FileFormats/ChituboxZipFile.cs
@@ -99,7 +99,7 @@ namespace UVtools.Core.FileFormats
public override Type[] ConvertToFormats { get; } = {
typeof(ChituboxFile),
typeof(PHZFile),
- typeof(PWSFile),
+ typeof(PhotonWorkshopFile),
typeof(CWSFile),
typeof(ZCodexFile),
typeof(UVJFile)
@@ -831,9 +831,9 @@ namespace UVtools.Core.FileFormats
return true;
}
- if (to == typeof(PWSFile))
+ if (to == typeof(PhotonWorkshopFile))
{
- PWSFile file = new PWSFile
+ PhotonWorkshopFile file = new PhotonWorkshopFile
{
LayerManager = LayerManager,
HeaderSettings =
diff --git a/UVtools.Core/FileFormats/FileExtension.cs b/UVtools.Core/FileFormats/FileExtension.cs
index 4d15556..cc605f1 100644
--- a/UVtools.Core/FileFormats/FileExtension.cs
+++ b/UVtools.Core/FileFormats/FileExtension.cs
@@ -6,6 +6,7 @@
* of this license document, but changing it is not allowed.
*/
+using System;
using System.Collections.Generic;
namespace UVtools.Core.FileFormats
@@ -13,7 +14,7 @@ namespace UVtools.Core.FileFormats
/// <summary>
/// Represents a file extension for slicer file formats
/// </summary>
- public sealed class FileExtension
+ public sealed class FileExtension : IEquatable<FileExtension>, IEquatable<string>
{
#region Properties
/// <summary>
@@ -57,14 +58,19 @@ namespace UVtools.Core.FileFormats
public override string ToString()
{
- return $"{nameof(Extension)}: {Extension}, {nameof(Description)}: {Description}";
+ return $"{Description} ({Extension})";
}
- private bool Equals(FileExtension other)
+ public bool Equals(FileExtension other)
{
return Extension == other.Extension;
}
+ public bool Equals(string other)
+ {
+ return Extension == other;
+ }
+
public override bool Equals(object obj)
{
return ReferenceEquals(this, obj) || obj is FileExtension other && Equals(other);
@@ -97,10 +103,11 @@ namespace UVtools.Core.FileFormats
#region Methods
- public FileFormat GetFileFormat()
- {
- return FileFormat.FindByExtension(Extension);
- }
+ public FileFormat GetFileFormat() =>
+ FileFormat.FindByExtension(Extension);
+
+ public static FileExtension Find(string extension)=>
+ FileFormat.FindExtension(extension);
#endregion
}
}
diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs
index 6f0b41c..8e7a4a0 100644
--- a/UVtools.Core/FileFormats/FileFormat.cs
+++ b/UVtools.Core/FileFormats/FileFormat.cs
@@ -192,7 +192,7 @@ namespace UVtools.Core.FileFormats
new ChituboxFile(), // cbddlp, cbt, photon
new PHZFile(), // phz
new PhotonSFile(), // photons
- new PWSFile(), // PSW
+ new PhotonWorkshopFile(), // PSW
new ZCodexFile(), // zcodex
new CWSFile(), // CWS
//new MakerbaseFile(), // MKS
@@ -265,6 +265,11 @@ namespace UVtools.Core.FileFormats
return (from fileFormat in AvaliableFormats where fileFormat.IsExtensionValid(extension, isFilePath) select createNewInstance ? (FileFormat) Activator.CreateInstance(fileFormat.GetType()) : fileFormat).FirstOrDefault();
}
+ public static FileExtension FindExtension(string extension, bool isFilePath = false, bool createNewInstance = false)
+ {
+ return AvaliableFormats.SelectMany(format => format.FileExtensions).FirstOrDefault(ext => ext.Equals(extension));
+ }
+
/// <summary>
/// Find <see cref="FileFormat"/> by an type
/// </summary>
@@ -603,7 +608,7 @@ namespace UVtools.Core.FileFormats
public bool IsExtensionValid(string extension, bool isFilePath = false)
{
extension = isFilePath ? Path.GetExtension(extension)?.Remove(0, 1) : extension;
- return FileExtensions.Any(fileExtension => fileExtension.Extension.Equals(extension, StringComparison.InvariantCultureIgnoreCase));
+ return FileExtensions.Any(fileExtension => fileExtension.Equals(extension));
}
public string GetFileExtensions(string prepend = ".", string separator = ", ")
diff --git a/UVtools.Core/FileFormats/PHZFile.cs b/UVtools.Core/FileFormats/PHZFile.cs
index 4f72f58..b5f8c66 100644
--- a/UVtools.Core/FileFormats/PHZFile.cs
+++ b/UVtools.Core/FileFormats/PHZFile.cs
@@ -686,7 +686,7 @@ namespace UVtools.Core.FileFormats
{
typeof(ChituboxFile),
typeof(ChituboxZipFile),
- typeof(PWSFile),
+ typeof(PhotonWorkshopFile),
typeof(ZCodexFile),
typeof(CWSFile),
typeof(UVJFile),
@@ -1358,9 +1358,9 @@ namespace UVtools.Core.FileFormats
return true;
}
- if (to == typeof(PWSFile))
+ if (to == typeof(PhotonWorkshopFile))
{
- PWSFile file = new PWSFile
+ PhotonWorkshopFile file = new PhotonWorkshopFile
{
LayerManager = LayerManager,
HeaderSettings =
diff --git a/UVtools.Core/FileFormats/PWSFile.cs b/UVtools.Core/FileFormats/PhotonWorkshopFile.cs
index 0702295..5824dcb 100644
--- a/UVtools.Core/FileFormats/PWSFile.cs
+++ b/UVtools.Core/FileFormats/PhotonWorkshopFile.cs
@@ -20,7 +20,7 @@ using UVtools.Core.Operations;
namespace UVtools.Core.FileFormats
{
- public class PWSFile : FileFormat
+ public class PhotonWorkshopFile : FileFormat
{
#region Constants
public const byte MarkSize = 12;
@@ -80,18 +80,14 @@ namespace UVtools.Core.FileFormats
{
public const string SectionMarkFile = "ANYCUBIC";
- private string _mark = SectionMarkFile;
/// <summary>
/// Gets the file mark placeholder
/// Fixed to "ANYCUBIC"
/// </summary>
[FieldOrder(0)]
[FieldLength(MarkSize)]
- public string Mark
- {
- get => _mark;
- set => _mark = value.TrimEnd('\0');
- }
+ [SerializeAs(SerializedType.TerminatedString)]
+ public string Mark { get; set; } = SectionMarkFile;
/// <summary>
/// Gets the file format version
@@ -138,31 +134,30 @@ namespace UVtools.Core.FileFormats
#region Section
- public class Section
+ public class SectionHeader
{
- private string _mark;
-
/// <summary>
/// Gets the section mark placeholder
/// </summary>
[FieldOrder(0)]
[FieldLength(MarkSize)]
- public string Mark
- {
- get => _mark;
- set => _mark = value.TrimEnd('\0');
- }
+ [SerializeAs(SerializedType.TerminatedString)]
+ public string Mark { get; set; }
/// <summary>
/// Gets the length of this section
/// </summary>
[FieldOrder(1)] public uint Length { get; set; }
- public Section() { }
+ public SectionHeader() { }
- public Section(string mark, object obj) : this(mark, (uint)Helpers.Serializer.SizeOf(obj)) { }
+ public SectionHeader(string mark, object obj) : this(mark)
+ {
+ //Debug.WriteLine(Helpers.Serializer.SizeOf(obj));
+ Length = (uint)Helpers.Serializer.SizeOf(obj);
+ }
- public Section(string mark, uint length = 0)
+ public SectionHeader(string mark, uint length = 0)
{
Mark = mark;
Length = length;
@@ -192,7 +187,7 @@ namespace UVtools.Core.FileFormats
}
}
- public override string ToString() => $"{{{nameof(Mark)}: {Mark}, {nameof(Length)}: {Length}}}";
+ public override string ToString() => $"[{nameof(Mark)}: {Mark}, {nameof(Length)}: {Length}]";
}
#endregion
@@ -202,46 +197,45 @@ namespace UVtools.Core.FileFormats
{
public const string SectionMark = "HEADER";
- [Ignore] public Section Section { get; set; }
- [FieldOrder(0)] public float PixelSize { get; set; }
- [FieldOrder(1)] public float LayerHeight { get; set; }
- [FieldOrder(2)] public float LayerExposureTime { get; set; }
- [FieldOrder(3)] public float LayerOffTime { get; set; } = 1;
- [FieldOrder(4)] public float BottomExposureSeconds { get; set; }
- [FieldOrder(5)] public float BottomLayersCount { get; set; }
- [FieldOrder(6)] public float LiftHeight { get; set; } = 6;
-
+ [FieldOrder(0)] public SectionHeader Section { get; set; }
+ [FieldOrder(1)] public float PixelSize { get; set; }
+ [FieldOrder(2)] public float LayerHeight { get; set; }
+ [FieldOrder(3)] public float LayerExposureTime { get; set; }
+ [FieldOrder(4)] public float LayerOffTime { get; set; } = 1;
+ [FieldOrder(5)] public float BottomExposureSeconds { get; set; }
+ [FieldOrder(6)] public float BottomLayersCount { get; set; }
+ [FieldOrder(7)] public float LiftHeight { get; set; } = 6;
/// <summary>
/// Gets the lift speed in mm/s
/// </summary>
- [FieldOrder(7)] public float LiftSpeed { get; set; } = 3; // mm/s
+ [FieldOrder(8)] public float LiftSpeed { get; set; } = 3; // mm/s
/// <summary>
/// Gets the retract speed in mm/s
/// </summary>
- [FieldOrder(8)] public float RetractSpeed { get; set; } = 3; // mm/s
- [FieldOrder(9)] public float Volume { get; set; }
- [FieldOrder(10)] public uint AntiAliasing { get; set; } = 1;
- [FieldOrder(11)] public uint ResolutionX { get; set; }
- [FieldOrder(12)] public uint ResolutionY { get; set; }
- [FieldOrder(13)] public float Weight { get; set; }
- [FieldOrder(14)] public float Price { get; set; }
- [FieldOrder(15)] public uint ResinType { get; set; } // 0x24 ?
- [FieldOrder(16)] public uint PerLayerOverride { get; set; } // bool
- [FieldOrder(17)] public uint Offset1 { get; set; }
- [FieldOrder(18)] public uint Offset2 { get; set; }
- [FieldOrder(19)] public uint Offset3 { get; set; }
+ [FieldOrder(9)] public float RetractSpeed { get; set; } = 3; // mm/s
+ [FieldOrder(10)] public float Volume { get; set; }
+ [FieldOrder(11)] public uint AntiAliasing { get; set; } = 1;
+ [FieldOrder(12)] public uint ResolutionX { get; set; }
+ [FieldOrder(13)] public uint ResolutionY { get; set; }
+ [FieldOrder(14)] public float Weight { get; set; }
+ [FieldOrder(15)] public float Price { get; set; }
+ [FieldOrder(16)] public uint ResinType { get; set; } // 0x24 ?
+ [FieldOrder(17)] public uint PerLayerOverride { get; set; } // bool
+ [FieldOrder(18)] public uint Offset1 { get; set; }
+ [FieldOrder(19)] public uint Offset2 { get; set; }
+ [FieldOrder(20)] public uint Offset3 { get; set; }
public Header()
{
- Section = new Section(SectionMark, this);
+ Section = new SectionHeader(SectionMark, this);
}
public override string ToString() => $"{nameof(Section)}: {Section}, {nameof(PixelSize)}: {PixelSize}, {nameof(LayerHeight)}: {LayerHeight}, {nameof(LayerExposureTime)}: {LayerExposureTime}, {nameof(LayerOffTime)}: {LayerOffTime}, {nameof(BottomExposureSeconds)}: {BottomExposureSeconds}, {nameof(BottomLayersCount)}: {BottomLayersCount}, {nameof(LiftHeight)}: {LiftHeight}, {nameof(LiftSpeed)}: {LiftSpeed}, {nameof(RetractSpeed)}: {RetractSpeed}, {nameof(Volume)}: {Volume}, {nameof(AntiAliasing)}: {AntiAliasing}, {nameof(ResolutionX)}: {ResolutionX}, {nameof(ResolutionY)}: {ResolutionY}, {nameof(Weight)}: {Weight}, {nameof(Price)}: {Price}, {nameof(ResinType)}: {ResinType}, {nameof(PerLayerOverride)}: {PerLayerOverride}, {nameof(Offset1)}: {Offset1}, {nameof(Offset2)}: {Offset2}, {nameof(Offset3)}: {Offset3}";
public void Validate()
{
- Section.Validate(SectionMark, this);
+ Section.Validate(SectionMark, (int)-Helpers.Serializer.SizeOf(Section), this);
}
}
@@ -256,7 +250,8 @@ namespace UVtools.Core.FileFormats
public class Preview
{
public const string SectionMark = "PREVIEW";
- [Ignore] public Section Section { get; set; }
+
+ [FieldOrder(0)] public SectionHeader Section { get; set; }
/// <summary>
/// Gets the image width, in pixels.
@@ -273,15 +268,24 @@ namespace UVtools.Core.FileFormats
/// </summary>
[FieldOrder(3)] public uint Height { get; set; } = 168;
+ [Ignore] public uint DataSize => Width * Height * 2;
+
// little-endian 16bit colors, RGB 565 encoded.
- //[FieldOrder(4)]
- //[FieldLength("Section.Length")]
- [Ignore]
- public byte[] Data { get; set; }
+ //[FieldOrder(4)] [FieldLength(nameof(Section)+"."+nameof(SectionHeader.Length))]
+ [Ignore] public byte[] Data { get; set; }
public Preview()
{
- Section = new Section(SectionMark, this);
+ Section = new SectionHeader(SectionMark, this);
+ }
+
+ public Preview(uint width, uint height, uint resolution = 42) : this()
+ {
+ Width = width;
+ Height = height;
+ Resolution = resolution;
+ Data = new byte[DataSize];
+ Section.Length += (uint)Data.Length;
}
public unsafe Mat Decode(bool consumeData = true)
@@ -313,13 +317,7 @@ namespace UVtools.Core.FileFormats
var span = image.GetBytePointer();
var imageLength = image.GetLength();
- Preview preview = new Preview
- {
- Width = (uint) image.Width,
- Height = (uint) image.Height,
- Resolution = 42,
- Data = new byte[image.Width * image.Height * 2]
- };
+ Preview preview = new Preview((uint) image.Width, (uint) image.Height);
int i = 0;
for (int pixel = 0; pixel < imageLength; pixel += image.NumberOfChannels)
@@ -336,7 +334,6 @@ namespace UVtools.Core.FileFormats
preview.Data[i++] = (byte) (color >> 8);
}
- preview.Section.Length += (uint) preview.Data.Length;
return preview;
}
@@ -347,7 +344,7 @@ namespace UVtools.Core.FileFormats
public void Validate(int size)
{
- Section.Validate(SectionMark, size, this);
+ Section.Validate(SectionMark, (int) (size - Helpers.Serializer.SizeOf(Section)), this);
}
}
@@ -388,13 +385,13 @@ namespace UVtools.Core.FileFormats
[FieldOrder(7)] public float Offset2 { get; set; }
[Ignore] public byte[] EncodedRle { get; set; }
- [Ignore] public PWSFile Parent { get; set; }
+ [Ignore] public PhotonWorkshopFile Parent { get; set; }
public LayerData()
{
}
- public LayerData(PWSFile parent, uint layerIndex)
+ public LayerData(PhotonWorkshopFile parent, uint layerIndex)
{
Parent = parent;
RefreshLayerData(layerIndex);
@@ -711,21 +708,22 @@ namespace UVtools.Core.FileFormats
{
public const string SectionMark = "LAYERDEF";
- [FieldOrder(0)] public Section Section { get; set; }
+ [FieldOrder(0)] public SectionHeader Section { get; set; }
- [FieldOrder(1)] public uint LayersCount { get; set; }
+ [FieldOrder(1)] public uint LayerCount { get; set; }
[Ignore] public LayerData[] Layers { get; set; }
public LayerDefinition()
{
- Section = new Section(SectionMark, this);
+ Section = new SectionHeader(SectionMark, this);
}
- public LayerDefinition(uint layersCount) : this()
+ public LayerDefinition(uint layerCount) : this()
{
- LayersCount = layersCount;
- Layers = new LayerData[layersCount];
+ LayerCount = layerCount;
+ Layers = new LayerData[layerCount];
+ Section.Length += (uint) Helpers.Serializer.SizeOf(new LayerData()) * LayerCount;
}
[Ignore]
@@ -744,10 +742,10 @@ namespace UVtools.Core.FileFormats
public void Validate()
{
- Section.Validate(SectionMark, (int) (LayersCount * Helpers.Serializer.SizeOf(new LayerData()) - Helpers.Serializer.SizeOf(Section)), this);
+ Section.Validate(SectionMark, (int) (LayerCount * Helpers.Serializer.SizeOf(new LayerData()) - Helpers.Serializer.SizeOf(Section)), this);
}
- public override string ToString() => $"{nameof(Section)}: {Section}, {nameof(LayersCount)}: {LayersCount}";
+ public override string ToString() => $"{nameof(Section)}: {Section}, {nameof(LayerCount)}: {LayerCount}";
}
#endregion
@@ -768,16 +766,21 @@ namespace UVtools.Core.FileFormats
public override FileFormatType FileType => FileFormatType.Binary;
public override FileExtension[] FileExtensions { get; } = {
- new FileExtension("pws", "Photon Workshop PWS"),
- new FileExtension("pw0", "Photon Workshop PW0"),
- new FileExtension("pwmx", "Photon Workshop PWMX")
+
+ new FileExtension("pwmx", "Photon Mono X (PWMX)"),
+ new FileExtension("pwms", "Photon Mono SE (PWMS)"),
+ new FileExtension("pwmo", "Photon Mono (PWMO)"),
+ new FileExtension("pwx", "Photon X (PWX)"),
+ new FileExtension("pws", "Photon / Photon S (PWS)"),
+ new FileExtension("pw0", "Photon Zero (PW0)"),
+
};
public override Type[] ConvertToFormats { get; } =
{
//typeof(ChituboxZipFile)
//typeof(PHZFile),
- typeof(PWSFile),
+ typeof(PhotonWorkshopFile),
typeof(CWSFile),
typeof(UVJFile),
};
@@ -854,7 +857,7 @@ namespace UVtools.Core.FileFormats
{
set
{
- LayersDefinition.LayersCount = LayerCount;
+ LayersDefinition.LayerCount = LayerCount;
RaisePropertyChanged();
RaisePropertyChanged(nameof(NormalLayerCount));
}
@@ -950,37 +953,55 @@ namespace UVtools.Core.FileFormats
}
}
- public override string MachineName => LayerFormat == LayerRleFormat.PWS ? "AnyCubic Photon S" : "AnyCubic Photon Zero";
-
- public override object[] Configs => new object[] { FileMarkSettings, HeaderSettings, PreviewSettings, LayersDefinition };
-
- public LayerRleFormat LayerFormat
+ public override string MachineName
{
get
{
if (FileFullPath.EndsWith(".pws") || FileFullPath.EndsWith($".pws{TemporaryFileAppend}"))
{
- return LayerRleFormat.PWS;
+ return "AnyCubic Photon S";
}
if (FileFullPath.EndsWith(".pw0") || FileFullPath.EndsWith($".pw0{TemporaryFileAppend}"))
{
- return LayerRleFormat.PW0;
+ return "AnyCubic Photon Zero";
+ }
+
+ if (FileFullPath.EndsWith(".pwx") || FileFullPath.EndsWith($".pwx{TemporaryFileAppend}"))
+ {
+ return "AnyCubic Photon X";
+ }
+
+ if (FileFullPath.EndsWith(".pwmo") || FileFullPath.EndsWith($".pwmo{TemporaryFileAppend}"))
+ {
+ return "AnyCubic Photon Mono";
+ }
+
+ if (FileFullPath.EndsWith(".pwms") || FileFullPath.EndsWith($".pwms{TemporaryFileAppend}"))
+ {
+ return "AnyCubic Photon Mono SE";
}
if (FileFullPath.EndsWith(".pwmx") || FileFullPath.EndsWith($".pwmx{TemporaryFileAppend}"))
{
- return LayerRleFormat.PW0;
+ return "AnyCubic Photon Mono X";
}
- return LayerRleFormat.PWS;
+ return base.MachineName;
}
- }
+ }
+
+ public override object[] Configs => new object[] { FileMarkSettings, HeaderSettings, PreviewSettings, LayersDefinition };
+
+ public LayerRleFormat LayerFormat =>
+ FileFullPath.EndsWith(".pws") || FileFullPath.EndsWith($".pws{TemporaryFileAppend}")
+ ? LayerRleFormat.PWS
+ : LayerRleFormat.PW0;
#endregion
#region Constructors
- public PWSFile()
+ public PhotonWorkshopFile()
{
}
#endregion
@@ -1004,14 +1025,12 @@ namespace UVtools.Core.FileFormats
using (var outputFile = new FileStream(fileFullPath, FileMode.Create, FileAccess.Write))
{
outputFile.Seek((int) currentOffset, SeekOrigin.Begin);
- currentOffset += Helpers.SerializeWriteFileStream(outputFile, HeaderSettings.Section);
currentOffset += Helpers.SerializeWriteFileStream(outputFile, HeaderSettings);
if (CreatedThumbnailsCount > 0)
{
FileMarkSettings.PreviewAddress = currentOffset;
Preview preview = Preview.Encode(Thumbnails[0]);
- currentOffset += Helpers.SerializeWriteFileStream(outputFile, preview.Section);
currentOffset += Helpers.SerializeWriteFileStream(outputFile, preview);
currentOffset += outputFile.WriteBytes(preview.Data);
}
@@ -1033,8 +1052,6 @@ namespace UVtools.Core.FileFormats
}
});
- LayersDefinition.Section.Length += (uint)Helpers.Serializer.SizeOf(new LayerData()) * LayerCount;
- //currentOffset += Helpers.SerializeWriteFileStream(outputFile, LayersDefinition.Section);
uint offsetLayerRle = FileMarkSettings.LayerImageAddress = (uint) (currentOffset + Helpers.Serializer.SizeOf(LayersDefinition.Section) + LayersDefinition.Section.Length);
currentOffset += Helpers.SerializeWriteFileStream(outputFile, LayersDefinition);
@@ -1081,9 +1098,6 @@ namespace UVtools.Core.FileFormats
using (var inputFile = new FileStream(fileFullPath, FileMode.Open, FileAccess.Read))
{
-
- //HeaderSettings = Helpers.ByteToType<CbddlpFile.Header>(InputFile);
- //HeaderSettings = Helpers.Serializer.Deserialize<Header>(InputFile.ReadBytes(Helpers.Serializer.SizeOf(typeof(Header))));
FileMarkSettings = Helpers.Deserialize<FileMark>(inputFile);
Debug.Write("FileMark -> ");
@@ -1104,14 +1118,7 @@ namespace UVtools.Core.FileFormats
FileFullPath = fileFullPath;
inputFile.Seek(FileMarkSettings.HeaderAddress, SeekOrigin.Begin);
- //Section sectionHeader = Helpers.Deserialize<Section>(inputFile);
- //Debug.Write("SectionHeader -> ");
- //Debug.WriteLine(sectionHeader);
-
- var section = Helpers.Deserialize<Section>(inputFile);
HeaderSettings = Helpers.Deserialize<Header>(inputFile);
- HeaderSettings.Section = section;
-
Debug.Write("Header -> ");
Debug.WriteLine(HeaderSettings);
@@ -1122,16 +1129,13 @@ namespace UVtools.Core.FileFormats
{
inputFile.Seek(FileMarkSettings.PreviewAddress, SeekOrigin.Begin);
- section = Helpers.Deserialize<Section>(inputFile);
PreviewSettings = Helpers.Deserialize<Preview>(inputFile);
- PreviewSettings.Section = section;
Debug.Write("Preview -> ");
Debug.WriteLine(PreviewSettings);
- uint datasize = PreviewSettings.Width * PreviewSettings.Height * 2;
- //PreviewSettings.Validate(datasize);
+ //PreviewSettings.Validate((int) PreviewSettings.DataSize);
- PreviewSettings.Data = new byte[datasize];
+ PreviewSettings.Data = new byte[PreviewSettings.DataSize];
inputFile.ReadBytes(PreviewSettings.Data);
Thumbnails[0] = PreviewSettings.Decode(true);
@@ -1139,13 +1143,11 @@ namespace UVtools.Core.FileFormats
inputFile.Seek(FileMarkSettings.LayerDefinitionAddress, SeekOrigin.Begin);
- //section = Helpers.Deserialize<Section>(inputFile);
LayersDefinition = Helpers.Deserialize<LayerDefinition>(inputFile);
- //LayersDefinition.Section = section;
Debug.Write("LayersDefinition -> ");
Debug.WriteLine(LayersDefinition);
- LayerManager = new LayerManager(LayersDefinition.LayersCount, this);
+ LayerManager = new LayerManager(LayersDefinition.LayerCount, this);
LayersDefinition.Layers = new LayerData[LayerCount];
@@ -1222,7 +1224,7 @@ namespace UVtools.Core.FileFormats
using (var outputFile = new FileStream(FileFullPath, FileMode.Open, FileAccess.Write))
{
- outputFile.Seek(FileMarkSettings.HeaderAddress+Helpers.Serializer.SizeOf(HeaderSettings.Section), SeekOrigin.Begin);
+ outputFile.Seek(FileMarkSettings.HeaderAddress, SeekOrigin.Begin);
Helpers.SerializeWriteFileStream(outputFile, HeaderSettings);
@@ -1237,13 +1239,13 @@ namespace UVtools.Core.FileFormats
public override bool Convert(Type to, string fileFullPath, OperationProgress progress = null)
{
- if (to == typeof(PWSFile))
+ if (to == typeof(PhotonWorkshopFile))
{
if (Path.GetExtension(FileFullPath).Equals(Path.GetExtension(fileFullPath)))
{
return false;
}
- PWSFile file = new PWSFile
+ PhotonWorkshopFile file = new PhotonWorkshopFile
{
LayerManager = LayerManager,
HeaderSettings =
diff --git a/UVtools.Core/FileFormats/SL1File.cs b/UVtools.Core/FileFormats/SL1File.cs
index 0034082..4c7a8d4 100644
--- a/UVtools.Core/FileFormats/SL1File.cs
+++ b/UVtools.Core/FileFormats/SL1File.cs
@@ -297,7 +297,7 @@ namespace UVtools.Core.FileFormats
typeof(ChituboxFile),
typeof(ChituboxZipFile),
typeof(PHZFile),
- typeof(PWSFile),
+ typeof(PhotonWorkshopFile),
typeof(ZCodexFile),
typeof(CWSFile),
typeof(LGSFile),
@@ -866,10 +866,10 @@ namespace UVtools.Core.FileFormats
return true;
}
- if (to == typeof(PWSFile))
+ if (to == typeof(PhotonWorkshopFile))
{
- PWSFile defaultFormat = (PWSFile)FindByType(typeof(PWSFile));
- PWSFile file = new PWSFile
+ PhotonWorkshopFile defaultFormat = (PhotonWorkshopFile)FindByType(typeof(PhotonWorkshopFile));
+ PhotonWorkshopFile file = new PhotonWorkshopFile
{
LayerManager = LayerManager,
HeaderSettings =
diff --git a/UVtools.Core/FileFormats/UVJFile.cs b/UVtools.Core/FileFormats/UVJFile.cs
index c9235c0..c2f8f7f 100644
--- a/UVtools.Core/FileFormats/UVJFile.cs
+++ b/UVtools.Core/FileFormats/UVJFile.cs
@@ -138,7 +138,7 @@ namespace UVtools.Core.FileFormats
typeof(ChituboxFile),
typeof(ChituboxZipFile),
typeof(PHZFile),
- typeof(PWSFile),
+ typeof(PhotonWorkshopFile),
typeof(ZCodexFile),
typeof(CWSFile),
//typeof(LGSFile)
@@ -675,9 +675,9 @@ namespace UVtools.Core.FileFormats
return true;
}
- if (to == typeof(PWSFile))
+ if (to == typeof(PhotonWorkshopFile))
{
- PWSFile file = new PWSFile
+ PhotonWorkshopFile file = new PhotonWorkshopFile
{
LayerManager = LayerManager,
HeaderSettings =
diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj
index 9d3c379..a0a27d9 100644
--- a/UVtools.Core/UVtools.Core.csproj
+++ b/UVtools.Core/UVtools.Core.csproj
@@ -10,7 +10,7 @@
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl>
<Description>MSLA/DLP, file analysis, repair, conversion and manipulation</Description>
- <Version>1.3.0</Version>
+ <Version>1.3.1</Version>
<Copyright>Copyright © 2020 PTRTECH</Copyright>
<PackageIcon>UVtools.png</PackageIcon>
<Platforms>AnyCPU;x64</Platforms>
diff --git a/UVtools.GUI/UVtools.GUI.csproj b/UVtools.GUI/UVtools.GUI.csproj
index b270b17..0040e15 100644
--- a/UVtools.GUI/UVtools.GUI.csproj
+++ b/UVtools.GUI/UVtools.GUI.csproj
@@ -112,7 +112,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Drawing.Common.5.0.0-rc.2.20475.5\lib\net461\System.Drawing.Common.dll</HintPath>
+ <HintPath>..\packages\System.Drawing.Common.5.0.0\lib\net461\System.Drawing.Common.dll</HintPath>
</Reference>
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll</HintPath>
@@ -143,7 +143,7 @@
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0-rc.2.20475.5\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+ <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Extensions, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll</HintPath>
diff --git a/UVtools.GUI/packages.config b/UVtools.GUI/packages.config
index f352f52..db80189 100644
--- a/UVtools.GUI/packages.config
+++ b/UVtools.GUI/packages.config
@@ -6,7 +6,7 @@
<package id="Emgu.CV.runtime.windows" version="4.4.0.4099" targetFramework="net48" />
<package id="ObjectListView.Official" version="2.9.2-alpha2" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
- <package id="System.Drawing.Common" version="5.0.0-rc.2.20475.5" targetFramework="net48" />
+ <package id="System.Drawing.Common" version="5.0.0" targetFramework="net48" />
<package id="System.Drawing.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.Memory" version="4.5.4" targetFramework="net48" />
@@ -14,7 +14,7 @@
<package id="System.Reflection.TypeExtensions" version="4.7.0" targetFramework="net48" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime" version="4.3.1" targetFramework="net48" />
- <package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0-rc.2.20475.5" targetFramework="net48" />
+ <package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net48" />
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net48" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net48" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net48" />
diff --git a/UVtools.InstallerMM/UVtools.InstallerMM.wxs b/UVtools.InstallerMM/UVtools.InstallerMM.wxs
index ba1a5b8..ad09b47 100644
--- a/UVtools.InstallerMM/UVtools.InstallerMM.wxs
+++ b/UVtools.InstallerMM/UVtools.InstallerMM.wxs
@@ -848,9 +848,21 @@
<Directory Id="owd9F9F77C9E3C3E4DA718760164D5303B8" Name="Assets">
<Directory Id="owd09EA423812736FC896B5C82AE8837139" Name="PrusaSlicer">
<Directory Id="owd44E5BD2F3F078D3F66FB8FE12300C21C" Name="printer">
+ <Component Id="owcB1F9239297148807EDD6F0AD6A16F055" Guid="319838b0-55af-2be6-09e9-f97a8270196b">
+ <File Id="owfB1F9239297148807EDD6F0AD6A16F055" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\AnyCubic Photon Mono SE.ini" KeyPath="yes" />
+ </Component>
+ <Component Id="owc5438DE5556A7860A5A4B999D2C8549E6" Guid="18d012cf-f45e-421f-9e5f-f2530fd82cdf">
+ <File Id="owf5438DE5556A7860A5A4B999D2C8549E6" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\AnyCubic Photon Mono X.ini" KeyPath="yes" />
+ </Component>
+ <Component Id="owc6D301112F11F080C920F7E769AA8DAAC" Guid="1a7ba221-3475-f546-3fe9-a713f4bf856c">
+ <File Id="owf6D301112F11F080C920F7E769AA8DAAC" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\AnyCubic Photon Mono.ini" KeyPath="yes" />
+ </Component>
<Component Id="owc2EABADD977D38E081AEBDA1E4F66ABAC" Guid="21cff034-fa0c-8768-77a8-0466b9adfa34">
<File Id="owf2EABADD977D38E081AEBDA1E4F66ABAC" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\AnyCubic Photon S.ini" KeyPath="yes" />
</Component>
+ <Component Id="owc72EDAE2CA5207EAC641C69AFC492E534" Guid="4eadef64-b635-98bc-ce76-a48433cf88be">
+ <File Id="owf72EDAE2CA5207EAC641C69AFC492E534" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\AnyCubic Photon X.ini" KeyPath="yes" />
+ </Component>
<Component Id="owc52FABCDB07DFFBA3A0BA85FC86A4E849" Guid="8d9ec4f5-bf5c-b1ec-16d2-704dfcb6e5ee">
<File Id="owf52FABCDB07DFFBA3A0BA85FC86A4E849" Source="$(var.SourceDir)\Assets\PrusaSlicer\printer\AnyCubic Photon Zero.ini" KeyPath="yes" />
</Component>
diff --git a/UVtools.WPF/MainWindow.axaml.cs b/UVtools.WPF/MainWindow.axaml.cs
index c82ce00..75edcb7 100644
--- a/UVtools.WPF/MainWindow.axaml.cs
+++ b/UVtools.WPF/MainWindow.axaml.cs
@@ -5,13 +5,6 @@
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
@@ -22,6 +15,13 @@ using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using MessageBox.Avalonia.Enums;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
using UVtools.Core;
using UVtools.Core.Extensions;
using UVtools.Core.FileFormats;
@@ -570,14 +570,20 @@ namespace UVtools.WPF
if (!IsFileLoaded) return;
var ext = Path.GetExtension(SlicerFile.FileFullPath);
var extNoDot = ext.Remove(0, 1);
+ var extension = FileExtension.Find(extNoDot);
+ if (extension is null)
+ {
+ await this.MessageBoxError("Unable to find the target extension.", "Invalid extension");
+ return;
+ }
SaveFileDialog dialog = new SaveFileDialog
{
- DefaultExtension = extNoDot,
+ DefaultExtension = extension.Extension,
Filters = new List<FileDialogFilter>
{
new FileDialogFilter
{
- Name = $"{ext} Files",
+ Name = extension.Description,
Extensions = new List<string>
{
extNoDot
diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj
index ac1ac0e..310e6fe 100644
--- a/UVtools.WPF/UVtools.WPF.csproj
+++ b/UVtools.WPF/UVtools.WPF.csproj
@@ -12,7 +12,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
- <Version>1.3.0</Version>
+ <Version>1.3.1</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">