Ejemplo n.º 1
0
        public void testStationMapStrip()
        {
            n.setType(EnumType.Stripping);
            JDFBinderySignature bs      = (JDFBinderySignature)n.addResource(ElementName.BINDERYSIGNATURE, null);
            JDFDieLayout        dl      = bs.appendDieLayout();
            JDFStation          station = dl.appendStation();

            station.setStationName("Lid");
            station.setStationAmount(9);
            station = dl.appendStation();
            station.setStationName("Box");
            station.setStationAmount(3);
            JDFResource sm = n.addResource("StationMap", EnumResourceClass.Parameter, null, null, null, null, null);

            sm.setXMLComment("The partition structure should reflect the product structure ");
            JDFResource sm1 = sm.addPartition(EnumPartIDKey.PartVersion, "Strawberry");

            sm1.setAttribute("StationName", "Lid");
            sm1.setAttribute("MapAmount", "3");
            sm1.setAttribute("StationIndex", "0 1 2");
            sm1.setXMLComment("3*Strawberry MUST be placed on station index 0-2");

            sm1 = sm.addPartition(EnumPartIDKey.PartVersion, "Blueberry");
            sm1.setAttribute("StationName", "Lid");
            sm1.setAttribute("MapAmount", "2");
            sm1.setXMLComment("2*Blueberry can be placed on any remaining lid station");

            sm1 = sm.addPartition(EnumPartIDKey.PartVersion, "Cherry");
            sm1.setAttribute("StationName", "Lid");
            sm1.setAttribute("MapAmount", "4");
            sm1.setXMLComment("4*Cherry can be placed on any remaining lid station");

            dl.refElement(sm);

            d.write2File(sm_dirTestDataTemp + "StationMapStripping.jdf", 2, false);
        }
Ejemplo n.º 2
0
        public virtual void testCombinedVarnish()
        {
            JDFElement.setLongID(false);
            JDFDoc  d            = new JDFDoc("JDF");
            JDFNode n            = d.getJDFRoot();
            VString vCombiNodes  = new VString("ConventionalPrinting Varnishing", " ");
            VString vSeparations = new VString("Cyan Magenta Yellow Black Varnish", " ");

            n.setCombined(vCombiNodes);

            JDFConventionalPrintingParams cpp = (JDFConventionalPrintingParams)n.addResource(ElementName.CONVENTIONALPRINTINGPARAMS, null, EnumUsage.Input, null, null, null, null);

            cpp.setModuleAvailableIndex(new JDFIntegerRangeList("1 ~ 6"));
            cpp.setModuleIndex(new JDFIntegerRangeList("1 ~ 4 6"));
            cpp.appendXMLComment("Module 0 and 7 are varnishing modules, 1-4 are process colors and 6 is the ink module used to varnish", null);
            n.appendMatchingResource("Component", JDFNode.EnumProcessUsage.AnyOutput, null);
            JDFExposedMedia xm = (JDFExposedMedia)n.appendMatchingResource("ExposedMedia", JDFNode.EnumProcessUsage.Plate, null);

            n.appendNodeInfo();
            JDFMedia media = xm.appendMedia();

            media.setMediaType(EnumMediaType.Plate);
            JDFInk ink = (JDFInk)n.appendMatchingResource("Ink", JDFNode.EnumProcessUsage.AnyInput, null);

            JDFResource     vp           = n.addResource("VarnishingParams", EnumResourceClass.Parameter, EnumUsage.Input, null, null, null, null);
            JDFExposedMedia xmVarnish    = (JDFExposedMedia)n.addResource("ExposedMedia", null, EnumUsage.Input, null, null, null, null);
            JDFMedia        mediaVarnish = xmVarnish.appendMedia();

            mediaVarnish.setAttribute("MediaType", "Sleeve");

            JDFResourceLink    rl = n.getLink(xmVarnish, null);
            JDFColorantControl cc = (JDFColorantControl)n.appendMatchingResource(ElementName.COLORANTCONTROL, JDFNode.EnumProcessUsage.AnyInput, null);

            cc.getCreateDeviceColorantOrder().appendXMLComment("Should the VarnishingParams seps be excluded, as is shown here?", null);
            cc.getCreateDeviceColorantOrder().setSeparations(vSeparations);

            rl.setCombinedProcessIndex(new JDFIntegerList("1"));
            vSeparations.addAll(new VString("PreVarnish Varnish2", " "));

            for (int i = 0; i < vSeparations.Count; i++)
            {
                string sep = vSeparations.stringAt(i);
                ink.addPartition(EnumPartIDKey.Separation, sep);
                if (!sep.Equals("PreVarnish") && !sep.Equals("Varnish2"))
                {
                    xm.addPartition(EnumPartIDKey.Separation, sep);
                }
                if (sep.Equals("Varnish2"))
                {
                    vp.appendXMLComment("full varnishing in a varnishing module with or wihtout a sleeve. Full varnishing means to cover the complete media surface.", null);
                    xmVarnish.addPartition(EnumPartIDKey.Separation, sep);
                    JDFResource varnishPart = vp.addPartition(EnumPartIDKey.Separation, sep);
                    varnishPart.setAttribute("ModuleIndex", "7");
                    varnishPart.setAttribute("VarnishMethod", "Sleeve");
                    varnishPart.setAttribute("VarnishArea", "Spot");
                }
                else if (sep.Equals("Varnish"))
                {
                    vp.appendXMLComment("varnishing in a printing module only  with a mandatory plate. The plate may be exposed or not, for example,  for full varnihing. ", null);
                    // xmVarnish.addPartition(EnumPartIDKey.Separation, sep);
                    JDFResource varnishPart = vp.addPartition(EnumPartIDKey.Separation, sep);
                    varnishPart.setAttribute("ModuleIndex", "6");
                    varnishPart.setAttribute("VarnishMethod", "Plate");
                    varnishPart.setAttribute("VarnishArea", "Full");
                }
                else if (sep.Equals("PreVarnish"))
                {
                    vp.appendXMLComment("varnishing in a varnishing module only with a mandatory prepared sleeve ", null);
                    xmVarnish.addPartition(EnumPartIDKey.Separation, sep);
                    JDFResource varnishPart = vp.addPartition(EnumPartIDKey.Separation, sep);
                    varnishPart.setAttribute("ModuleIndex", "0");
                    varnishPart.setAttribute("VarnishMethod", "Sleeve");
                    varnishPart.setAttribute("VarnishArea", "Full");
                }
            }

            d.write2File(sm_dirTestDataTemp + "varnishing.jdf", 2, true);
        }