1 # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2009, 2010 Dan McMahill
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of version 2 of the GNU General Public License as
5 # published by the Free Software Foundation
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
12 # You should have received a copy of the GNU General Public License
13 # along with this program; if not, write to the Free Software
14 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
15 # All rights reserved.
17 # This code was derived from code written by Dan McMahill as part of the
18 # latex-mk testsuite. The original code was covered by a BSD license
19 # but the copyright holder is releasing the version for pcb under the GPL.
24 # test_name | layout file(s) | [export hid name] | [optional arguments to pcb] | [mismatch]
27 # test_name - a single string with no spaces, tabs, *, +, ? (i.e. any "special"
28 # characters) that identifies the test.
30 # layout file(s) - a list of layout files. Files listed are relative to
31 # the $(top_srcdir)/tests/inputs directory.
33 # [export hid name] - the name of the export HID to use. This is used both for
34 # running pcb as well as determining how we process the output
36 # [optional arguments to pcb] - a list of additional arguments to be passed to pcb.
37 # This is where one would specify additional options which are specific to a particular
40 # [mismatch] If specified as "mismatch" (no quotes), then the result
41 # should *not* match the reference. This can be thought of as a test
42 # on the testsuite to make sure we can properly detect when a change has
45 # output file(s) - a list of output files and their associated types. For
47 # bom:bom_general.bom xy:test.txt
48 # specifies that "bom_general.bom" is created and it is a bill of materials file
49 # and that "test.txt" is created and it is a centroid (X-Y) file.
51 # File types grouped by which HID produces them are:
55 # bom -- PCB bill of materials file
56 # xy -- PCB centroid file
60 # gcode -- G-Code file. Note that these typically have .cnc as the
61 # extension but we're already using the 'cnc' type for
62 # Excellon drill files.
66 # cnc -- Excellon drill file
67 # gbx -- RS274-X (Gerber) file
73 # png -- Portable network graphics (PNG) file
75 ######################################################################
76 # ---------------------------------------------
78 # ---------------------------------------------
79 ######################################################################
82 # --bomfile <string> BOM output file
83 # --xyfile <string> XY output file
84 # --xy-in-mm XY dimensions in mm instead of mils
87 # Produces a bill of materials (BOM) file and a centroid (XY) file
89 hid_bom1 | bom_general.pcb | bom | | | bom:bom_general.bom xy:bom_general.xy
90 hid_bom2 | bom_general.pcb | bom | --bomfile test.bom | | bom:test.bom xy:bom_general.xy
91 hid_bom3 | bom_general.pcb | bom | --xyfile test.xy | | bom:bom_general.bom xy:test.xy
92 hid_bom4 | bom_general.pcb | bom | --xy-in-mm | | bom:bom_general.bom xy:bom_general.xy
94 ######################################################################
95 # ---------------------------------------------
97 # ---------------------------------------------
98 ######################################################################
101 # --basename <string> File name prefix
102 # --dpi <num> Resolution of intermediate image (pixels/inch).
103 # --mill depth <num> Milling depth.
104 # --safe Z <num> Safe Z for traverse move.
105 # --tool radius <num> Milling tool radius compensation.
106 # --drill depth <num> Drilling depth.
107 # --measurement unit <mm|mil|um|inch> Measurement unit
109 hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
110 hid_gcode2 | gcode_oneline.pcb | gcode | --basename out | | gcode:out.front.cnc gcode:out.back.cnc gcode:out.drill.cnc
111 hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
112 hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
113 hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
114 hid_gcode6 | gcode_oneline.pcb | gcode | --tool-radius 15 | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
115 hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
116 hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
117 hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
118 hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
119 hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline.gcode.front.cnc gcode:gcode_oneline.gcode.back.cnc gcode:gcode_oneline.gcode.drill.cnc
121 ######################################################################
122 # ---------------------------------------------
124 # ---------------------------------------------
125 ######################################################################
128 # --gerberfile <string> Basename for output file
130 # Produces RS274-X (a.k.a. gerber) photo plot files and Excellon drill files
132 # we can't include gbx:gerber_oneline.fab.gbr yet because it has a name and a date stamp
133 hid_gerber1 | gerber_oneline.pcb | gerber | | | gbx:gerber_oneline.back.gbr gbx:gerber_oneline.front.gbr cnc:gerber_oneline.plated-drill.cnc
134 hid_gerber2 | gerber_oneline.pcb | gerber | --gerberfile out | | gbx:out.back.gbr gbx:out.front.gbr cnc:out.plated-drill.cnc
138 ######################################################################
139 # ---------------------------------------------
141 # ---------------------------------------------
142 ######################################################################
145 # --outfile <string> Graphics output file
146 # --dpi <num> Scale factor (pixels/inch). 0 to scale to fix specified size
147 # --x-max <num> Maximum width (pixels). 0 to not constrain.
148 # --y-max <num> Maximum height (pixels). 0 to not constrain.
149 # --xy-max <num> Maximum width and height (pixels). 0 to not constrain.
150 # --as-shown Export layers as shown on screen
151 # --monochrome Convert to monochrome
152 # --only-visible Limit the bounds of the PNG file to the visible items
153 # --use-alpha Make the background and any holes transparent
154 # --format <GIF|JPEG|PNG> Graphics file format
155 # --photo-mode Photo-realistic mode
156 # --photo-flip-x Show reverse side of the board, left-right flip
157 # --photo-flip-y Show reverse side of the board, up-down flip
159 # Produces GIF/JPEG/PNG (image) files
161 hid_png1 | gerber_oneline.pcb | png | | | png:gerber_oneline.png
162 hid_png2 | gerber_oneline.pcb | png | --outfile myfile.png | | png:myfile.png
163 hid_png3 | gerber_oneline.pcb | png | --dpi 300 | | png:gerber_oneline.png