aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-13 17:16:43 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-13 17:16:43 +0200
commit97ea085d1fac43aedc5258486ef355eb13abc195 (patch)
tree56926888c8d35fcafd8d4b4e8db2aed9be52feba /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
parentd9a89773f2f283fbf5596799dd4d50d231817203 (diff)
downloadTango-97ea085d1fac43aedc5258486ef355eb13abc195.tar.gz
Tango-97ea085d1fac43aedc5258486ef355eb13abc195.zip
Fixed issues in segment indices !!!
Fixed issue with PPC fine tuning. Added support to Twine & Panton in color conversion.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs39
1 files changed, 13 insertions, 26 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 63a19dcac..991442510 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -764,23 +764,6 @@ namespace Tango.Integration.Operation
CurrentProcessParameters = processParameters;
- if (job.NumberOfUnits < 1)
- {
- job.NumberOfUnits = 1;
- }
-
- job = job.Clone();
-
- var segments = job.Segments.ToList();
-
- for (int i = 0; i < job.NumberOfUnits - 1; i++)
- {
- foreach (var s in segments)
- {
- job.Segments.Add(s);
- }
- }
-
var request = new ResumeCurrentJobRequest();
JobHandler handler = null;
@@ -981,7 +964,7 @@ namespace Tango.Integration.Operation
handler.RaiseStatusReceived(response.Message.Status);
- if (!responseLogged && segment == job.Segments.First())
+ if (!responseLogged && segment == job.OrderedSegments.First())
{
responseLogged = true;
Status = MachineStatuses.Printing;
@@ -1009,7 +992,7 @@ namespace Tango.Integration.Operation
}
}, () =>
{
- if (segment == job.Segments.Last())
+ if (segment == job.OrderedSegments.Last())
{
Status = MachineStatuses.ReadyToDye;
PrintingCompleted?.Invoke(this, new PrintingEventArgs(handler, handler.Job));
@@ -1019,7 +1002,7 @@ namespace Tango.Integration.Operation
{
handler.RaiseSpoolChangeRequired(() =>
{
- ContinueSingleSpoolJob(job.Segments[job.Segments.IndexOf(segment) + 1], job, processParameters, handler);
+ ContinueSingleSpoolJob(segment.GetNextSegment(), job, processParameters, handler);
},() =>
{
PrintingAborted?.Invoke(this, new PrintingEventArgs(handler, handler.Job));
@@ -1198,13 +1181,17 @@ namespace Tango.Integration.Operation
job = job.Clone();
- var segments = job.Segments.ToList();
+ int max = job.OrderedSegments.Last().SegmentIndex;
+
+ var segments = job.OrderedSegments.ToList();
for (int i = 0; i < job.NumberOfUnits - 1; i++)
{
foreach (var s in segments)
{
- job.Segments.Add(s);
+ var cloned = s.Clone(job);
+ cloned.SegmentIndex = max++;
+ job.Segments.Add(cloned);
}
}
@@ -1223,7 +1210,7 @@ namespace Tango.Integration.Operation
processParameters.MapPrimitivesTo(process);
ticket.ProcessParameters = process;
- foreach (var segment in job.Segments)
+ foreach (var segment in job.OrderedSegments)
{
ticket.Segments.Add(CreatePMRJobSegment(segment, job, processParameters));
}
@@ -1253,7 +1240,7 @@ namespace Tango.Integration.Operation
if (!job.IsAllSegmentsPerSpool)
{
- ContinueSingleSpoolJob(job.Segments.First(), job, processParameters, handler);
+ ContinueSingleSpoolJob(job.OrderedSegments.First(), job, processParameters, handler);
return handler;
}
@@ -1385,7 +1372,7 @@ namespace Tango.Integration.Operation
job = job.Clone();
- var segments = job.Segments.ToList();
+ var segments = job.OrderedSegments.ToList();
for (int i = 0; i < job.NumberOfUnits - 1; i++)
{
@@ -1410,7 +1397,7 @@ namespace Tango.Integration.Operation
processParameters.MapPrimitivesTo(process);
ticket.ProcessParameters = process;
- foreach (var segment in job.Segments)
+ foreach (var segment in job.OrderedSegments)
{
JobSegment jobSegment = new JobSegment();
jobSegment.Length = segment.LengthWithFactor;