From 23c58542f832235c4bb69e51814c8885952a9eb1 Mon Sep 17 00:00:00 2001 From: Vincent Nguyen Date: Tue, 7 Jan 2025 13:38:47 +0100 Subject: [PATCH] [Drill Map Drawing][Changed] Do not draw Edge.Cuts --- kibot/kicad/pcb_draw_helpers.py | 21 ------------------- tests/yaml_samples/print_drill_map.kibot.yaml | 2 ++ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/kibot/kicad/pcb_draw_helpers.py b/kibot/kicad/pcb_draw_helpers.py index e2c9e13c6..88e973e08 100644 --- a/kibot/kicad/pcb_draw_helpers.py +++ b/kibot/kicad/pcb_draw_helpers.py @@ -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: diff --git a/tests/yaml_samples/print_drill_map.kibot.yaml b/tests/yaml_samples/print_drill_map.kibot.yaml index 5492468f6..b720e0e4f 100644 --- a/tests/yaml_samples/print_drill_map.kibot.yaml +++ b/tests/yaml_samples/print_drill_map.kibot.yaml @@ -22,3 +22,5 @@ outputs: layers: - layer: 'User.Drawings' color: '#000000' + - layer: 'Edge.Cuts' + color: '#000000'