PADS
Gerber File Elements
For PCB models generated by PADS, all Gerber file properties are extracted from the file name, that is, the lower-case name of the file (without path and extension) that is extracted from the name element. Below are examples of name elements that correspond to all the Gerber files for three different PCB models.
• Model 1:
<name>COMPO.GBR</name>
<name>DRILL.GBR</name>
<name>GROUND PLANE.GBR</name>
<name>INNER2.GBR</name>
<name>INNER3.GBR</name>
<name>MASKB.GBR</name>
<name>MASKT.GBR</name>
<name>PASTEB.GBR</name>
<name>PASTET.GBR</name>
<name>POWER PLANE.GBR</name>
<name>SILKB.GBR</name>
<name>SILKT.GBR</name>
<name>SOLDER.GBR</name>
• Model 2:
<name>XXX_L1.PHO</name>
<name>XXX_L2.PHO</name>
<name>XXX_L3.PHO</name>
<name>XXX_L4.PHO</name>
<name>XXX_L5.PHO</name>
<name>XXX_L6.PHO</name>
<name>XXX_SM1.PHO</name>
<name>XXX_SM2.PHO</name>
<name>XXX_SS1.PHO</name>
<name>XXX_SS2.PHO</name>
• Model 3:
<name>pcb_manufacturing/layer_1.pho</name>
<name>pcb_manufacturing/layer_2.pho</name>
<name>pcb_manufacturing/layer_3.pho</name>
<name>pcb_manufacturing/layer_4.pho</name>
<name>pcb_manufacturing/layer_5.pho</name>
<name>pcb_manufacturing/layer_6.pho</name>
<name>pcb_manufacturing/layer_7.pho</name>
<name>pcb_manufacturing/layer_8.pho</name>
<name>pcb_manufacturing/manufacturing.pho</name>
<name>pcb_manufacturing/silkscreen_bot.pho</name>
<name>pcb_manufacturing/silkscreen_top.pho</name>
<name>pcb_manufacturing/soldermask_bot.pho</name>
<name>pcb_manufacturing/soldermask_top.pho</name>
A propertyBean element whose propertyName is equal to Is Silkscreen is added to all Gerber file pcbTreeBean elements. The propertyValue is set to true if the file name contains any of the strings silk, ss1, ss2, sst, or ssb. Otherwise, the propertyValue is set to false. For Model 1, the property Is Silkscreen is set to true for the files SILKB.GBR and SILKT.GBR. For Model 2, the property is set to true for the files XXX_SS1.PHO and XXX_SS2.PHO. For Model 3, the property is set to true for the files pcb_manufacturing/silkscreen_bot.pho and pcb_manufacturing/silkscreen_top.pho.
All other propertyBean elements are added only to pcbTreeBean elements that correspond to a Gerber file for a copper layer. propertyBean elements are added as follows:
• Value of the Layer Name property is set to the case-sensitive Gerber file name (without path and extension). For example, for the file POWER PLANE.GBR from Model 1, this property is equal to POWER PLANE.
• Layer Number property extraction depends on layer type, as explained below.
• Material Thickness property is not set.
A Gerber file for a copper layer of a given model has a file name that satisfies the following conditions:
• File name does not contain any of the strings silk, mask, gold, pas, res, or ident.
• At least one the following holds:
o File name either equals compo or contains top. The named file is assumed to be for the model’s first layer, and the Layer Number property is set to 1. An example of such a file is COMPO.GBR from Model 1.
o File name either equals solder or sol or contains bot. The named file is assumed to be for the model’s last layer, and the Layer Number property is set to the total number of copper layers in the model. An example of such a file is SOLDER.GBR from Model 1, and the Layer Number property for its layer is set to 6.
o File name is equal to ground plane. The named file is assumed to be for the model’s second layer, and the Layer Number property is set to 2. An example of such a file is GROUND PLANE.GBR from Model 1.
o File name equals power plane. The named file is assumed to be for the model’s second-to-last layer, and the Layer Number property is set to one less than the total number of copper layers in the model. An example of such a file is POWER PLANE.GBR from Model 1, and the Layer Number property for its layer is set to 5.
o File name either matches the pattern <any-symbols><layer-string><any-symbols><layer-number> or contains the string L<layer-number>, where <layer-string> is either lay or inner. The Layer Number property is set to <layer-number> unless that layer number has already been assigned based on a case listed above. If <layer-number> has already been assigned, Layer Number is set to a slightly smaller or larger value compatible with the other layer assignments.
For example, for the file INNER2.GBR from Model 1, <layer-number> is 2, but 2 has already been assigned to the ground plane layer and 1 (a slightly smaller value) has already been assigned to the top layer; so, Layer Number is set to 3 (a slightly larger value). For the file XXX_L4.PHO from Model 2, <layer-number> is 4, and the Layer Number property is set to 4. For file pcb_manufacturing/layer_8.pho from Model 3, <layer-number> is 8, and the Layer Number property is set to 8.
Drill File Elements
For all PADS drill files, both the properties Is External Contour Drill File and Is Probe Drill File are always set to false.
For PCB models generated by PADS, information about start and end layers (the Start Layer and End Layer properties) is extracted from file names, that is, the lower-case file names (without path and extension) that are extracted from the name elements. Below are examples of name elements that correspond to all the drill files of a PCB model. The name elements that correspond to all the Gerber files of this model are listed in the previous section under Model 3.
<name>pcb_manufacturing/nc_drill_laservias_1-2.drl</name>
<name>pcb_manufacturing/nc_drill_pth_vias_1-8.drl</name>
Information about start and end layers can be extracted if the drill file name matches the following pattern: <any-symbols><delimiter-1><start-layer-str><delimiter-2><end-layer-str>, where <delimiter-1> and <delimiter-2> are equal to a dash (-), underscore (_), or space character. The Start Layer property is set to the Layer Name property of the layer whose Layer Number property is equal to the value extracted from <start-layer-str>. The End Layer property is populated the same way, from the <end-layer-str>. A number can be extracted from the string in the following cases:
• String is a number. In this case Layer Number is equal to this number. For the first drill file in the example listed above, the start layer number is 1, so the Start Layer property is set to layer_1. The end layer number of this file is 2, and the End Layer property is set to layer_2. For the second drill file, the Start Layer property is equal to layer_1, and the End Layer property is equal to layer_8.
• String contains the substring top. In this case Layer Number is equal to 1.
• String contains substring bot. In this case, Layer Number is equal to the number of copper layers.
• String is a combination of the substring in and a number. In this case, Layer Number is equal to this number increased by 1.
If information about the start and end layers cannot be extracted from the drill file name, the Start Layer value is set to the Layer Name property of the layer with number 1, and the End Layer value is set to the Layer Name property of the last layer.
Information about tool properties is extracted from the comments element of the pcbTreeBean element that corresponds to the report file. The report file should have the same name as the drill file and extension .rep. Here is an example of pcbTreeBean elements that represent drill file NC-DRILL.drl and its associated report file NC-DRILL.rep:
<pcbTreeBean>
<comments>
…
</comments>
<name>Gerber/NC-DRILL.drl</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>Drill</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
<pcbTreeBean>
…
<pcbTreeBean>
<comments>
<comment>Drill Sizes Report</comment>
<comment>==================</comment>
<comment>Tool Size Pltd Feed Speed Qty</comment>
<comment>==== ==== ==== ==== ===== ===</comment>
<comment>1 10 x 95 300 2625</comment>
…
</comments>
<name>Rep/NC-DRILL.rep</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>Info</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
<pcbTreeBean>
Information about tool properties is extracted from the comment element that matches the following pattern: <tool-number> <tool-diameter> <is-plated-sign> <feed> <speed> <holes-quantity>, where <is-plated-sign> is x or -. For each such element, a new pcbTreeBean element is added. The name element of the new node is not set. The properties element is populated as follows:
• Value of the Tool Number property is set to <tool-number>. For the example listed above, it is 1.
• Value of the Diameter property is set to <tool-diameter> multiplied by 0.001. For the example listed above, it is 0.01.
• Value of the Is Plated property is set to true if <is-plated-sign> is equal to x, and to false if <is-plated-sign> is equal to -. For the example listed above, the Is Plated property value is true.
• Value of the Holes Quantity property is set to <holes-quantity>. For the example listed above, it is 30.
• Positive Tolerance, Negative Tolerance, Index In File, and Unit are not set.
If no report file that matches the drill file is found, tool metadata is extracted from the header of the drill file, that is, from the comments element of the pcbTreeBean element that corresponds to the drill file. Here is an example of the pcbTreeBean elements that represent a drill file:
<pcbTreeBean>
<comments>
<comment>FILE_FORMAT=2:4</comment>
<comment>TYPE=PLATED</comment>
<comment>T1C.01</comment>
…
<comment>TYPE=NON_PLATED</comment>
<comment>T11C0.7</comment>
</comments>
<name>Gerber/NC-DRILL.drl</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>Drill</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
<pcbTreeBean>
Information about tool properties is extracted from comment elements that match the pattern T<tool-number>C<tool-diameter> and are located after a comment element with value TYPE=PLATED or TYPE=NON_PLATED. For each such element, a new pcbTreeBean element with name element equal to T<tool-number> is added (for the example listed above, it is T1 for the first tool and T11 for the second tool). The properties element is populated as follows:
• Value of the Tool Number property is set to <tool-number>. For the example listed above, it is 1 for the first tool and 11 for the second tool.
• Value of the Diameter property is set to <tool-diameter>. For the example listed above, it is 0.01 for the first tool and 0.7 for the second tool.
• Value of the Is Plated property is set to true if the current comment element is located after a comment element with value TYPE=PLATED and before a comment element with value TYPE=NON_PLATED; it is set to false otherwise. For the example listed above, Is Plated is true for the first tool and false for the second tool.
• Positive Tolerance, Negative Tolerance, Index In File, Holes Quantity and Unit are not set.
Top-level Element
No properties of the whole board are extracted for PCB models generated by PADS.
Recommended File Format
aPriori recommends that you include the report file in the .zip archive of the PCB model. aPriori also recommends that you generate report files with the same units of measurement as the drill files. This prevents extraction of ambiguous tool metadata.
aPriori recommends the use of a naming convention according to which copper layers have names of the form Lay<layer-number> or Layer< layer-number>.
aPriori also recommends that drill files have names of the form <any-symbols>_<start-layer-number>-<end-layer-number>.