diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-02-17 08:26:53 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-02-17 08:26:53 +0300 |
commit | f1dea71c601ccb6472cb32480d6bc57572d03809 (patch) | |
tree | 6e289d0e1fd3a6dbb380dcedd2ef5236aaec7f2b /UVtools.Core/FileFormats/FDGFile.cs | |
parent | f69a0f1175603e87558e0587e5a29ea882ef7e9b (diff) |
v2.4.7v2.4.7
* (Add) Computed used material milliliters for each layer, it will dynamic change if pixels are added or subtracted
* (Add) Computed used material milliliters for whole model, it will dynamic change if pixels are added or subtracted
* (Improvement) Round cost, material ml and grams from 2 to 3 decimals
* (Improvement) Operation profiles: Allow to save and get a custom layer range instead of pre-defined ranges
* **(Improvement)** PhotonWorkshop files: (#149)
* Fill in the display width, height and MaxZ values for the printers
* Fill in the xy pixel size values for the printers
* Change ResinType to PriceCurrencyDec and Add PriceCurrencySymbol
* Change Offset1 on header to PrintTime
* Change Offset1 on layer table as NonZeroPixelCount, the number of white pixels on the layer
* Fix LayerPositionZ to calculate the correct value based on each layer height and fix internal layer layer height which was been set to position z
* Force PerLayerOverride to be always 1 after save the file
* (Fix) Actions - Remove and clone layers was selecting all layer range instead of the current layer
* (Fix) Redo last action was not getting back the layer range on some cases
Diffstat (limited to 'UVtools.Core/FileFormats/FDGFile.cs')
-rw-r--r-- | UVtools.Core/FileFormats/FDGFile.cs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/UVtools.Core/FileFormats/FDGFile.cs b/UVtools.Core/FileFormats/FDGFile.cs index 53d5bd1..8a3971b 100644 --- a/UVtools.Core/FileFormats/FDGFile.cs +++ b/UVtools.Core/FileFormats/FDGFile.cs @@ -935,30 +935,35 @@ namespace UVtools.Core.FileFormats public override float MaterialMilliliters { - get => (float) Math.Round(HeaderSettings.VolumeMl, 2); + get + { + var materialMl = base.MaterialMilliliters; + return materialMl > 0 ? materialMl : HeaderSettings.VolumeMl; + } set { - HeaderSettings.VolumeMl = (float)Math.Round(value, 2); - RaisePropertyChanged(); + if (value <= 0) value = base.MaterialMilliliters; + HeaderSettings.VolumeMl = (float)Math.Round(value, 3); + base.MaterialMilliliters = HeaderSettings.VolumeMl; } } public override float MaterialGrams { - get => HeaderSettings.WeightG; + get => (float)Math.Round(HeaderSettings.WeightG, 3); set { - HeaderSettings.WeightG = (float)Math.Round(value, 2); + HeaderSettings.WeightG = (float)Math.Round(value, 3); RaisePropertyChanged(); } } public override float MaterialCost { - get => (float) Math.Round(HeaderSettings.CostDollars, 2); + get => (float) Math.Round(HeaderSettings.CostDollars, 3); set { - HeaderSettings.CostDollars = (float)Math.Round(value, 2); + HeaderSettings.CostDollars = (float)Math.Round(value, 3); RaisePropertyChanged(); } } |