Skip to content

Commit

Permalink
[Drill Map Drawing][Changed] Do not draw Edge.Cuts
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyen-v committed Jan 7, 2025
1 parent 5ca4205 commit 23c5854
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
21 changes: 0 additions & 21 deletions kibot/kicad/pcb_draw_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,27 +198,6 @@ def draw_oval(g, x, y, size, orientation, layer, line_w=10000):

def draw_drill_map(g, layer, layer_pair_idx, merge_PTH_NPTH=True, group_slots_and_round_holes=True):

# Draw elements on Edge.Cuts which are not part of footprints
for item in GS.board.GetDrawings():
if item.GetLayer() != pcbnew.Edge_Cuts:
continue
if isinstance(item, pcbnew.PCB_SHAPE):
dummy_shape = item.Duplicate()
dummy_shape.SetLayer(layer)
g.AddItem(dummy_shape)
GS.board.Add(dummy_shape)

# Plot edge cuts in footprints
for footprint in GS.board.GetFootprints():
for item in footprint.GraphicalItems():
if item.GetLayer() != pcbnew.Edge_Cuts:
continue
if isinstance(item, pcbnew.PCB_SHAPE):
dummy_shape = item.Duplicate()
dummy_shape.SetLayer(layer)
g.AddItem(dummy_shape)
GS.board.Add(dummy_shape)

hole_list, _, _, _ = get_full_holes_list(merge_PTH_NPTH, group_slots_and_round_holes)

if layer_pair_idx > len(hole_list)-1:
Expand Down
2 changes: 2 additions & 0 deletions tests/yaml_samples/print_drill_map.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ outputs:
layers:
- layer: 'User.Drawings'
color: '#000000'
- layer: 'Edge.Cuts'
color: '#000000'

0 comments on commit 23c5854

Please sign in to comment.