Cadence Allegro
Gerber File Elements
A propertyBean element whose propertyName is equal to Is Silkscreen is added to all Gerber file pcbTreeBean elements. propertyValue is set to true if the input XML contains a comment element that is a child of this pcbTreeBean and contains the string SILKSCREEN or AUTOSILK. Otherwise propertyValue is set to false.
Below is an example of a comments element that indicates that Is Silkscreen should be set to true:
<comments>
…
<comment>Layer: REF DES/ASSEMBLY_BOTTOM</comment>
<comment>Layer: PACKAGE GEOMETRY/ASSEMBLY_BOTTOM</comment>
<comment>Layer: DRAWING FORMAT/OUTLINE</comment>
<comment>Layer: BOARD GEOMETRY/OUTLINE</comment>
<comment>Layer: BOARD GEOMETRY/SILKSCREEN_BOTTOM</comment>
…
</comments>
All other propertyBean elements are added only to pcbTreeBean elements that correspond to Gerber files for copper layers. A pcbTreeBean element corresponds to a Gerber file for a copper layer if it has a comment child element that contains the string VIA CLASS/ and has no comment child element that contains either SOLDERMASK or PASTEMASK. Here is an example of such an input XML element:
<pcbTreeBean>
<comments>
…
<comment>Layout Name: xxx.brd</comment>
<comment>Film Name: xxx_L5</comment>
<comment>File Format: Gerber RS274X</comment>
<comment>File Origin: Cadence Allegro 16.6-S027</comment>
…
<comment>Layer: ETCH/L5_RT2</comment>
<comment>Layer: PIN/L5_RT2</comment>
<comment>Layer: VIA CLASS/L5_RT2</comment>
<comment>Layer: BOARD GEOMETRY/GLOBAL_LAYER</comment>
…
</comments>
<name>xxx_L5.art</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>Gerber</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
propertyBean elements are added as follows:
• Layer Name: a substring after the string VIA CLASS/ (L5_RT2 for the example listed above).
• Layer Number: a value extracted from the Layer Name property or, if nothing can be extracted from it, from the name element (xxx_L5.art for the example listed above). If Layer Name is equal to TOP or BOTTOM, Layer Number is set to 1 or to the total number of copper layers, respectively. If Layer Name contains a substring that matches the pattern L<integer-number> or if the whole Layer Name string matches the pattern <any-letters><integer-number><any-letters>, then <integer-number> is extracted as Layer Number. Otherwise, the same extraction algorithm is applied to the Gerber file name (name without path and extension). If no number is extracted from both Layer Name and the file name, no property is added. For the example listed above, Layer Number is extracted from Layer Name and is equal to 5.
• Material Thickness (optional): a value extracted from an info file. At least one comment element that corresponds to this file should contain the strings File and Weight. If any comment element of this file contains the name of the Gerber file in question (the substring of the name element after the last forward slash, /) and contains a substring that matches the pattern <float-value>oz, the <float-value> is extracted as Material Thickness. An example of the node corresponding to the info file is listed below. In this case Material Thickness is set to 1.5.
<pcbTreeBean>
<comments>
…
<comment>Layer order: File Weight Format</comment>
…
<comment>layer5 Copper xxx_L5.art 1.5oz RS274X 5.5 Leading, English</comment>
…
</comments>
<name>readme.txt</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>Info</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
Drill File Elements
Here is an example of an input XML element that corresponds to a drill file:
<pcbTreeBean>
<comments>
<comment>T01C.102</comment>
…
<comment>FILE : xxx-5-6.drl for board #xxx.tmp ... layers L5_RT2 and BOTTOM</comment>
<comment>T01 Holesize 1. = 0.100000 Tolerance = +0.070000/-0.080000 PLATED MM Quantity = 30</comment>
</comments>
<name>xxx-5-6.drl</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>Drill</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
For all Cadence Allegro drill files, the property Is External Contour Drill File is always set to false.
If any comment element matches the pattern FILE<any-symbols>probe holes<any-symbols>, the property Is Probe Drill File is set to true; for all other cases it is set to false. If Is Probe Drill File is set to true, the properties Start Layer and End Layer are not added for this drill file. For the example listed above, Is Probe Drill File is false.
Information about start and end layers is extracted from the comment element that matches the following pattern: FILE<any-symbols> layers <start-layer-name> <delimiter> <end-layer-name>, where <delimiter> is either and or to. The value of the Start Layer property is set to <start-layer-name>, and the value of the End Layer property is set to <start-layer-name>. For the example listed above, the Start Layer value is L5_RT2, and the End Layer value is BOTTOM. If no comment element matches the pattern above, the Start Layer value is set to the value of the Layer Name property of the layer with number 1, and the End Layer value is set to the value of the Layer Name property of the last layer.
Information about tool properties is extracted from comment elements that match the following pattern: T<tool-number> Holesize <tool-index-in-file>. = <tool-diameter> Tolerance = +<positive-tolerance>/-<negative-tolerance> <is-plated> <units> Quantity = <holes-quantity>. 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 T01). 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 Index In File property is set to <tool-index-in-file>. For the example listed above, it is 1.
• Value of the Diameter property is set to <tool-diameter>. For the example listed above, it is 0.1.
• Value of the Positive Tolerance property is set to <positive-tolerance>. For the example listed above, it is 0.07.
• Value of the Negative Tolerance property is set to <negative-tolerance>. For the example listed above, it is 0.08.
• Value of the Is Plated property is set to true if <is-plated> is equal to PLATED, and it is set to false if <is-plated> is equal to NON_PLATED. For all other cases, the Is Plated property is not added. For the example listed above, the Is Plated property value is true.
• Value of the Unit property is set to <units> if the <units> string is equal to either MM or MIL. Otherwise, the Unit property is not added. For the example listed above, the Unit property value is MM.
• Value of the Holes Quantity property is set to <holes-quantity>. For the example listed above, it is 30.
Cadence Allegro may generate drill files that do not use tool numbers. In this case, comment elements of tool metadata match the same pattern, but without string T<tool-number>. The properties element is populated the same way except that the Tool Number property that is not added. Also, for tools without a number, the name element of the pcbTreeBean remains empty.
One more specific case of tool metadata is metadata extracted for route files (drill files with extension .rou). For these files, information about tool diameter may be stored in a separate text file. An example of such file is listed below:
<pcbTreeBean>
<comments>
<comment>0.0300 T01</comment>
</comments>
<name>ncroutebits_auto.txt</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>Info</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
If no information about tools is present in the route file, an attempt to extract it from a text file is made. It is expected that the text file name (without path and extension) contains the string route. If a comment element of this text file matches the pattern <tool-diameter> T<tool-number>, a new pcbTreeBean element with name equal to T<tool-number> is added (for the example listed above, it is T01). 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>. For the example listed above, it is 0.03.
All other tool properties are not populated.
Top-level Element
Information about board thickness is added to the top-level element if the IPC file contains a comment element that matches the following pattern: <any-symbols> Board Thickness(<units>): <thickness>, where the <units> string is either mils or mm. An example of such a file is listed below:
<pcbTreeBean>
<comments>
…
<comment>C Board Thickness(mils): 62.000551</comment>
…
</comments>
<name>xxx.ipc</name>
<nodes />
<properties>
<propertyBean>
<propertyName>Type</propertyName>
<propertyValue>IPC</propertyValue>
</propertyBean>
</properties>
</pcbTreeBean>
The properties element of the top-level pcbTreeBean element is populated as follows:
• Value of the Unit property is set to MM if the <units> string is equal to mm, and it is set to MIL if the <units> string is equal to mils. For the example listed above, the Unit property value is MIL.
• Value of the Board Thickness property is set to <thickness>. For the example listed above, it is 62.000551.
Recommended File Format
aPriori recommends the use of a naming convention according to which the name of a given layer includes its layer number (for example, L5_RT2 or LAYER5).
aPriori also recommends the identification of tools by number instead of by the order of occurrence in the file. This guarantees correct extraction of all tool properties.
Finally, aPriori recommends that you include all supporting files, such as plain text files and the IPC file, in the .zip archive that represents the PCB model. Otherwise aPriori cannot extract the thicknesses of the layers and of the whole board.