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>2021-01-14 02:19:23 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2021-01-14 02:19:23 +0300
commit097bbb867dd2a5942602d0dadc71187494e55b35 (patch)
tree3e3da6bf15cb0b3c9197bd8e63322f1250afba1d /UVtools.Core/FileFormats/PhotonSFile.cs
parent17bdece1b536013ae72213717311a0dcd389f97c (diff)
v2.3.0v2.3.0
* **PrusaSlicer:** * **In this release is recommended to discard your printer and refresh it with uvtools updated printer or replace notes over** * (Add) FILEFORMAT_XXX variable to auto-convert to that file format once open in UVtools * (Update) Print profiles fields with new PrusaSlicer version * (Remove) LayerOffDelay from printer notes and use only the LightOffDelay variable instead, both were being used, to avoid redundacy LayerOffDelay was dropped. Please update your printer accordingly! * (Remove) FLIP_XY compability from printers * (Remove) AntiAlias variable from printers * **(Add) Settings - Automations:** * Auto save the file after apply any automation(s) * Auto convert SL1 files to the target format when possible and load it back * Auto set the extra 'light-off delay' based on lift height and speed. * (Add) Allow all and future formats to convert between them without knowing each other (Abstraction) * (Add) XYResolution and XYResolutionUm property to file formats * (Add) Calculator - Optimal model tilt: Calculates the optimal model tilt angle for printing and to minimize the visual layer effect * (Add) Bottom layer count to the status bar * **(Add) FileFormat propertiers:** * MirrorDisplay: If images need to be mirrored on lcd to print on the correct orientation (If available) * MaxPrintHeight: The maximum Z build volume of the printer (If available) * (Add) ZCodex: Print paramenter light-off delay" * (Add) SL1: Implement missing keys: host_type, physical_printer_settings_id and support_small_pillar_diameter_percent * (Change) File formats: Round all setters floats to 2 decimals * (Change) Island Repair: "Remove Islands Below Equal Pixels" limit from 255 to 65535 (#124) * (Change) LightOffTime variables to LayerOffDelay * (Fix) Files with upper case extensions doesn't load in * **(Fix) SL1:** * Prevent error when bottle volume is 0 * bool values were incorrectly parsed * (Fix) **ZIP:** * Material volume was set to grams * Bed Y was not being set
Diffstat (limited to 'UVtools.Core/FileFormats/PhotonSFile.cs')
-rw-r--r--UVtools.Core/FileFormats/PhotonSFile.cs74
1 files changed, 31 insertions, 43 deletions
diff --git a/UVtools.Core/FileFormats/PhotonSFile.cs b/UVtools.Core/FileFormats/PhotonSFile.cs
index e77b200..4b14faf 100644
--- a/UVtools.Core/FileFormats/PhotonSFile.cs
+++ b/UVtools.Core/FileFormats/PhotonSFile.cs
@@ -48,7 +48,7 @@ namespace UVtools.Core.FileFormats
[FieldOrder(2)] [FieldEndianness(Endianness.Big)] public double XYPixelSize { get; set; } = 0.04725; // 0.04725
[FieldOrder(3)] [FieldEndianness(Endianness.Big)] public double LayerHeight { get; set; }
[FieldOrder(4)] [FieldEndianness(Endianness.Big)] public double ExposureSeconds { get; set; }
- [FieldOrder(5)] [FieldEndianness(Endianness.Big)] public double LayerOffSeconds { get; set; }
+ [FieldOrder(5)] [FieldEndianness(Endianness.Big)] public double LightOffDelay { get; set; }
[FieldOrder(6)] [FieldEndianness(Endianness.Big)] public double BottomExposureSeconds { get; set; }
[FieldOrder(7)] [FieldEndianness(Endianness.Big)] public uint BottomLayerCount { get; set; }
[FieldOrder(8)] [FieldEndianness(Endianness.Big)] public double LiftHeight { get; set; } // mm
@@ -62,7 +62,7 @@ namespace UVtools.Core.FileFormats
public override string ToString()
{
- return $"{nameof(Tag1)}: {Tag1}, {nameof(Tag2)}: {Tag2}, {nameof(XYPixelSize)}: {XYPixelSize}, {nameof(LayerHeight)}: {LayerHeight}, {nameof(ExposureSeconds)}: {ExposureSeconds}, {nameof(LayerOffSeconds)}: {LayerOffSeconds}, {nameof(BottomExposureSeconds)}: {BottomExposureSeconds}, {nameof(BottomLayerCount)}: {BottomLayerCount}, {nameof(LiftHeight)}: {LiftHeight}, {nameof(LiftSpeed)}: {LiftSpeed}, {nameof(RetractSpeed)}: {RetractSpeed}, {nameof(Volume)}: {Volume}, {nameof(PreviewResolutionX)}: {PreviewResolutionX}, {nameof(Unknown2)}: {Unknown2}, {nameof(PreviewResolutionY)}: {PreviewResolutionY}, {nameof(Unknown4)}: {Unknown4}";
+ return $"{nameof(Tag1)}: {Tag1}, {nameof(Tag2)}: {Tag2}, {nameof(XYPixelSize)}: {XYPixelSize}, {nameof(LayerHeight)}: {LayerHeight}, {nameof(ExposureSeconds)}: {ExposureSeconds}, {nameof(LightOffDelay)}: {LightOffDelay}, {nameof(BottomExposureSeconds)}: {BottomExposureSeconds}, {nameof(BottomLayerCount)}: {BottomLayerCount}, {nameof(LiftHeight)}: {LiftHeight}, {nameof(LiftSpeed)}: {LiftSpeed}, {nameof(RetractSpeed)}: {RetractSpeed}, {nameof(Volume)}: {Volume}, {nameof(PreviewResolutionX)}: {PreviewResolutionX}, {nameof(Unknown2)}: {Unknown2}, {nameof(PreviewResolutionY)}: {PreviewResolutionY}, {nameof(Unknown4)}: {Unknown4}";
}
}
@@ -201,12 +201,7 @@ namespace UVtools.Core.FileFormats
public override FileFormatType FileType => FileFormatType.Binary;
public override FileExtension[] FileExtensions { get; } = {
- new FileExtension("photons", "Chitubox PhotonS"),
- };
-
- public override Type[] ConvertToFormats { get; } =
- {
- //typeof(UVJFile),
+ new("photons", "Chitubox PhotonS"),
};
public override PrintParameterModifier[] PrintParameterModifiers { get; } =
@@ -215,8 +210,8 @@ namespace UVtools.Core.FileFormats
PrintParameterModifier.BottomExposureSeconds,
PrintParameterModifier.ExposureSeconds,
- //PrintParameterModifier.BottomLayerOffTime,
- PrintParameterModifier.LayerOffTime,
+ //PrintParameterModifier.BottomLightOffDelay,
+ PrintParameterModifier.LightOffDelay,
//PrintParameterModifier.BottomLiftHeight,
//PrintParameterModifier.BottomLiftSpeed,
PrintParameterModifier.LiftHeight,
@@ -231,18 +226,13 @@ namespace UVtools.Core.FileFormats
public override uint ResolutionX
{
get => Header.ResolutionX;
- set
- {
-
- }
+ set { }
}
public override uint ResolutionY
{
get => Header.ResolutionY;
- set
- {
- }
+ set { }
}
public override float DisplayWidth
@@ -257,14 +247,24 @@ namespace UVtools.Core.FileFormats
set { }
}
- public override byte AntiAliasing => 1;
+ public override bool MirrorDisplay
+ {
+ get => true;
+ set { }
+ }
+
+ public override byte AntiAliasing
+ {
+ get => 1;
+ set { }
+ }
public override float LayerHeight
{
get => (float) Math.Round(HeaderSettings.LayerHeight);
set
{
- HeaderSettings.LayerHeight = value;
+ HeaderSettings.LayerHeight = (float)Math.Round(value, 2);
RaisePropertyChanged();
}
}
@@ -304,27 +304,17 @@ namespace UVtools.Core.FileFormats
get => (float)HeaderSettings.ExposureSeconds;
set
{
- HeaderSettings.ExposureSeconds = value;
+ HeaderSettings.ExposureSeconds = (float)Math.Round(value, 2);
RaisePropertyChanged();
}
}
- /*public override float BottomLayerOffTime
- {
- get => HeaderSettings.BottomLightOffDelayMs;
- set
- {
- HeaderSettings.BottomLightOffDelayMs = value;
- RaisePropertyChanged();
- }
- }*/
-
- public override float LayerOffTime
+ public override float LightOffDelay
{
- get => (float) HeaderSettings.LayerOffSeconds;
+ get => (float) HeaderSettings.LightOffDelay;
set
{
- HeaderSettings.LayerOffSeconds = value;
+ HeaderSettings.LightOffDelay = (float)Math.Round(value, 2);
RaisePropertyChanged();
}
}
@@ -344,7 +334,7 @@ namespace UVtools.Core.FileFormats
get => (float) HeaderSettings.LiftHeight;
set
{
- HeaderSettings.LiftHeight = value;
+ HeaderSettings.LiftHeight = (float)Math.Round(value, 2);
RaisePropertyChanged();
}
}
@@ -361,26 +351,26 @@ namespace UVtools.Core.FileFormats
public override float LiftSpeed
{
- get => (float) Math.Round(HeaderSettings.LiftSpeed * 60.0);
+ get => (float) Math.Round(HeaderSettings.LiftSpeed * 60.0, 2);
set
{
- HeaderSettings.LiftSpeed = Math.Round(value / 60.0);
+ HeaderSettings.LiftSpeed = Math.Round(value / 60.0, 2);
RaisePropertyChanged();
}
}
public override float RetractSpeed
{
- get => (float)Math.Round(HeaderSettings.RetractSpeed * 60.0);
+ get => (float)Math.Round(HeaderSettings.RetractSpeed * 60.0, 2);
set
{
- HeaderSettings.RetractSpeed = Math.Round(value / 60.0);
+ HeaderSettings.RetractSpeed = Math.Round(value / 60.0, 2);
RaisePropertyChanged();
}
}
- public override float UsedMaterial
+ public override float MaterialMilliliters
{
get => (float) HeaderSettings.Volume;
set
@@ -432,6 +422,8 @@ namespace UVtools.Core.FileFormats
}
public override void Encode(string fileFullPath, OperationProgress progress = null)
{
+ progress ??= new OperationProgress();
+ progress.Reset(OperationProgress.StatusEncodeLayers, LayerCount);
base.Encode(fileFullPath, progress);
//uint currentOffset = (uint)Helpers.Serializer.SizeOf(HeaderSettings);
@@ -601,10 +593,6 @@ namespace UVtools.Core.FileFormats
}
}
- public override bool Convert(Type to, string fileFullPath, OperationProgress progress = null)
- {
- return false;
- }
#endregion
}
}