Skip to content

Conversation

@nguyen-v
Copy link

@nguyen-v nguyen-v commented Jan 6, 2025

This PR adds an option to add a drillmap to the pcb_print output. This is basically a reimplementation of:
https://gitlab.com/kicad/code/kicad/-/blob/master/common/plotters/plotter.cpp
https://gitlab.com/kicad/code/kicad/-/blob/master/pcbnew/exporters/gen_drill_report_files.cpp

This is done by specifying in the YAML file a repeat_layers: 'drill_pairs' option and specifying on which layer to print the drillmap drawing. It will create one page per drill layer pair, and an addional page if PTH/NPTH are not grouped. The drawing is aligned with the PCB.
This also adds two pattern expansions %lp and %lpn to get the current page layer pair (e.g. L1-L6) or layer pair name (e.g. Front-Back)

kibot:
  version: 1

outputs:
  - name: 'print_drill_map'
    type: pcb_print
    options:
      drill:
        unify_pth_and_npth: 'no'
        group_slots_and_round_holes: true
      pages:
        - repeat_for_layer: 'User.Drawings'
          repeat_layers: 'drill_pairs'
          layers:
            - layer: 'User.Drawings'
              color: '#000000'

Examples:
image
image

@nguyen-v nguyen-v force-pushed the pcb_print_drillmap branch from e52f6ef to 23c5854 Compare January 7, 2025 12:39
@set-soft set-soft merged commit 9b7f1b5 into INTI-CMNB:dev Jan 7, 2025
17 checks passed
@set-soft
Copy link
Member

set-soft commented Jan 7, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants