Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PCB Print][Added] Drill Map drawing #764

Merged
merged 3 commits into from
Jan 7, 2025

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

kibot/kicad/pcb_draw_helpers.py Outdated Show resolved Hide resolved
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants