From f7ed9cc5c71fc240cc8e37e4d60bf99a08327e90 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Sat, 14 Oct 2023 15:40:08 +0300 Subject: [PATCH] Fix loading thru-hole pads when drill token is missing. --- pcbnew/plugins/kicad/pcb_parser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/plugins/kicad/pcb_parser.cpp b/pcbnew/plugins/kicad/pcb_parser.cpp index 1974d744d8..20f71bd4c2 100644 --- a/pcbnew/plugins/kicad/pcb_parser.cpp +++ b/pcbnew/plugins/kicad/pcb_parser.cpp @@ -4249,6 +4249,11 @@ PAD* PCB_PARSER::parsePAD( FOOTPRINT* aParent ) { case T_thru_hole: pad->SetAttribute( PAD_ATTRIB::PTH ); + + // The drill token is usually missing if 0 drill size is specified. + // Emulate it using 1 nm drill size to avoid errors. + // Drill size cannot be set to 0 in newer versions. + pad->SetDrillSize( VECTOR2I( 1, 1 ) ); break; case T_smd: