diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-11-01 08:48:25 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-11-01 08:48:25 +0300 |
commit | 15094f96cc42a39f40a1f8182bb0bf6716b32db2 (patch) | |
tree | 2d4abd0abf20661b835bdd61859025ca7853007f | |
parent | 679f088811756a10d55deaa15ab69cbf534d8b87 (diff) |
v1.1.1v1.1.1
* (Fix) PHZ, PWS, LGS, SL1 and ZCodex per layer settings and implement missing properties on decode
* (Fix) LGS and PHZ Zip wasn't setting the position z per layer
* (Fix) Add missing ctb v3 per layer settings on edit parameters window
* (Fix) PWS per layer settings internal LiftSpeed was calculating in mm/min, changed to mm/sec
-rw-r--r-- | CHANGELOG.md | 9 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/CWSFile.cs | 8 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/ChituboxFile.cs | 7 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/ChituboxZipFile.cs | 14 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/FileFormat.cs | 10 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/LGSFile.cs | 10 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/PHZFile.cs | 6 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/PWSFile.cs | 10 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/PhotonSFile.cs | 10 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/SL1File.cs | 18 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/UVJFile.cs | 2 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/ZCodexFile.cs | 14 | ||||
-rw-r--r-- | UVtools.Core/UVtools.Core.csproj | 2 | ||||
-rw-r--r-- | UVtools.Installer/UVtools.Installer.wixproj | 2 | ||||
-rw-r--r-- | UVtools.WPF/UVtools.WPF.csproj | 2 |
15 files changed, 93 insertions, 31 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f0bd093..84c71e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 01/11/2020 - v1.1.1 + +* (Fix) PHZ, PWS, LGS, SL1 and ZCodex per layer settings and implement missing properties on decode +* (Fix) LGS and PHZ Zip wasn't setting the position z per layer +* (Fix) Add missing ctb v3 per layer settings on edit parameters window +* (Fix) PWS per layer settings internal LiftSpeed was calculating in mm/min, changed to mm/sec + ## 01/11/2020 - v1.1.0 * (Add) photons file format (Read-only) @@ -13,7 +20,7 @@ * (Improvement) Adapt every file format to accept per layer settings where possible * (Improvement) Better gcode checks and per layer settings parses * (Change) When converting to CTB, version 3 of the file will be used instead of version 2 -* (Change) When converting to photon or cbddlp, version 2 of the file will be used instead of version 2 +* (Change) When converting to photon or cbddlp, version 2 of the file will be used * (Change) New logo, thanks to (Vinicius Silva @photonsters) * (Fix) MSI installer was creating multiple entries/uninstallers on windows Apps and Features (#79) * (Fix) Release builder script (CreateRelease.WPF.ps1): Replace backslash with shash for zip releases (#82) diff --git a/UVtools.Core/FileFormats/CWSFile.cs b/UVtools.Core/FileFormats/CWSFile.cs index 66553b9..b1532da 100644 --- a/UVtools.Core/FileFormats/CWSFile.cs +++ b/UVtools.Core/FileFormats/CWSFile.cs @@ -612,16 +612,16 @@ namespace UVtools.Core.FileFormats if (Printer == PrinterType.Elfin) { - LayerManager[layerIndex] = + this[layerIndex] = new Layer(layerIndex, buffer, zipArchiveEntry.Name) { PositionZ = GetHeightFromLayer(layerIndex), + ExposureTime = exposureTime, LiftHeight = liftHeight, LiftSpeed = liftSpeed, RetractSpeed = retractSpeed, LayerOffTime = lightOffDelay, LightPWM = pwm, - ExposureTime = exposureTime, }; } else @@ -638,16 +638,16 @@ namespace UVtools.Core.FileFormats spanDecode[i] = span[i]; } - LayerManager[layerIndex] = + this[layerIndex] = new Layer(layerIndex, matDecode, zipArchiveEntry.Name) { PositionZ = GetHeightFromLayer(layerIndex), + ExposureTime = exposureTime, LiftHeight = liftHeight, LiftSpeed = liftSpeed, RetractSpeed = retractSpeed, LayerOffTime = lightOffDelay, LightPWM = pwm, - ExposureTime = exposureTime, }; } } diff --git a/UVtools.Core/FileFormats/ChituboxFile.cs b/UVtools.Core/FileFormats/ChituboxFile.cs index 9474940..2d38108 100644 --- a/UVtools.Core/FileFormats/ChituboxFile.cs +++ b/UVtools.Core/FileFormats/ChituboxFile.cs @@ -999,6 +999,9 @@ namespace UVtools.Core.FileFormats return new[] { PrintParameterModifier.ExposureSeconds, + PrintParameterModifier.LiftHeight, + PrintParameterModifier.LiftSpeed, + PrintParameterModifier.RetractSpeed, PrintParameterModifier.LayerOffTime, PrintParameterModifier.LightPWM, }; @@ -1557,7 +1560,11 @@ namespace UVtools.Core.FileFormats { PositionZ = LayerDefinitions[0, layerIndex].LayerPositionZ, ExposureTime = LayerDefinitions[0, layerIndex].LayerExposure, + LiftHeight = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftHeight, LiftHeight), + LiftSpeed = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftSpeed, LiftSpeed), + RetractSpeed = RetractSpeed, LayerOffTime = LayerDefinitions[0, layerIndex].LayerOffSeconds, + LightPWM = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLightPWM, LightPWM), }; if (!(LayerDefinitionsEx is null)) diff --git a/UVtools.Core/FileFormats/ChituboxZipFile.cs b/UVtools.Core/FileFormats/ChituboxZipFile.cs index d25075c..f1c1d08 100644 --- a/UVtools.Core/FileFormats/ChituboxZipFile.cs +++ b/UVtools.Core/FileFormats/ChituboxZipFile.cs @@ -461,7 +461,15 @@ namespace UVtools.Core.FileFormats if (IsPHZZip) // PHZ file { - LayerManager[layerIndex] = new Layer(layerIndex, entry.Open(), entry.Name); + this[layerIndex] = new Layer(layerIndex, entry.Open(), entry.Name) + { + PositionZ = GetHeightFromLayer(layerIndex), + ExposureTime = GetInitialLayerValueOrNormal(layerIndex, BottomExposureTime, ExposureTime), + LiftHeight = GetInitialLayerValueOrNormal(layerIndex, BottomLiftHeight, LiftHeight), + LiftSpeed = GetInitialLayerValueOrNormal(layerIndex, BottomLiftSpeed, LiftSpeed), + RetractSpeed = RetractSpeed, + LightPWM = GetInitialLayerValueOrNormal(layerIndex, BottomLightPWM, LightPWM), + }; progress++; continue;; } @@ -537,15 +545,15 @@ namespace UVtools.Core.FileFormats } } - LayerManager[layerIndex] = new Layer(layerIndex, entry.Open(), entry.Name) + this[layerIndex] = new Layer(layerIndex, entry.Open(), entry.Name) { PositionZ = posZ, + ExposureTime = exposureTime, LiftHeight = liftHeight, LiftSpeed = liftSpeed, RetractSpeed = retractSpeed, LayerOffTime = lightOffDelay, LightPWM = pwm, - ExposureTime = exposureTime, }; progress++; } diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs index f7841a7..ec336d2 100644 --- a/UVtools.Core/FileFormats/FileFormat.cs +++ b/UVtools.Core/FileFormats/FileFormat.cs @@ -406,11 +406,11 @@ namespace UVtools.Core.FileFormats public virtual float ExposureTime { get; set; } public virtual float BottomLayerOffTime { get; set; } public virtual float LayerOffTime { get; set; } - public virtual float BottomLiftHeight { get; set; } - public virtual float LiftHeight { get; set; } - public virtual float BottomLiftSpeed { get; set; } - public virtual float LiftSpeed { get; set; } - public virtual float RetractSpeed { get; set; } + public virtual float BottomLiftHeight { get; set; } = 5; + public virtual float LiftHeight { get; set; } = 5; + public virtual float BottomLiftSpeed { get; set; } = 100; + public virtual float LiftSpeed { get; set; } = 100; + public virtual float RetractSpeed { get; set; } = 100; public virtual byte BottomLightPWM { get; set; } = 255; public virtual byte LightPWM { get; set; } = 255; diff --git a/UVtools.Core/FileFormats/LGSFile.cs b/UVtools.Core/FileFormats/LGSFile.cs index c944cb0..15c1c40 100644 --- a/UVtools.Core/FileFormats/LGSFile.cs +++ b/UVtools.Core/FileFormats/LGSFile.cs @@ -545,7 +545,15 @@ namespace UVtools.Core.FileFormats using (var image = layerData[layerIndex].Decode()) { - this[layerIndex] = new Layer((uint) layerIndex, image); + this[layerIndex] = new Layer((uint) layerIndex, image) + { + PositionZ = GetHeightFromLayer((uint)layerIndex), + ExposureTime = GetInitialLayerValueOrNormal((uint)layerIndex, BottomExposureTime, ExposureTime), + LiftHeight = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftHeight, LiftHeight), + LiftSpeed = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftSpeed, LiftSpeed), + RetractSpeed = RetractSpeed, + LightPWM = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLightPWM, LightPWM), + }; lock (progress.Mutex) { diff --git a/UVtools.Core/FileFormats/PHZFile.cs b/UVtools.Core/FileFormats/PHZFile.cs index cf03057..012d0e7 100644 --- a/UVtools.Core/FileFormats/PHZFile.cs +++ b/UVtools.Core/FileFormats/PHZFile.cs @@ -1163,7 +1163,11 @@ namespace UVtools.Core.FileFormats { PositionZ = LayersDefinitions[layerIndex].LayerPositionZ, ExposureTime = LayersDefinitions[layerIndex].LayerExposure, - LayerOffTime = LayersDefinitions[layerIndex].LayerOffTimeSeconds + LiftHeight = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftHeight, LiftHeight), + LiftSpeed = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftSpeed, LiftSpeed), + RetractSpeed = RetractSpeed, + LayerOffTime = LayersDefinitions[layerIndex].LayerOffTimeSeconds, + LightPWM = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLightPWM, LightPWM), }; } diff --git a/UVtools.Core/FileFormats/PWSFile.cs b/UVtools.Core/FileFormats/PWSFile.cs index eb0c0b5..91cd29c 100644 --- a/UVtools.Core/FileFormats/PWSFile.cs +++ b/UVtools.Core/FileFormats/PWSFile.cs @@ -406,7 +406,7 @@ namespace UVtools.Core.FileFormats LayerPositionZ = Parent[layerIndex].PositionZ; LayerExposure = Parent[layerIndex].ExposureTime; LiftHeight = Parent[layerIndex].LiftHeight; - LiftSpeed = Parent[layerIndex].LiftSpeed; + LiftSpeed = (float) Math.Round(Parent[layerIndex].LiftSpeed / 60, 2); } public Mat Decode(bool consumeData = true) @@ -1153,7 +1153,9 @@ namespace UVtools.Core.FileFormats PositionZ = LayersDefinition[(uint)layerIndex].LayerPositionZ, ExposureTime = LayersDefinition[(uint)layerIndex].LayerExposure, LiftHeight = LayersDefinition[(uint)layerIndex].LiftHeight, - LiftSpeed = LayersDefinition[(uint)layerIndex].LiftSpeed, + LiftSpeed = (float)Math.Round(LayersDefinition[(uint)layerIndex].LiftSpeed * 60, 2), + RetractSpeed = RetractSpeed, + LightPWM = GetInitialLayerValueOrNormal((uint) layerIndex, BottomLightPWM, LightPWM) }; } @@ -1219,8 +1221,8 @@ namespace UVtools.Core.FileFormats LayerHeight = LayerHeight, LayerExposureTime = ExposureTime, LiftHeight = LiftHeight, - LiftSpeed = LiftSpeed / 60, - RetractSpeed = RetractSpeed / 60, + LiftSpeed = LiftSpeed, + RetractSpeed = RetractSpeed, LayerOffTime = HeaderSettings.LayerOffTime, BottomLayersCount = BottomLayerCount, BottomExposureSeconds = BottomExposureTime, diff --git a/UVtools.Core/FileFormats/PhotonSFile.cs b/UVtools.Core/FileFormats/PhotonSFile.cs index 6964522..4243edb 100644 --- a/UVtools.Core/FileFormats/PhotonSFile.cs +++ b/UVtools.Core/FileFormats/PhotonSFile.cs @@ -512,7 +512,15 @@ namespace UVtools.Core.FileFormats using (var image = layerData[layerIndex].Decode()) { - this[layerIndex] = new Layer((uint) layerIndex, image); + this[layerIndex] = new Layer((uint) layerIndex, image) + { + PositionZ = GetHeightFromLayer((uint)layerIndex), + ExposureTime = GetInitialLayerValueOrNormal((uint)layerIndex, BottomExposureTime, ExposureTime), + LiftHeight = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftHeight, LiftHeight), + LiftSpeed = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLiftSpeed, LiftSpeed), + RetractSpeed = RetractSpeed, + LightPWM = GetInitialLayerValueOrNormal((uint)layerIndex, BottomLightPWM, LightPWM), + }; lock (progress.Mutex) { diff --git a/UVtools.Core/FileFormats/SL1File.cs b/UVtools.Core/FileFormats/SL1File.cs index db1123f..e85161e 100644 --- a/UVtools.Core/FileFormats/SL1File.cs +++ b/UVtools.Core/FileFormats/SL1File.cs @@ -586,6 +586,16 @@ namespace UVtools.Core.FileFormats } } + BottomLiftHeight = LookupCustomValue<float>(Keyword_BottomLiftHeight, 5); + BottomLiftSpeed = LookupCustomValue<float>(Keyword_BottomLiftSpeed, 100); + LiftHeight = LookupCustomValue<float>(Keyword_LiftHeight, 5); + LiftSpeed = LookupCustomValue<float>(Keyword_LiftSpeed, 100); + RetractSpeed = LookupCustomValue<float>(Keyword_RetractSpeed, 100); + BottomLayerOffTime = LookupCustomValue<float>(Keyword_BottomLightOffDelay, 0); + LayerOffTime = LookupCustomValue<float>(Keyword_LayerOffTime, 0); + BottomLightPWM = LookupCustomValue<byte>(Keyword_BottomLightPWM, 255); + LightPWM = LookupCustomValue<byte>(Keyword_LightPWM, 255); + LayerManager = new LayerManager((uint) (OutputConfigSettings.NumSlow + OutputConfigSettings.NumFast), this); progress.ItemCount = LayerCount; @@ -616,10 +626,14 @@ namespace UVtools.Core.FileFormats // - .png - 5 numbers string layerStr = entity.Name.Substring(entity.Name.Length - 4 - 5, 5); uint iLayer = uint.Parse(layerStr); - LayerManager[iLayer] = new Layer(iLayer, entity.Open(), entity.Name) + this[iLayer] = new Layer(iLayer, entity.Open(), entity.Name) { PositionZ = GetHeightFromLayer(iLayer), - ExposureTime = GetInitialLayerValueOrNormal(iLayer, BottomExposureTime, ExposureTime) + ExposureTime = GetInitialLayerValueOrNormal(iLayer, BottomExposureTime, ExposureTime), + LiftHeight = GetInitialLayerValueOrNormal(iLayer, BottomLiftHeight, LiftHeight), + LiftSpeed = GetInitialLayerValueOrNormal(iLayer, BottomLiftSpeed, LiftSpeed), + RetractSpeed = RetractSpeed, + LightPWM = GetInitialLayerValueOrNormal(iLayer, BottomLightPWM, LightPWM), }; progress.ProcessedItems++; } diff --git a/UVtools.Core/FileFormats/UVJFile.cs b/UVtools.Core/FileFormats/UVJFile.cs index a9fa09c..e900672 100644 --- a/UVtools.Core/FileFormats/UVJFile.cs +++ b/UVtools.Core/FileFormats/UVJFile.cs @@ -476,7 +476,7 @@ namespace UVtools.Core.FileFormats entry = inputFile.GetEntry($"{FolderImageName}/{layerIndex:D8}.png"); if (ReferenceEquals(entry, null)) continue; - LayerManager[layerIndex] = new Layer(layerIndex, entry.Open(), entry.Name) + this[layerIndex] = new Layer(layerIndex, entry.Open(), entry.Name) { PositionZ = JsonSettings.Layers.Count >= layerIndex ? JsonSettings.Layers[(int) layerIndex].Z : GetHeightFromLayer(layerIndex), LiftHeight = JsonSettings.Layers.Count >= layerIndex ? JsonSettings.Layers[(int)layerIndex].Exposure.LiftHeight : GetInitialLayerValueOrNormal(layerIndex, BottomLiftHeight, LiftHeight), diff --git a/UVtools.Core/FileFormats/ZCodexFile.cs b/UVtools.Core/FileFormats/ZCodexFile.cs index c6c0ba9..7e65646 100644 --- a/UVtools.Core/FileFormats/ZCodexFile.cs +++ b/UVtools.Core/FileFormats/ZCodexFile.cs @@ -326,14 +326,14 @@ namespace UVtools.Core.FileFormats if (lastZPosition != layer.PositionZ) { - if (LiftHeight > 0) + if (layer.LiftHeight > 0) { - GCode.AppendLine($"G1 Z{LiftHeight} F{LiftSpeed}"); - GCode.AppendLine($"G1 Z-{Math.Round(LiftHeight - layer.PositionZ + lastZPosition, 2)} F{RetractSpeed}"); + GCode.AppendLine($"G1 Z{layer.LiftHeight} F{layer.LiftSpeed}"); + GCode.AppendLine($"G1 Z-{Math.Round(layer.LiftHeight - layer.PositionZ + lastZPosition, 2)} F{layer.RetractSpeed}"); } else { - GCode.AppendLine($"G1 Z{Math.Round(layer.PositionZ- lastZPosition, 2)} F{LiftSpeed}"); + GCode.AppendLine($"G1 Z{Math.Round(layer.PositionZ- lastZPosition, 2)} F{layer.LiftSpeed}"); } } /*else @@ -488,7 +488,11 @@ M106 S0 this[layerIndex] = new Layer((uint) layerIndex, LayersSettings[layerIndex].LayerEntry.Open(), LayersSettings[layerIndex].LayerEntry.Name) { PositionZ = currentHeight, - ExposureTime = GetInitialLayerValueOrNormal((uint) layerIndex, BottomExposureTime, ExposureTime) + ExposureTime = GetInitialLayerValueOrNormal((uint) layerIndex, BottomExposureTime, ExposureTime), + LiftHeight = GetInitialLayerValueOrNormal((uint) layerIndex, BottomLiftHeight, LiftHeight), + LiftSpeed = GetInitialLayerValueOrNormal((uint) layerIndex, BottomLiftSpeed, LiftSpeed), + RetractSpeed = RetractSpeed, + LightPWM = GetInitialLayerValueOrNormal((uint) layerIndex, BottomLightPWM, LightPWM), }; layerIndex++; diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index dcd4d34..f72f755 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.1.0</Version> + <Version>1.1.1</Version> <Copyright>Copyright © 2020 PTRTECH</Copyright> <PackageIcon>UVtools.png</PackageIcon> <Platforms>AnyCPU;x64</Platforms> diff --git a/UVtools.Installer/UVtools.Installer.wixproj b/UVtools.Installer/UVtools.Installer.wixproj index 38a61f3..f342739 100644 --- a/UVtools.Installer/UVtools.Installer.wixproj +++ b/UVtools.Installer/UVtools.Installer.wixproj @@ -14,7 +14,7 @@ <!-- If MSIProductVersion still not known, try to get it from TFBuild Environments (V.Next Builds)--> <MSIProductVersion Condition=" '$(MSIProductVersion)' == '' ">$([System.Text.RegularExpressions.Regex]::Match($(BUILD_BUILDNUMBER), "\d+.\d+.\d+.\d+"))</MSIProductVersion> <!-- If MSIProductVersion still not known, default to lowerbound 0.0.1 for developer builds.--> - <MSIProductVersion Condition=" '$(MSIProductVersion)' == '' ">1.1.0</MSIProductVersion> + <MSIProductVersion Condition=" '$(MSIProductVersion)' == '' ">1.1.1</MSIProductVersion> <!-- The following allows one cert to be referenced from the certificate store for self-signing in localbuilds and another cert to be passed in during official builds. --> <AppxCertificateThumbprint Condition=" '$(AppxCertificateThumbprint)' == '' "> </AppxCertificateThumbprint> diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj index c67a1ff..ad92e14 100644 --- a/UVtools.WPF/UVtools.WPF.csproj +++ b/UVtools.WPF/UVtools.WPF.csproj @@ -13,7 +13,7 @@ <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <RepositoryType>Git</RepositoryType> <Nullable>enable</Nullable> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |