diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-08-18 19:32:37 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-08-18 19:32:37 +0300 |
commit | 79f6aea3eee7c8310f80bab494178946b6cd47c9 (patch) | |
tree | c517720aaf6845e7a5a18fe99251bfa2d3afc650 /UVtools.Core | |
parent | 95020ce2f103b781d65318059adc6768e16e4a6f (diff) |
Update FileFormat.cs
When converting from a TSMC-able file to an TSMC-unable file, the LiftHeight will be set to the total lift (1+2) as fail-safe guard
Diffstat (limited to 'UVtools.Core')
-rw-r--r-- | UVtools.Core/FileFormats/FileFormat.cs | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs index b0eaa67..d0e210d 100644 --- a/UVtools.Core/FileFormats/FileFormat.cs +++ b/UVtools.Core/FileFormats/FileFormat.cs @@ -3313,23 +3313,40 @@ namespace UVtools.Core.FileFormats slicerFile.BottomExposureTime = BottomExposureTime; slicerFile.ExposureTime = ExposureTime; - // Lift - slicerFile.BottomLiftHeight = BottomLiftHeight; + // Lifts + if (slicerFile.CanUseAnyLiftHeight2 && CanUseAnyLiftHeight2) // Both are TSMC compatible + { + slicerFile.BottomLiftHeight = BottomLiftHeight; + slicerFile.LiftHeight = LiftHeight; + + slicerFile.BottomLiftHeight2 = BottomLiftHeight2; + slicerFile.LiftHeight2 = LiftHeight2; + + slicerFile.BottomRetractHeight2 = BottomRetractHeight2; + slicerFile.RetractHeight2 = RetractHeight2; + } + else if (slicerFile.CanUseAnyLiftHeight2) // Output format is compatible with TSMC, but input isn't + { + slicerFile.BottomLiftHeight = BottomLiftHeight; + slicerFile.LiftHeight = LiftHeight; + } + else if (CanUseAnyLiftHeight2) // Output format isn't compatible with TSMC, but input is + { + slicerFile.BottomLiftHeight = BottomLiftHeightTotal; + slicerFile.LiftHeight = LiftHeightTotal; + } + + slicerFile.BottomLiftSpeed = BottomLiftSpeed; - slicerFile.LiftHeight = LiftHeight; slicerFile.LiftSpeed = LiftSpeed; - slicerFile.BottomLiftHeight2 = BottomLiftHeight2; slicerFile.BottomLiftSpeed2 = BottomLiftSpeed2; - slicerFile.LiftHeight2 = LiftHeight2; slicerFile.LiftSpeed2 = LiftSpeed2; slicerFile.BottomRetractSpeed = BottomRetractSpeed; slicerFile.RetractSpeed = RetractSpeed; - slicerFile.BottomRetractHeight2 = BottomRetractHeight2; slicerFile.BottomRetractSpeed2 = BottomRetractSpeed2; - slicerFile.RetractHeight2 = RetractHeight2; slicerFile.RetractSpeed2 = RetractSpeed2; // Wait times |