From 2bc004eb0b4ef0a2f3ef2d014d2b8696a25fc093 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 12 Nov 2020 21:12:58 +0000 Subject: [PATCH] Prepare for D_PAD -> PAD. --- .../plugins/cadstar/cadstar_pcb_archive_loader.cpp | 6 +++--- pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h | 2 +- .../plugins/cadstar/cadstar_pcb_archive_parser.cpp | 6 +++--- pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h | 13 ++++++------- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp index 9742f2a887..c0ccad88f1 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp @@ -701,7 +701,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryAreas( const SYMDEF_PCB& aComponent, void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryPads( const SYMDEF_PCB& aComponent, MODULE* aModule ) { - for( std::pair padPair : aComponent.Pads ) + for( std::pair padPair : aComponent.ComponentPads ) { D_PAD* pad = getKiCadPad( padPair.second, aModule ); aModule->Add( pad, @@ -711,7 +711,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryPads( const SYMDEF_PCB& aComponent, } -D_PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const PAD& aCadstarPad, MODULE* aParent ) +D_PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad, MODULE* aParent ) { PADCODE csPadcode = getPadCode( aCadstarPad.PadCodeID ); @@ -1211,7 +1211,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadComponents() for( std::pair padPair : comp.PadExceptions ) { PADEXCEPTION& padEx = padPair.second; - PAD csPad = fpLibEntry.Pads.at( padPair.first ); + COMPONENT_PAD csPad = fpLibEntry.ComponentPads.at( padPair.first ); if( !padEx.PadCode.IsEmpty() ) csPad.PadCodeID = padEx.PadCode; diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h index 47b29effb4..416db02b92 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h @@ -338,7 +338,7 @@ private: // Helper Functions for obtaining individual elements as KiCad elements: double getHatchCodeAngleDegrees( const HATCHCODE_ID& aCadstarHatchcodeID ); - D_PAD* getKiCadPad( const PAD& aCadstarPad, MODULE* aParent ); + D_PAD* getKiCadPad( const COMPONENT_PAD& aCadstarPad, MODULE* aParent ); MODULE* getModuleFromCadstarID( const COMPONENT_ID& aCadstarComponentID ); int getKiCadHatchCodeThickness( const HATCHCODE_ID& aCadstarHatchcodeID ); int getKiCadHatchCodeGap( const HATCHCODE_ID& aCadstarHatchcodeID ); diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp index 8653421d62..7c00d9d941 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp @@ -1136,7 +1136,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS::Parse( XNODE* aNode ) } -void CADSTAR_PCB_ARCHIVE_PARSER::PAD::Parse( XNODE* aNode ) +void CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Parse( XNODE* aNode ) { wxASSERT( aNode->GetName() == wxT( "PAD" ) ); @@ -1540,9 +1540,9 @@ void CADSTAR_PCB_ARCHIVE_PARSER::SYMDEF_PCB::Parse( XNODE* aNode ) } else if( cNodeName == wxT( "PAD" ) ) { - PAD pad; + COMPONENT_PAD pad; pad.Parse( cNode ); - Pads.insert( std::make_pair( pad.ID, pad ) ); + ComponentPads.insert( std::make_pair( pad.ID, pad ) ); } else if( cNodeName == wxT( "DIMENSIONS" ) ) { diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h index 3fcb335cc8..647deceba4 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h @@ -522,7 +522,7 @@ public: }; - struct PAD + struct COMPONENT_PAD { PAD_ID ID; POINT Position; ///< Pad position within the component's coordinate frame. @@ -544,11 +544,10 @@ public: ///< removed from the existing pad when this new pad is added. The ///< property is used by the 'First Pad' highlight when in a PCB ///< design." - bool PCBonlyPad = - false; ///< From CADSTAR Help: "The PCB Only Pad property can be used to stop - ///< ECO Update, Back Annotation, and Design Comparison incorrectly - ///< acting on mechanical pads / components that only appear in the - ///< PCB design." + bool PCBonlyPad = false; ///< From CADSTAR Help: "The PCB Only Pad property can be used to + ///< stop ECO Update, Back Annotation, and Design Comparison + ///< incorrectly acting on mechanical pads / components that only + ///< appear in the PCB design." void Parse( XNODE* aNode ); }; @@ -779,7 +778,7 @@ public: std::vector ComponentCoppers; std::map ComponentAreas; - std::map Pads; + std::map ComponentPads; std::map Dimensions; ///< inside "DIMENSIONS" subnode void Parse( XNODE* aNode ) override;