## The vendordrill plugin - Apply Vendor Drills and DRC

Load and Apply vendor file to the current design.

### Description

Footprint holes are predefined within each footprint and layer characteristics are predefined in the layout file. Consequentially, hole sizes may vary among footprints or not match a vendor's available drill availability unless manually adjusted. Likewise, predefined layout layer characteristics may mismatch a vendor's specific requirements. For example one type of Through-Hole resistor footprint may have 40mil holes while another may have 43.5 mil holes.

Some PCB fabricators have a finite set of drill sizes available. In this case loading a vendor file will automatically adjust the layout's hole sizes to agree with the vendor's drill availability.

Many current PCB fabricators offer any drill size within a tolerance with just a minimum and maximum. In this case the layout's holes do not need to match specific drill sizes but it may be desirable to normalize the hole sizes. While the user may want all holes consistent for aesthetic reasons there may be a fabrication cost saving if hole sizes are consistent. Likewise, design rules, such as trace width and minimum separation, can impact fabrication cost. In this situation the drills listed in the vendor files would not be specific drill availability but rather normalization values.

The LoadVendorFrom() Action enables a file of vendor specific fabrication requirements to be loaded to the current design. When the vendor file is applied, holes will be automatically adjusted to conform to the drill sizes listed in the vendor file and layer characteristics will be used in any subsequent Design Rule Checks (DRC). Some critical parts where you may not want to change the drill size can be identified to be left alone - "skipped".

### Vendor File Requirements

- The vendor file is a text file in lihata format. It expects a drillmap section and supports two other sections - drc and skips. Skips defines subcircuits to be skipped , hence the name. Skips' extended regex patterns may only be defined for "refdes", "value" and "descr" attributes.
- The file name can be any existing, readable filename. The file name may be entered in two ways - explicitly or using the standard file load dialog box of the currently active HID.
  - LoadVendorFile(your_vendor_filename)
  - LoadVendorFile()
- Defaults if no entry provided
  - vendor file = vendor.lht (allowed entries: any readable filename in lihata vendor file format)
  - units = mil (allowed entries: mil|mils|inch|inches|mm)
  - round = up (allowed entries up|nearest)

### Example Minimal Vendor File

        ha:vendor_drill_map {
      vendor = oshpark  # Optional and can be omitted
      units = mil      # mil|mils|inch|inches|mm - mil is default
      round = nearest  # up is default
      li:drillmap = {
          20
          25
          30
      }
      li:skips = {
          refdes = {^J3$}       # Skip J3.
          refdes = {^U[1-3]$}   # Skip U1, U2, U3
      }
      ha:drc = {
          copper_space = 7
          copper_width = 7
          copper_overlap = 4
          min_ring = 6
          silk_width = 10
          min_drill = 20
      }