aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs34
1 files changed, 27 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index c34edf8f1..943afa21a 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -211,6 +211,11 @@ namespace Tango.Integration.Operation
/// </summary>
public JobUploadStrategy JobUploadStrategy { get; set; }
+ /// <summary>
+ /// Gets or sets the job number of units duplication method.
+ /// </summary>
+ public JobUnitsMethods JobUnitsMethod { get; set; }
+
private MachineStatuses _status;
/// <summary>
/// Gets the current machine status.
@@ -1364,12 +1369,6 @@ namespace Tango.Integration.Operation
var jobSegments = job.OrderedSegments;
- //Check not brush stop has color space 'Volume'.
- if (jobSegments.SelectMany(x => x.BrushStops).ToList().Exists(x => x.ColorSpace.Code == ColorSpaces.Volume.ToInt32()))
- {
- throw new InvalidOperationException("Cannot print a brush stop with volume color space when process parameters table has not been specified.");
- }
-
if (job.Rml == null)
{
throw new NullReferenceException("Job RML is null");
@@ -1477,6 +1476,10 @@ namespace Tango.Integration.Operation
throw new InvalidOperationException($"No catalog item specified for segment color.");
}
}
+ else if (stop.BrushColorSpace == ColorSpaces.Volume)
+ {
+ stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters);
+ }
else
{
throw new InvalidOperationException($"Unsupported color space {stop.BrushColorSpace}.");
@@ -1556,6 +1559,12 @@ namespace Tango.Integration.Operation
ticket.EnableLubrication = job.EnableLubrication;
ticket.Length = job.Length;
ticket.WindingMethod = (JobWindingMethod)job.WindingMethod.Code;
+
+ if (JobUnitsMethod == JobUnitsMethods.Device)
+ {
+ ticket.NumberOfUnits = (uint)job.NumberOfUnits;
+ }
+
ticket.Spool = new JobSpool();
job.SpoolType.MapPrimitivesTo(ticket.Spool);
@@ -1662,7 +1671,18 @@ namespace Tango.Integration.Operation
var segs = new List<JobSegment>();
- for (int i = 0; i < job.NumberOfUnits; i++)
+ if (JobUnitsMethod == JobUnitsMethods.Operator)
+ {
+ for (int i = 0; i < job.NumberOfUnits; i++)
+ {
+ foreach (var s in ticket.Segments)
+ {
+ var cloned = s.Clone();
+ segs.Add(cloned);
+ }
+ }
+ }
+ else
{
foreach (var s in ticket.Segments)
{