Loading common/footprint_info.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString& aFootprintsLibNames ) fpinfo->SetLibraryName( filename.GetName() ); fpinfo->SetLibraryPath( filename.GetFullPath() ); fpinfo->m_Module = fpnames[i]; fpinfo->m_padCount = m->GetPadCount(); fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH ); fpinfo->m_KeyWord = m->GetKeywords(); fpinfo->m_Doc = m->GetDescription(); Loading Loading @@ -163,7 +163,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE& aTable ) fpinfo->SetLibraryName( libNickNames[ii] ); fpinfo->SetLibraryPath( path ); fpinfo->m_Module = fpnames[i]; fpinfo->m_padCount = m->GetPadCount(); fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH ); fpinfo->m_KeyWord = m->GetKeywords(); fpinfo->m_Doc = m->GetDescription(); Loading pcbnew/class_module.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -603,6 +603,25 @@ D_PAD* MODULE::GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask ) } unsigned MODULE::GetPadCount( INCLUDE_NPTH_T aIncludeNPTH ) const { if( aIncludeNPTH ) return m_Pads.GetCount(); unsigned cnt = 0; for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) { if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED ) continue; cnt++; } return cnt; } void MODULE::Add3DModel( S3D_MASTER* a3DModel ) { a3DModel->SetParent( this ); Loading pcbnew/class_module.h +11 −1 Original line number Diff line number Diff line Loading @@ -384,11 +384,21 @@ public: */ D_PAD* GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask = ALL_LAYERS ); enum INCLUDE_NPTH_T { DO_NOT_INCLUDE_NPTH = false, INCLUDE_NPTH = true }; /** * GetPadCount * returns the number of pads. * * @param aIncludeNPTH includes non-plated through holes when true. Does not include * non-plated through holes when false. * @return the number of pads according to \a aIncludeNPTH. */ unsigned GetPadCount() const { return m_Pads.GetCount() ; } unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH ) const; double GetArea() const { return m_Surface; } Loading Loading
common/footprint_info.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString& aFootprintsLibNames ) fpinfo->SetLibraryName( filename.GetName() ); fpinfo->SetLibraryPath( filename.GetFullPath() ); fpinfo->m_Module = fpnames[i]; fpinfo->m_padCount = m->GetPadCount(); fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH ); fpinfo->m_KeyWord = m->GetKeywords(); fpinfo->m_Doc = m->GetDescription(); Loading Loading @@ -163,7 +163,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE& aTable ) fpinfo->SetLibraryName( libNickNames[ii] ); fpinfo->SetLibraryPath( path ); fpinfo->m_Module = fpnames[i]; fpinfo->m_padCount = m->GetPadCount(); fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH ); fpinfo->m_KeyWord = m->GetKeywords(); fpinfo->m_Doc = m->GetDescription(); Loading
pcbnew/class_module.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -603,6 +603,25 @@ D_PAD* MODULE::GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask ) } unsigned MODULE::GetPadCount( INCLUDE_NPTH_T aIncludeNPTH ) const { if( aIncludeNPTH ) return m_Pads.GetCount(); unsigned cnt = 0; for( D_PAD* pad = m_Pads; pad; pad = pad->Next() ) { if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED ) continue; cnt++; } return cnt; } void MODULE::Add3DModel( S3D_MASTER* a3DModel ) { a3DModel->SetParent( this ); Loading
pcbnew/class_module.h +11 −1 Original line number Diff line number Diff line Loading @@ -384,11 +384,21 @@ public: */ D_PAD* GetPad( const wxPoint& aPosition, LAYER_MSK aLayerMask = ALL_LAYERS ); enum INCLUDE_NPTH_T { DO_NOT_INCLUDE_NPTH = false, INCLUDE_NPTH = true }; /** * GetPadCount * returns the number of pads. * * @param aIncludeNPTH includes non-plated through holes when true. Does not include * non-plated through holes when false. * @return the number of pads according to \a aIncludeNPTH. */ unsigned GetPadCount() const { return m_Pads.GetCount() ; } unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH ) const; double GetArea() const { return m_Surface; } Loading