Punch to Drill

This Action modifies the TH layer and removes the punch holes that violate the spacing parameters.
These holes are moved to the *_nth layer.

4 Spacing checks are made.  Each check is against a different layer.

   * Check 1 - Spacing between holes in Punch layer (NTH). The holes are checked
                      against each other for spacing between edges.

   * Check 2 - Spacing between holes in Punch layer (NTH) and holes in Drill layer (TH).

   * Check 3 - Spacing between holes in Punch layer (NTH) and the rout outline.

   * Check 4 - Spacing between Punch hole centers.



A parameter for minimal spacing is given for every check, and after the check
is complete, all Punch holes (NTH) that violate minimal spacing are moved to a new layer, namely the NTH Drill layer.
This is done after each of checks 1-3 is completed, and the moved holes are categorized accordingly.

Documentation (marking) layers are created for each check, named
mark_1 to mark_4. Each contains the marking of check result, in a different marking for each check.

NTH Drill layer is created, named as the input drill layer with a '_nth' suffix.

If the Previous Punch Layer parameter is not blank, then the Punch Layer (after violated holes are moved)
and the Previous Punch Layer are compared, to determine where holes were added and deleted.
The result of the compare is put in 2 documentation layers: added_holes and deleted_holes.
Each layer contains markings at hole locations ('O' for added, 'X' for deleted).


Parameters

 Layers:
             Drill Layer - with TH drills
             Punch Layer - with NTH for punch fixture
             Rout Later  - for board outline
             Previous Punch Layer - This parameter is optional and can be left empty.
             It may contain punch holes of an old fix to be used for comparison.

 Minimal Spacing values:
                            Edge    -  Minimal Spacing between punch holes edges.
                            Center  -  Minimal Spacing between punch holes centers.
                            Drill   -  Minimal Spacing between punch holes and Drill TH.
                            Rout    -  Minimal Spacing between punch holes and Rout outline.