* (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
This commit is contained in:
Tiago Conceição
2020-11-01 05:48:25 +00:00
parent 679f088811
commit 15094f96cc
15 changed files with 93 additions and 31 deletions
+8 -1
View File
@@ -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)
+4 -4
View File
@@ -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,
};
}
}
+7
View File
@@ -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))
+11 -3
View File
@@ -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++;
}
+5 -5
View File
@@ -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;
+9 -1
View File
@@ -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)
{
+5 -1
View File
@@ -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),
};
}
+6 -4
View File
@@ -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,
+9 -1
View File
@@ -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)
{
+16 -2
View File
@@ -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++;
}
+1 -1
View File
@@ -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),
+9 -5
View File
@@ -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++;
+1 -1
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, 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>
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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>