Some, especially older, EDA tools use different reference origins when creating Gerber and Excellon drill files.
When layers are exported with different origins they will appear offset when overlaid in a viewer or by a manufacturer.
This short tutorial will demonstrate how you can align a drill file with a Gerber file and then export it to a new corrected file.
Load all the required Gerber layers and the drill layer by using the Add Layer command which is found under the Home tab.
In this tutorial we will load just one Gerber and one Drill file and then align them.
When you have added all layers, select the Align Layers tool found under the Home Tab as shown below:
After you have activated the Align Layers tool you will be asked to select an item from the first file.
Before you do this, you should try to find a pad that is present in both files.
While the align layers mode is active you can use the zoom and pan operations to move around.
In the picture below we've zoomed in and indicated a pad and a hole that we want to use for the alignment.
We will keep the blue layer as "master" and we will select the blue pad first.
After selecting the first item, our blue pad, we will be asked to select the corresponding item in the second file (white layer).
We will then select the white hole pointed to by the arrow in the picture above.
After the second item has been selected the layers will automatically align as shown below:
Then press Zoom to Extents to see the whole design:
When you're satisfied with the alignment result, you can now save the aligned file a to a new drill file.
We will use the Save Drill Data tool for this purpose.
This tool can be found under the Gerber & Drill tab as shown below:
A dialog will appear where you can select a name and location for your new drill file.
Since we have an aligned file it is very important that the option named Use Aligned Offsets is selected.
Sample dialog:
Before saving, you may adjust output options such as coordinate format, zeros, and units if you want something other than the default values.
Once ready, click Save to generate a new aligned drill file.
Both the files used in this tutorial are included in the GerbView installation.