diff --git a/common/io/eagle/eagle_parser.cpp b/common/io/eagle/eagle_parser.cpp index 4f78f723ea..b596405146 100644 --- a/common/io/eagle/eagle_parser.cpp +++ b/common/io/eagle/eagle_parser.cpp @@ -815,11 +815,11 @@ EPAD::EPAD( wxXmlNode* aPad ) > */ - // #REQUIRED says DTD, throw exception if not found - drill = parseRequiredAttribute( aPad, "drill" ); + // #REQUIRED says DTD, but DipTrace doesn't write it sometimes + drill = parseOptionalAttribute( aPad, "drill" ); // Optional attributes - diameter = parseOptionalAttribute( aPad, "diameter" ); + diameter = parseOptionalAttribute( aPad, "diameter" ); opt_wxString s = parseOptionalAttribute( aPad, "shape" ); diff --git a/common/io/eagle/eagle_parser.h b/common/io/eagle/eagle_parser.h index 4958428f73..4a91e232c6 100644 --- a/common/io/eagle/eagle_parser.h +++ b/common/io/eagle/eagle_parser.h @@ -711,7 +711,7 @@ struct EPAD_COMMON /// Eagle thru hole pad struct EPAD : public EPAD_COMMON { - ECOORD drill; + opt_ecoord drill; opt_ecoord diameter; // for shape: (square | round | octagon | long | offset) diff --git a/pcbnew/pcb_io/eagle/pcb_io_eagle.cpp b/pcbnew/pcb_io/eagle/pcb_io_eagle.cpp index 531bf2aed3..b635990fa0 100644 --- a/pcbnew/pcb_io/eagle/pcb_io_eagle.cpp +++ b/pcbnew/pcb_io/eagle/pcb_io_eagle.cpp @@ -1938,7 +1938,7 @@ void PCB_IO_EAGLE::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree ) // this is thru hole technology here, no SMDs EPAD e( aTree ); int shape = EPAD::UNDEF; - int eagleDrillz = e.drill.ToPcbUnits(); + int eagleDrillz = e.drill ? e.drill->ToPcbUnits() : 0; std::unique_ptr pad = std::make_unique( aFootprint ); transferPad( e, pad.get() ); @@ -2029,7 +2029,7 @@ void PCB_IO_EAGLE::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree ) // Eagle spokes are always '+' pad->SetThermalSpokeAngle( ANGLE_0 ); - if( pad->GetSizeX() > 0 && pad->GetSizeY() > 0 ) + if( pad->GetSizeX() > 0 && pad->GetSizeY() > 0 && pad->HasHole() ) { aFootprint->Add( pad.release() ); }