diff options
Diffstat (limited to 'UVtools.Core/Operations/OperationCalculator.cs')
-rw-r--r-- | UVtools.Core/Operations/OperationCalculator.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/UVtools.Core/Operations/OperationCalculator.cs b/UVtools.Core/Operations/OperationCalculator.cs index 0070d17..68aa251 100644 --- a/UVtools.Core/Operations/OperationCalculator.cs +++ b/UVtools.Core/Operations/OperationCalculator.cs @@ -8,6 +8,7 @@ using System; using System.Drawing; +using UVtools.Core.FileFormats; using UVtools.Core.Objects; namespace UVtools.Core.Operations @@ -15,6 +16,7 @@ namespace UVtools.Core.Operations [Serializable] public class OperationCalculator : Operation { + #region Overrides public override string Title => "Calculator"; public override string Description => null; @@ -28,15 +30,31 @@ namespace UVtools.Core.Operations public override bool CanROI => false; public override bool CanHaveProfiles => false; + #endregion + #region Properties public MillimetersToPixels CalcMillimetersToPixels { get; set; } public LightOffDelayC CalcLightOffDelay { get; set; } public OptimalModelTilt CalcOptimalModelTilt { get; set; } + #endregion - public OperationCalculator() + #region Constructor + + public OperationCalculator() { } + + public OperationCalculator(FileFormat slicerFile) : base(slicerFile) { + CalcMillimetersToPixels = new MillimetersToPixels(slicerFile.Resolution, slicerFile.Display); + CalcLightOffDelay = new LightOffDelayC( + (decimal) SlicerFile.LiftHeight, (decimal) slicerFile.BottomLiftHeight, + (decimal) SlicerFile.LiftSpeed, (decimal) slicerFile.BottomLiftSpeed, + (decimal) SlicerFile.RetractSpeed, (decimal) slicerFile.RetractSpeed); + CalcOptimalModelTilt = new OptimalModelTilt(slicerFile.Resolution, slicerFile.Display, + (decimal) slicerFile.LayerHeight); } + #endregion + public abstract class Calculation : BindableBase { public abstract string Description { get; } |