The Gerber Guide, Chapter 3: The PCB Profile (or Outline)
The profile defines the extent of the PCB. It separates the PCB from what is not the PCB and is an essential part of PCB fabrication data. Without the profile, the PCB simply cannot be fabricated. The profile must be properly and precisely defined.
The profile defines a simple region in the 2D plane. The proper way to do this is to specify a closed contour: The inside of the contour is the PCB, and the outside is not. It is that simple.
Note that such a simple region is solid, without holes. By definition then, a profile cannot have holes intentionally placed within it. These are superfluous and represent an unnecessary and complicated duplication given that drill holes are well defined in the drill/rout file. One can view cut-outs in a PCB as still part of the PCB, just as much as the drill holes are.
A contour is defined by the Gerber spec as follows:
“A contour is a sequence of connected draw or arc segments. A pair of segments is said to connect only if they are defined consecutively, with the second segment starting where the first one ends. Thus the order in which the segments of a contour are defined is significant. Non-consecutive segments that meet or intersect fortuitously are not considered to connect. A contour is closed: The end point of the last segment must connect to the start point of the first segment.”
The Gerber format regions are defined by contours using the G36/G37 commands. This is precise and unequivocal, and is the recommended way to specify the profile. The filled contour covers the PCB exactly.
If this is not possible, the profile can be specified by drawing the contour with a zero size or very small size aperture. If the aperture is not zero size, the profile is the center line of the stroked line; in other words, do not compensate for aperture size. You are transferring an image, not a production tool for a drill machine.