Thanks for your reply - and your comments about milling the outline. I have for some time been doing just what you suggested and
place the milling paths half the tool diameter outside the dimension lines.
You did however set me thinking about the calcs needed to create the stencil tool paths. After a lot of searching I found an
isolated rectangular pad which was part of library footprint and extracted the co-ordinates of the corners as defined in a .brd
file using that library part and the associated tool path from the stencil file. I've analysed the situation below.
The chosen pad has dimensions (x,y) of 2.5mm by 3mm as defined in the "smd name" in the library file - this same information is
also present in the associated Eagle ".brd" file. The coordinates of the corners of the smd pad as defined in the board file are
Upper right X39.6691 Y5.5259
Lower right X39.6691 Y2.5259
Upper left X37.1691 Y5.5259
Lower left X37.1691 y2.5259
Having run "pcb-gcode" with a tool diameter of 0.3mm declared I checked the gcode produced in the "stencil.txt" file.
G00 X39.5941 Y5.4509
G01 Z-0.1250 F250.00
G01 X39.5941 Y2.6009 F500.00
G01 X37.2441 Y2.6009
G01 X37.2441 Y5.4509
G01 X39.5941 Y5.4509
G01 X39.5941 Y2.6009
This shows the calculated tool path to lie inside the smd pad corners, and the differences are equal to (tool diam)/4. This means
that the actual stencil size is correctly centred, but larger, in the above case, by 0.075mm in each dimension (0.3mmtool).
Using an smd pad for a location pin for a stencil produced as above would allow a potential error of +-0.25 x tool diameter.
Was this discrepancy intended, because I would much prefer the sizes to match exactly so as to minimise registration errors. Can
the calcs be easily modified to modify the stencil tool path to be 0.5 x tool diam inside the smd outline?
Sorry this is rather long winded but when dealing with the smallest smd components every fraction of a mm counts!!