diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-07-19 19:23:20 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-07-19 19:23:20 +0300 |
| commit | 2e37232fd2055ff0556c43c6f3f68e5ac427f2f6 (patch) | |
| tree | 3660b930797d107ab8c1e0196a1532e0a93bb239 /Software | |
| parent | f50460802d51aef55de52eb5d14f1119aa9febd2 (diff) | |
| download | Tango-2e37232fd2055ff0556c43c6f3f68e5ac427f2f6.tar.gz Tango-2e37232fd2055ff0556c43c6f3f68e5ac427f2f6.zip | |
Improved fix for incorrect final nl/cm calc.
Diffstat (limited to 'Software')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 6355997f7..7dc60ec73 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -1920,10 +1920,10 @@ namespace Tango.Integration.Operation jobStop.OffsetPercent = stop.OffsetPercent; jobStop.OffsetMeters = stop.OffsetMeters; - //if (stop.LiquidVolumes == null) - //{ - stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); - //} + if (stop.LiquidVolumes == null) + { + stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); + } foreach (var liquidVolume in stop.LiquidVolumes) { @@ -2522,6 +2522,18 @@ namespace Tango.Integration.Operation { throw new NullReferenceException("Could not locate any process parameters table in group " + processGroup.Name + " for RML " + job.Rml.Name); } + + try + { + foreach (var stop in job.Segments.SelectMany(x => x.BrushStops).ToList()) + { + stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); + } + } + catch (Exception ex) + { + throw LogManager.Log(new InvalidOperationException($"An error occurred while trying to apply final liquid volumes.\n{ex.Message}")); + } }); return await Print(job, processParameters, config); |
