diff --git a/3d-viewer/3d_canvas/board_adapter.h b/3d-viewer/3d_canvas/board_adapter.h
index eeb9fdf513..434a3b3708 100644
--- a/3d-viewer/3d_canvas/board_adapter.h
+++ b/3d-viewer/3d_canvas/board_adapter.h
@@ -540,12 +540,12 @@ class BOARD_ADAPTER
void createNewTrack( const TRACK* aTrack, CGENERICCONTAINER2D *aDstContainer,
int aClearanceValue );
- void createNewPadWithClearance( const D_PAD *aPad,
+ void createNewPadWithClearance( const PAD *aPad,
CGENERICCONTAINER2D *aDstContainer,
PCB_LAYER_ID aLayer,
wxSize aClearanceValue ) const;
- COBJECT2D *createNewPadDrill( const D_PAD* aPad, int aInflateValue );
+ COBJECT2D *createNewPadDrill( const PAD* aPad, int aInflateValue );
void AddPadsShapesWithClearanceToContainer( const MODULE *aModule,
CGENERICCONTAINER2D *aDstContainer,
@@ -587,12 +587,12 @@ class BOARD_ADAPTER
CGENERICCONTAINER2D *aDstContainer,
const BOARD_ITEM &aBoardItem );
- void buildPadShapeThickOutlineAsSegments( const D_PAD *aPad,
+ void buildPadShapeThickOutlineAsSegments( const PAD *aPad,
CGENERICCONTAINER2D *aDstContainer,
int aWidth );
// Helper functions to create poly contours
- void buildPadShapeThickOutlineAsPolygon( const D_PAD *aPad,
+ void buildPadShapeThickOutlineAsPolygon( const PAD *aPad,
SHAPE_POLY_SET &aCornerBuffer,
int aWidth) const;
diff --git a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp
index c434105326..793fe2ee53 100644
--- a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp
+++ b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp
@@ -330,7 +330,7 @@ void BOARD_ADAPTER::createNewTrack( const TRACK* aTrack, CGENERICCONTAINER2D *aD
}
-void BOARD_ADAPTER::createNewPadWithClearance( const D_PAD* aPad,
+void BOARD_ADAPTER::createNewPadWithClearance( const PAD* aPad,
CGENERICCONTAINER2D *aDstContainer,
PCB_LAYER_ID aLayer,
wxSize aClearanceValue ) const
@@ -347,7 +347,7 @@ void BOARD_ADAPTER::createNewPadWithClearance( const D_PAD* aPad,
if( ( aClearanceValue.x < 0 || aClearanceValue.x != aClearanceValue.y )
&& aPad->GetShape() != PAD_SHAPE_CUSTOM )
{
- D_PAD dummy( *aPad );
+ PAD dummy( *aPad );
dummy.SetSize( aPad->GetSize() + aClearanceValue + aClearanceValue );
dummy.TransformShapeWithClearanceToPolygon( poly, aLayer, 0, ARC_HIGH_DEF, ERROR_INSIDE );
aClearanceValue = { 0, 0 };
@@ -435,7 +435,7 @@ void BOARD_ADAPTER::createNewPadWithClearance( const D_PAD* aPad,
}
-COBJECT2D *BOARD_ADAPTER::createNewPadDrill( const D_PAD* aPad, int aInflateValue )
+COBJECT2D *BOARD_ADAPTER::createNewPadDrill( const PAD* aPad, int aInflateValue )
{
wxSize drillSize = aPad->GetDrillSize();
@@ -481,7 +481,7 @@ void BOARD_ADAPTER::AddPadsShapesWithClearanceToContainer( const MODULE* aModule
bool aSkipPlatedPads,
bool aSkipNonPlatedPads )
{
- for( D_PAD* pad : aModule->Pads() )
+ for( PAD* pad : aModule->Pads() )
{
if( !pad->IsOnLayer( aLayerId ) )
continue;
@@ -840,7 +840,7 @@ void BOARD_ADAPTER::AddSolidAreasShapesToContainer( const ZONE* aZoneContainer,
-void BOARD_ADAPTER::buildPadShapeThickOutlineAsSegments( const D_PAD* aPad,
+void BOARD_ADAPTER::buildPadShapeThickOutlineAsSegments( const PAD* aPad,
CGENERICCONTAINER2D *aDstContainer,
int aWidth )
{
diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp
index 559608aa2a..601a58f7c8 100644
--- a/3d-viewer/3d_canvas/create_layer_items.cpp
+++ b/3d-viewer/3d_canvas/create_layer_items.cpp
@@ -465,7 +465,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// /////////////////////////////////////////////////////////////////////////
for( MODULE* module : m_board->Modules() )
{
- for( D_PAD* pad : module->Pads() )
+ for( PAD* pad : module->Pads() )
{
const wxSize padHole = pad->GetDrillSize();
@@ -499,7 +499,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// /////////////////////////////////////////////////////////////////////////
for( MODULE* module : m_board->Modules() )
{
- for( D_PAD* pad : module->Pads() )
+ for( PAD* pad : module->Pads() )
{
const wxSize padHole = pad->GetDrillSize();
@@ -1000,7 +1000,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
int linewidth = g_DrawDefaultLineThickness;
- for( D_PAD* pad : module->Pads() )
+ for( PAD* pad : module->Pads() )
{
if( !pad->IsOnLayer( curr_layer_id ) )
continue;
@@ -1027,7 +1027,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
const int linewidth = g_DrawDefaultLineThickness;
- for( D_PAD* pad : module->Pads() )
+ for( PAD* pad : module->Pads() )
{
if( !pad->IsOnLayer( curr_layer_id ) )
continue;
diff --git a/3d-viewer/3d_canvas/create_layer_poly.cpp b/3d-viewer/3d_canvas/create_layer_poly.cpp
index 00da10e731..49c9305e4f 100644
--- a/3d-viewer/3d_canvas/create_layer_poly.cpp
+++ b/3d-viewer/3d_canvas/create_layer_poly.cpp
@@ -34,7 +34,7 @@
#include
-void BOARD_ADAPTER::buildPadShapeThickOutlineAsPolygon( const D_PAD* aPad,
+void BOARD_ADAPTER::buildPadShapeThickOutlineAsPolygon( const PAD* aPad,
SHAPE_POLY_SET& aCornerBuffer,
int aWidth ) const
{
diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp
index b98496678c..f82b1ccb3c 100644
--- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp
+++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp
@@ -749,7 +749,7 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
{
case PCB_PAD_T:
{
- D_PAD* item = dynamic_cast( intersectedBoardItem );
+ PAD* item = dynamic_cast( intersectedBoardItem );
if( item )
{
diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp
index e5ffc7a219..1ac4bcc59f 100644
--- a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp
+++ b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp
@@ -1161,7 +1161,7 @@ void C3D_RENDER_RAYTRACING::insert3DViaHole( const VIA* aVia )
// Based on draw3DPadHole from
// 3d_draw_helper_functions.cpp
-void C3D_RENDER_RAYTRACING::insert3DPadHole( const D_PAD* aPad )
+void C3D_RENDER_RAYTRACING::insert3DPadHole( const PAD* aPad )
{
const COBJECT2D *object2d_A = NULL;
diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_raytracing.h b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_raytracing.h
index c36a4e3c22..6dca9a67af 100644
--- a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_raytracing.h
+++ b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_raytracing.h
@@ -205,7 +205,7 @@ private:
void add_3D_vias_and_pads_to_container();
void insert3DViaHole( const VIA* aVia );
- void insert3DPadHole( const D_PAD* aPad );
+ void insert3DPadHole( const PAD* aPad );
void load_3D_models( CCONTAINER &aDstContainer, bool aSkipMaterialInformation );
void add_3D_models( CCONTAINER &aDstContainer,
const S3DMODEL *a3DModel,
diff --git a/common/hash_eda.cpp b/common/hash_eda.cpp
index 8d920508c1..3e40bb39e1 100644
--- a/common/hash_eda.cpp
+++ b/common/hash_eda.cpp
@@ -74,7 +74,7 @@ size_t hash_eda( const EDA_ITEM* aItem, int aFlags )
case PCB_PAD_T:
{
- const D_PAD* pad = static_cast( aItem );
+ const PAD* pad = static_cast( aItem );
ret = hash{}( pad->GetShape() << 16 );
hash_combine( ret, pad->GetDrillShape() << 18 );
diff --git a/include/board_design_settings.h b/include/board_design_settings.h
index 4d0301c2db..2921a66d45 100644
--- a/include/board_design_settings.h
+++ b/include/board_design_settings.h
@@ -300,7 +300,7 @@ public:
wxPoint m_AuxOrigin; ///< origin for plot exports
wxPoint m_GridOrigin; ///< origin for grid offsets
- D_PAD m_Pad_Master; // A dummy pad to store all default parameters
+ PAD m_Pad_Master; // A dummy pad to store all default parameters
// when importing values or creating a new pad
// Set to true if the board has a stackup management.
diff --git a/include/class_board_item.h b/include/class_board_item.h
index 345c106ea4..1a3efcc784 100644
--- a/include/class_board_item.h
+++ b/include/class_board_item.h
@@ -236,9 +236,8 @@ public:
/**
* Function IsOnLayer
- * tests to see if this object is on the given layer. Is virtual so
- * objects like D_PAD, which reside on multiple layers can do their own
- * form of testing.
+ * tests to see if this object is on the given layer. Virtual so objects like PAD, which
+ * reside on multiple layers can do their own form of testing.
* @param aLayer The layer to test for.
* @return bool - true if on given layer, else false.
*/
diff --git a/include/core/typeinfo.h b/include/core/typeinfo.h
index cb86cfeb74..fd1da36eef 100644
--- a/include/core/typeinfo.h
+++ b/include/core/typeinfo.h
@@ -87,7 +87,7 @@ enum KICAD_T
// Items in pcb
PCB_MODULE_T, ///< class MODULE, a footprint
- PCB_PAD_T, ///< class D_PAD, a pad in a footprint
+ PCB_PAD_T, ///< class PAD, a pad in a footprint
PCB_SHAPE_T, ///< class PCB_SHAPE, a segment not on copper layers
PCB_TEXT_T, ///< class PCB_TEXT, text on a layer
PCB_FP_TEXT_T, ///< class FP_TEXT, text in a footprint
diff --git a/include/pad_shapes.h b/include/pad_shapes.h
index 238503eda6..3f14e70c87 100644
--- a/include/pad_shapes.h
+++ b/include/pad_shapes.h
@@ -28,7 +28,7 @@
/**
* Enum PAD_SHAPE_T
- * is the set of pad shapes, used with D_PAD::{Set,Get}Shape()
+ * is the set of pad shapes, used with PAD::{Set,Get}Shape()
*/
enum PAD_SHAPE_T
{
@@ -61,7 +61,7 @@ static inline std::string PAD_SHAPE_T_asString( PAD_SHAPE_T a )
/**
* Enum PAD_DRILL_SHAPE_T
- * is the set of pad drill shapes, used with D_PAD::{Set,Get}DrillShape()
+ * is the set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
*/
enum PAD_DRILL_SHAPE_T
{
@@ -72,7 +72,7 @@ enum PAD_DRILL_SHAPE_T
/**
* Enum PAD_ATTR_T
- * is the set of pad shapes, used with D_PAD::{Set,Get}Attribute()
+ * is the set of pad shapes, used with PAD::{Set,Get}Attribute()
* The double name is for convenience of Python devs
*/
enum PAD_ATTR_T
diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h
index af1228d960..7a61986302 100644
--- a/include/pcb_base_frame.h
+++ b/include/pcb_base_frame.h
@@ -52,7 +52,7 @@ class BOARD_CONNECTED_ITEM;
class COLOR_SETTINGS;
class MODULE;
class TRACK;
-class D_PAD;
+class PAD;
class EDA_3D_VIEWER;
class GENERAL_COLLECTOR;
class GENERAL_COLLECTORS_GUIDE;
@@ -309,7 +309,7 @@ public:
*/
void PlaceFootprint( MODULE* aFootprint, bool aRecreateRatsnest = true );
- void ShowPadPropertiesDialog( D_PAD* aPad );
+ void ShowPadPropertiesDialog( PAD* aPad );
/**
* Function SelectFootprintFromLibTree
diff --git a/include/view/view_item.h b/include/view/view_item.h
index 1289f3c5f0..11bf1dce15 100644
--- a/include/view/view_item.h
+++ b/include/view/view_item.h
@@ -119,9 +119,9 @@ public:
/**
* Function ViewGetLayers()
- * Returns the all the layers within the VIEW the object is painted on. For instance, a D_PAD
- * spans zero or more copper layers and a few technical layers. ViewDraw() or PAINTER::Draw() is
- * repeatedly called for each of the layers returned by ViewGetLayers(), depending on the
+ * Returns the all the layers within the VIEW the object is painted on. For instance, a PAD
+ * spans zero or more copper layers and a few technical layers. ViewDraw() or PAINTER::Draw()
+ * is repeatedly called for each of the layers returned by ViewGetLayers(), depending on the
* rendering order.
* @param aLayers[]: output layer index array
* @param aCount: number of layer indices in aLayers[]
diff --git a/pcbnew/array_creator.cpp b/pcbnew/array_creator.cpp
index 58fcfa04d9..0b43bc5c7b 100644
--- a/pcbnew/array_creator.cpp
+++ b/pcbnew/array_creator.cpp
@@ -173,7 +173,7 @@ void ARRAY_CREATOR::Invoke()
// Renumber non-aperture pads.
if( this_item->Type() == PCB_PAD_T )
{
- auto& pad = static_cast( *this_item );
+ PAD& pad = static_cast( *this_item );
if( PAD_NAMING::PadCanHaveName( pad ) )
{
diff --git a/pcbnew/autorouter/ar_autoplacer.cpp b/pcbnew/autorouter/ar_autoplacer.cpp
index ce84e10131..c8d7a6c5c3 100644
--- a/pcbnew/autorouter/ar_autoplacer.cpp
+++ b/pcbnew/autorouter/ar_autoplacer.cpp
@@ -306,7 +306,7 @@ void AR_AUTOPLACER::addFpBody( wxPoint aStart, wxPoint aEnd, LSET aLayerMask )
}
}
-void AR_AUTOPLACER::addPad( D_PAD* aPad, int aClearance )
+void AR_AUTOPLACER::addPad( PAD* aPad, int aClearance )
{
// Add a polygonal shape (rectangle) to m_fpAreaFront and/or m_fpAreaBack
EDA_RECT bbox = aPad->GetBoundingBox();
@@ -356,7 +356,7 @@ void AR_AUTOPLACER::buildFpAreas( MODULE* aFootprint, int aFpClearance )
addFpBody( fpBBox.GetOrigin(), fpBBox.GetEnd(), layerMask );
// Trace pads + clearance areas.
- for( D_PAD* pad : aFootprint->Pads() )
+ for( PAD* pad : aFootprint->Pads() )
{
int margin = (m_matrix.m_GridRouting / 2) + pad->GetOwnClearance( pad->GetLayer() );
addPad( pad, margin );
@@ -410,7 +410,7 @@ void AR_AUTOPLACER::genModuleOnRoutingMatrix( MODULE* Module )
CELL_IS_MODULE, AR_MATRIX::WRITE_OR_CELL );
// Trace pads + clearance areas.
- for( D_PAD* pad : Module->Pads() )
+ for( PAD* pad : Module->Pads() )
{
int margin = (m_matrix.m_GridRouting / 2) + pad->GetOwnClearance( pad->GetLayer() );
m_matrix.PlacePad( pad, CELL_IS_MODULE, margin, AR_MATRIX::WRITE_OR_CELL );
@@ -679,10 +679,10 @@ int AR_AUTOPLACER::getOptimalModulePlacement(MODULE* aModule)
}
-const D_PAD* AR_AUTOPLACER::nearestPad( MODULE *aRefModule, D_PAD* aRefPad, const wxPoint& aOffset)
+const PAD* AR_AUTOPLACER::nearestPad( MODULE *aRefModule, PAD* aRefPad, const wxPoint& aOffset)
{
- const D_PAD* nearest = nullptr;
- int64_t nearestDist = INT64_MAX;
+ const PAD* nearest = nullptr;
+ int64_t nearestDist = INT64_MAX;
for ( auto mod : m_board->Modules() )
{
diff --git a/pcbnew/autorouter/ar_autoplacer.h b/pcbnew/autorouter/ar_autoplacer.h
index 33a5012392..65067f3b3b 100644
--- a/pcbnew/autorouter/ar_autoplacer.h
+++ b/pcbnew/autorouter/ar_autoplacer.h
@@ -109,17 +109,17 @@ private:
MODULE* pickModule();
void placeModule( MODULE* aModule, bool aDoNotRecreateRatsnest, const wxPoint& aPos );
- const D_PAD* nearestPad( MODULE* aRefModule, D_PAD* aRefPad, const wxPoint& aOffset );
+ const PAD* nearestPad( MODULE* aRefModule, PAD* aRefPad, const wxPoint& aOffset );
// Add a polygonal shape (rectangle) to m_fpAreaFront and/or m_fpAreaBack
- void addFpBody( wxPoint aStart, wxPoint aEnd, LSET aLayerMask );
+ void addFpBody( wxPoint aStart, wxPoint aEnd, LSET aLayerMask );
// Add a polygonal shape (rectangle) to m_fpAreaFront and/or m_fpAreaBack
- void addPad( D_PAD* aPad, int aClearance );
+ void addPad( PAD* aPad, int aClearance );
// Build m_fpAreaTop and m_fpAreaBottom polygonal shapes for aFootprint.
// aFpClearance is a mechanical clearance.
- void buildFpAreas( MODULE* aFootprint, int aFpClearance );
+ void buildFpAreas( MODULE* aFootprint, int aFpClearance );
AR_MATRIX m_matrix;
SHAPE_POLY_SET m_topFreeArea; // The polygonal description of the top side free areas;
diff --git a/pcbnew/autorouter/ar_matrix.cpp b/pcbnew/autorouter/ar_matrix.cpp
index b924502414..ada9a634f0 100644
--- a/pcbnew/autorouter/ar_matrix.cpp
+++ b/pcbnew/autorouter/ar_matrix.cpp
@@ -910,7 +910,7 @@ void AR_MATRIX::CreateKeepOutRectangle(
}
-void AR_MATRIX::PlacePad( D_PAD* aPad, int color, int marge, AR_MATRIX::CELL_OP op_logic )
+void AR_MATRIX::PlacePad( PAD* aPad, int color, int marge, AR_MATRIX::CELL_OP op_logic )
{
int dx, dy;
wxPoint shape_pos = aPad->ShapePos();
diff --git a/pcbnew/autorouter/ar_matrix.h b/pcbnew/autorouter/ar_matrix.h
index 8a8029dd38..b195a749ba 100644
--- a/pcbnew/autorouter/ar_matrix.h
+++ b/pcbnew/autorouter/ar_matrix.h
@@ -34,7 +34,7 @@
class PCB_SHAPE;
class TRACK;
-class D_PAD;
+class PAD;
class MODULE;
#define AR_MAX_ROUTING_LAYERS_COUNT 2
@@ -131,24 +131,30 @@ public:
void SetDist( int aRow, int aCol, int aSide, DIST_CELL );
void TraceSegmentPcb( PCB_SHAPE* pt_segm, int color, int marge, AR_MATRIX::CELL_OP op_logic );
- void CreateKeepOutRectangle(
- int ux0, int uy0, int ux1, int uy1, int marge, int aKeepOut, LSET aLayerMask );
- void PlacePad( D_PAD* aPad, int color, int marge, AR_MATRIX::CELL_OP op_logic );
+
+ void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, int marge, int aKeepOut,
+ LSET aLayerMask );
+
+ void PlacePad( PAD* aPad, int color, int marge, AR_MATRIX::CELL_OP op_logic );
+
void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, double angle, LSET aLayerMask,
- int color, AR_MATRIX::CELL_OP op_logic );
+ int color, AR_MATRIX::CELL_OP op_logic );
+
void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, LSET aLayerMask, int color,
- AR_MATRIX::CELL_OP op_logic );
+ AR_MATRIX::CELL_OP op_logic );
private:
void drawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, LAYER_NUM layer, int color,
CELL_OP op_logic );
void traceCircle( int ux0, int uy0, int ux1, int uy1, int lg, LAYER_NUM layer, int color,
- AR_MATRIX::CELL_OP op_logic );
- void traceFilledCircle(
- int cx, int cy, int radius, LSET aLayerMask, int color, AR_MATRIX::CELL_OP op_logic );
+ AR_MATRIX::CELL_OP op_logic );
+
+ void traceFilledCircle( int cx, int cy, int radius, LSET aLayerMask, int color,
+ AR_MATRIX::CELL_OP op_logic );
+
void traceArc( int ux0, int uy0, int ux1, int uy1, double ArcAngle, int lg, LAYER_NUM layer,
- int color, AR_MATRIX::CELL_OP op_logic );
+ int color, AR_MATRIX::CELL_OP op_logic );
};
#endif
diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp
index 980d3b8946..76db4d8767 100644
--- a/pcbnew/board.cpp
+++ b/pcbnew/board.cpp
@@ -516,7 +516,7 @@ void BOARD::SetElementVisibility( GAL_LAYER_ID aLayer, bool isEnabled )
for( MODULE* footprint : Modules() )
{
- for( D_PAD* pad : footprint->Pads() )
+ for( PAD* pad : footprint->Pads() )
pad->SetLocalRatsnestVisible( isEnabled );
}
@@ -773,7 +773,7 @@ BOARD_ITEM* BOARD::GetItem( const KIID& aID ) const
if( footprint->m_Uuid == aID )
return footprint;
- for( D_PAD* pad : footprint->Pads() )
+ for( PAD* pad : footprint->Pads() )
{
if( pad->m_Uuid == aID )
return pad;
@@ -848,7 +848,7 @@ void BOARD::FillItemMap( std::map& aMap )
{
aMap[ footprint->m_Uuid ] = footprint;
- for( D_PAD* pad : footprint->Pads() )
+ for( PAD* pad : footprint->Pads() )
aMap[ pad->m_Uuid ] = pad;
aMap[ footprint->Reference().m_Uuid ] = &footprint->Reference();
@@ -977,7 +977,7 @@ unsigned BOARD::GetNodesCount( int aNet ) const
for( MODULE* footprint : Modules() )
{
- for( D_PAD* pad : footprint->Pads() )
+ for( PAD* pad : footprint->Pads() )
{
if( ( aNet == -1 && pad->GetNetCode() > 0 ) || aNet == pad->GetNetCode() )
retval++;
@@ -1329,11 +1329,11 @@ int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount )
{
// Build the pad count by net:
padCountListByNet.clear();
- std::vector pads = GetPads();
+ std::vector pads = GetPads();
padCountListByNet.assign( max_netcode + 1, 0 );
- for( D_PAD* pad : pads )
+ for( PAD* pad : pads )
{
int netCode = pad->GetNetCode();
@@ -1443,14 +1443,14 @@ int BOARD::SetAreasNetCodesFromNetNames()
}
-D_PAD* BOARD::GetPad( const wxPoint& aPosition, LSET aLayerSet )
+PAD* BOARD::GetPad( const wxPoint& aPosition, LSET aLayerSet )
{
if( !aLayerSet.any() )
aLayerSet = LSET::AllCuMask();
for( MODULE* footprint : m_modules )
{
- D_PAD* pad = NULL;
+ PAD* pad = NULL;
if( footprint->HitTest( aPosition ) )
pad = footprint->GetPad( aPosition, aLayerSet );
@@ -1463,7 +1463,7 @@ D_PAD* BOARD::GetPad( const wxPoint& aPosition, LSET aLayerSet )
}
-D_PAD* BOARD::GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint )
+PAD* BOARD::GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint )
{
const wxPoint& aPosition = aTrace->GetEndPoint( aEndPoint );
@@ -1473,11 +1473,11 @@ D_PAD* BOARD::GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint )
}
-D_PAD* BOARD::GetPadFast( const wxPoint& aPosition, LSET aLayerSet )
+PAD* BOARD::GetPadFast( const wxPoint& aPosition, LSET aLayerSet )
{
for( MODULE* footprint : Modules() )
{
- for( D_PAD* pad : footprint->Pads() )
+ for( PAD* pad : footprint->Pads() )
{
if( pad->GetPosition() != aPosition )
continue;
@@ -1492,7 +1492,7 @@ D_PAD* BOARD::GetPadFast( const wxPoint& aPosition, LSET aLayerSet )
}
-D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, LSET aLayerSet )
+PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, LSET aLayerSet )
{
// Search aPadList for aPosition
// aPadList is sorted by X then Y values, and a fast binary search is used
@@ -1511,7 +1511,7 @@ D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, L
delta /= 2;
- D_PAD* pad = aPadList[idx];
+ PAD* pad = aPadList[idx];
if( pad->GetPosition() == aPosition ) // candidate found
{
@@ -1591,7 +1591,7 @@ D_PAD* BOARD::GetPad( std::vector& aPadList, const wxPoint& aPosition, L
*
* This function is used to build ordered pads lists
*/
-bool sortPadsByXthenYCoord( D_PAD* const & ref, D_PAD* const & comp )
+bool sortPadsByXthenYCoord( PAD* const & ref, PAD* const & comp )
{
if( ref->GetPosition().x == comp->GetPosition().x )
return ref->GetPosition().y < comp->GetPosition().y;
@@ -1599,11 +1599,11 @@ bool sortPadsByXthenYCoord( D_PAD* const & ref, D_PAD* const & comp )
}
-void BOARD::GetSortedPadListByXthenYCoord( std::vector& aVector, int aNetCode )
+void BOARD::GetSortedPadListByXthenYCoord( std::vector& aVector, int aNetCode )
{
for( MODULE* footprint : Modules() )
{
- for( D_PAD* pad : footprint->Pads( ) )
+ for( PAD* pad : footprint->Pads( ) )
{
if( aNetCode < 0 || pad->GetNetCode() == aNetCode )
aVector.push_back( pad );
@@ -1614,7 +1614,7 @@ void BOARD::GetSortedPadListByXthenYCoord( std::vector& aVector, int aNe
}
-void BOARD::PadDelete( D_PAD* aPad )
+void BOARD::PadDelete( PAD* aPad )
{
GetConnectivity()->Remove( aPad );
@@ -1644,7 +1644,7 @@ std::tuple BOARD::GetTrackLength( const TRACK& aTrack ) con
for( auto pad_it : connectivity->GetConnectedPads( item ) )
{
- D_PAD* pad = static_cast( pad_it );
+ PAD* pad = static_cast( pad_it );
if( pad->HitTest( track->GetStart(), track->GetWidth() / 2 )
&& pad->HitTest( track->GetEnd(), track->GetWidth() / 2 ) )
@@ -1657,7 +1657,7 @@ std::tuple BOARD::GetTrackLength( const TRACK& aTrack ) con
if( !inPad )
length += track->GetLength();
}
- else if( D_PAD* pad = dyn_cast( item ) )
+ else if( PAD* pad = dyn_cast( item ) )
{
package_length += pad->GetPadToDieLength();
}
@@ -1856,13 +1856,13 @@ bool BOARD::GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines, wxString* aError
}
-const std::vector BOARD::GetPads() const
+const std::vector BOARD::GetPads() const
{
- std::vector allPads;
+ std::vector allPads;
for( MODULE* footprint : Modules() )
{
- for( D_PAD* pad : footprint->Pads() )
+ for( PAD* pad : footprint->Pads() )
allPads.push_back( pad );
}
@@ -1890,7 +1890,7 @@ const std::vector BOARD::AllConnectedItems()
for( MODULE* footprint : Modules() )
{
- for( D_PAD* pad : footprint->Pads() )
+ for( PAD* pad : footprint->Pads() )
items.push_back( pad );
}
diff --git a/pcbnew/board.h b/pcbnew/board.h
index 725b6f6ec1..c1c5c53ec8 100644
--- a/pcbnew/board.h
+++ b/pcbnew/board.h
@@ -43,7 +43,7 @@ class PICKED_ITEMS_LIST;
class BOARD;
class ZONE;
class TRACK;
-class D_PAD;
+class PAD;
class MARKER_PCB;
class MSG_PANEL_ITEM;
class NETLIST;
@@ -701,7 +701,7 @@ public:
*
* @return D_PADS - a full list of pads
*/
- const std::vector GetPads() const;
+ const std::vector GetPads() const;
void BuildListOfNets()
{
@@ -990,10 +990,10 @@ public:
*
* @param aPosition A wxPoint object containing the position to hit test.
* @param aLayerMask A layer or layers to mask the hit test.
- * @return A pointer to a D_PAD object if found or NULL if not found.
+ * @return A pointer to a PAD object if found or NULL if not found.
*/
- D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
- D_PAD* GetPad( const wxPoint& aPosition )
+ PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask );
+ PAD* GetPad( const wxPoint& aPosition )
{
return GetPad( aPosition, LSET().set() );
}
@@ -1003,9 +1003,9 @@ public:
*
* @param aTrace A pointer to a TRACK object to hit test against.
* @param aEndPoint The end point of \a aTrace the hit test against.
- * @return A pointer to a D_PAD object if found or NULL if not found.
+ * @return A pointer to a PAD object if found or NULL if not found.
*/
- D_PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
+ PAD* GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint );
/**
* Return pad found at \a aPosition on \a aLayerMask using the fast search method.
@@ -1014,9 +1014,9 @@ public:
*
* @param aPosition A wxPoint object containing the position to hit test.
* @param aLayerMask A layer or layers to mask the hit test.
- * @return A pointer to a D_PAD object if found or NULL if not found.
+ * @return A pointer to a PAD object if found or NULL if not found.
*/
- D_PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
+ PAD* GetPadFast( const wxPoint& aPosition, LSET aLayerMask );
/**
* Locate the pad connected at \a aPosition on \a aLayer starting at list position
@@ -1027,19 +1027,19 @@ public:
* function.
*
* @note The normal pad list is sorted by increasing netcodes.
- * @param aPadList = the list of pads candidates (a std::vector)
+ * @param aPadList = the list of pads candidates (a std::vector)
* @param aPosition A wxPoint object containing the position to test.
* @param aLayerMask A layer or layers to mask the hit test.
- * @return a D_PAD object pointer to the connected pad.
+ * @return a PAD object pointer to the connected pad.
*/
- D_PAD* GetPad( std::vector& aPadList, const wxPoint& aPosition, LSET aLayerMask );
+ PAD* GetPad( std::vector& aPadList, const wxPoint& aPosition, LSET aLayerMask );
/**
* Delete a given pad from the BOARD by removing it from its module and
* from the m_NetInfo. Makes no UI calls.
* @param aPad is the pad to delete.
*/
- void PadDelete( D_PAD* aPad );
+ void PadDelete( PAD* aPad );
/**
* First empties then fills the vector with all pads and sorts them by
@@ -1052,7 +1052,7 @@ public:
* = -1 to build the full pad list.
* = a given netcode to build the pad list relative to the given net
*/
- void GetSortedPadListByXthenYCoord( std::vector& aVector, int aNetCode = -1 );
+ void GetSortedPadListByXthenYCoord( std::vector& aVector, int aNetCode = -1 );
/**
* Returns data on the length and number of track segments connected to a given track.
diff --git a/pcbnew/board_connected_item.h b/pcbnew/board_connected_item.h
index d1809429b1..cfe5e111ff 100644
--- a/pcbnew/board_connected_item.h
+++ b/pcbnew/board_connected_item.h
@@ -32,7 +32,7 @@
class NETCLASS;
class TRACK;
-class D_PAD;
+class PAD;
/**
* BOARD_CONNECTED_ITEM
diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp
index ee8996a393..4c85e9059b 100644
--- a/pcbnew/board_items_to_polygon_shape_transform.cpp
+++ b/pcbnew/board_items_to_polygon_shape_transform.cpp
@@ -131,7 +131,7 @@ void MODULE::TransformPadsShapesWithClearanceToPolygon( SHAPE_POLY_SET& aCornerB
bool aSkipPlatedPads,
bool aSkipNonPlatedPads ) const
{
- for( D_PAD* pad : m_pads )
+ for( PAD* pad : m_pads )
{
if( aLayer != UNDEFINED_LAYER && !pad->IsOnLayer(aLayer) )
continue;
@@ -201,7 +201,7 @@ void MODULE::TransformPadsShapesWithClearanceToPolygon( SHAPE_POLY_SET& aCornerB
if( ( clearance.x < 0 || clearance.x != clearance.y )
&& pad->GetShape() != PAD_SHAPE_CUSTOM )
{
- D_PAD dummy( *pad );
+ PAD dummy( *pad );
dummy.SetSize( pad->GetSize() + clearance + clearance );
dummy.TransformShapeWithClearanceToPolygon( aCornerBuffer, aLayer, 0,
aMaxError, aErrorLoc );
@@ -560,10 +560,10 @@ void TRACK::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
}
-void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
- PCB_LAYER_ID aLayer, int aClearanceValue,
- int aError, ERROR_LOC aErrorLoc,
- bool ignoreLineWidth ) const
+void PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
+ PCB_LAYER_ID aLayer, int aClearanceValue,
+ int aError, ERROR_LOC aErrorLoc,
+ bool ignoreLineWidth ) const
{
wxASSERT_MSG( !ignoreLineWidth, "IgnoreLineWidth has no meaning for pads." );
@@ -685,7 +685,7 @@ void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
break;
default:
- wxFAIL_MSG( "D_PAD::TransformShapeWithClearanceToPolygon no implementation for "
+ wxFAIL_MSG( "PAD::TransformShapeWithClearanceToPolygon no implementation for "
+ PAD_SHAPE_T_asString( GetShape() ) );
break;
}
@@ -693,8 +693,8 @@ void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
-bool D_PAD::TransformHoleWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer, int aInflateValue,
- int aError, ERROR_LOC aErrorLoc ) const
+bool PAD::TransformHoleWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer, int aInflateValue,
+ int aError, ERROR_LOC aErrorLoc ) const
{
wxSize drillsize = GetDrillSize();
diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp
index b5282fe108..1196187bb6 100644
--- a/pcbnew/collectors.cpp
+++ b/pcbnew/collectors.cpp
@@ -190,7 +190,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
BOARD_ITEM* item = (BOARD_ITEM*) testItem;
MODULE* module = nullptr;
PCB_GROUP* group = nullptr;
- D_PAD* pad = nullptr;
+ PAD* pad = nullptr;
bool pad_through = false;
VIA* via = nullptr;
MARKER_PCB* marker = nullptr;
@@ -278,7 +278,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
// board side must be seen
// if pad is a thru hole, then it can be visible when its parent module is not.
// for through pads: pads on Front or Back board sides must be seen
- pad = (D_PAD*) item;
+ pad = static_cast( item );
if( (pad->GetAttribute() != PAD_ATTRIB_SMD) &&
(pad->GetAttribute() != PAD_ATTRIB_CONN) ) // a hole is present, so multiple layers
diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h
index 5e5760279d..d7f2d8f1e3 100644
--- a/pcbnew/collectors.h
+++ b/pcbnew/collectors.h
@@ -278,7 +278,7 @@ public:
/**
* A scan list for all primary board items, omitting items which are subordinate to
- * a MODULE, such as D_PAD and TEXTEMODULE.
+ * a MODULE, such as PAD and FP_TEXT.
*/
static const KICAD_T BoardLevelItems[];
diff --git a/pcbnew/connectivity/connectivity_algo.cpp b/pcbnew/connectivity/connectivity_algo.cpp
index 3b3cb16270..47ec8b0e21 100644
--- a/pcbnew/connectivity/connectivity_algo.cpp
+++ b/pcbnew/connectivity/connectivity_algo.cpp
@@ -140,7 +140,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
if( m_itemMap.find ( aItem ) != m_itemMap.end() )
return false;
- add( m_itemList, static_cast( aItem ) );
+ add( m_itemList, static_cast( aItem ) );
break;
@@ -450,9 +450,9 @@ void CN_CONNECTIVITY_ALGO::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
reportProgress( aReporter, ii++, size, delta );
}
- for( MODULE* mod : aBoard->Modules() )
+ for( MODULE* footprint : aBoard->Modules() )
{
- for( D_PAD* pad : mod->Pads() )
+ for( PAD* pad : footprint->Pads() )
{
Add( pad );
reportProgress( aReporter, ii++, size, delta );
diff --git a/pcbnew/connectivity/connectivity_data.cpp b/pcbnew/connectivity/connectivity_data.cpp
index 1ea4d0718c..24b077ac9e 100644
--- a/pcbnew/connectivity/connectivity_data.cpp
+++ b/pcbnew/connectivity/connectivity_data.cpp
@@ -506,24 +506,24 @@ const
void CONNECTIVITY_DATA::GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem,
- std::set* pads ) const
+ std::set* pads ) const
{
- for( auto citem : m_connAlgo->ItemEntry( aItem ).GetItems() )
+ for( CN_ITEM* citem : m_connAlgo->ItemEntry( aItem ).GetItems() )
{
- for( auto connected : citem->ConnectedItems() )
+ for( CN_ITEM* connected : citem->ConnectedItems() )
{
if( connected->Valid() && connected->Parent()->Type() == PCB_PAD_T )
- pads->insert( static_cast ( connected->Parent() ) );
+ pads->insert( static_cast ( connected->Parent() ) );
}
}
}
-const std::vector CONNECTIVITY_DATA::GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem )
+const std::vector CONNECTIVITY_DATA::GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem )
const
{
- std::set pads;
- std::vector rv;
+ std::set pads;
+ std::vector rv;
GetConnectedPads( aItem, &pads );
@@ -559,7 +559,7 @@ unsigned int CONNECTIVITY_DATA::GetPadCount( int aNet ) const
if( !pad->Valid() || pad->Parent()->Type() != PCB_PAD_T)
continue;
- D_PAD* dpad = static_cast( pad->Parent() );
+ PAD* dpad = static_cast( pad->Parent() );
if( aNet < 0 || aNet == dpad->GetNetCode() )
n++;
@@ -727,7 +727,7 @@ const std::vector CONNECTIVITY_DATA::GetRatsnestForItems( std::vector CONNECTIVITY_DATA::GetRatsnestForComponent( MODULE* aComponent, bool aSkipInternalConnections )
{
std::set nets;
- std::set pads;
+ std::set pads;
std::vector edges;
for( auto pad : aComponent->Pads() )
@@ -745,8 +745,8 @@ const std::vector CONNECTIVITY_DATA::GetRatsnestForComponent( MODULE* a
auto srcNode = edge.GetSourceNode();
auto dstNode = edge.GetTargetNode();
- auto srcParent = static_cast( srcNode->Parent() );
- auto dstParent = static_cast( dstNode->Parent() );
+ const PAD* srcParent = static_cast( srcNode->Parent() );
+ const PAD* dstParent = static_cast( dstNode->Parent() );
bool srcFound = ( pads.find(srcParent) != pads.end() );
bool dstFound = ( pads.find(dstParent) != pads.end() );
diff --git a/pcbnew/connectivity/connectivity_data.h b/pcbnew/connectivity/connectivity_data.h
index 991cf4de07..a3c5b53bd3 100644
--- a/pcbnew/connectivity/connectivity_data.h
+++ b/pcbnew/connectivity/connectivity_data.h
@@ -50,7 +50,7 @@ class ZONE;
class RN_DATA;
class RN_NET;
class TRACK;
-class D_PAD;
+class PAD;
class MODULE;
class PROGRESS_REPORTER;
@@ -191,9 +191,9 @@ public:
const std::vector