From f5443de7f9f862c5ebd744dae0d39a00240ae38c Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Thu, 12 Nov 2020 22:30:02 +0000
Subject: [PATCH] D_PAD -> PAD.

---
 3d-viewer/3d_canvas/board_adapter.h           |   8 +-
 .../3d_canvas/create_3Dgraphic_brd_items.cpp  |  10 +-
 3d-viewer/3d_canvas/create_layer_items.cpp    |   8 +-
 3d-viewer/3d_canvas/create_layer_poly.cpp     |   2 +-
 3d-viewer/3d_canvas/eda_3d_canvas.cpp         |   2 +-
 .../c3d_render_createscene.cpp                |   2 +-
 .../c3d_render_raytracing.h                   |   2 +-
 common/hash_eda.cpp                           |   2 +-
 include/board_design_settings.h               |   2 +-
 include/class_board_item.h                    |   5 +-
 include/core/typeinfo.h                       |   2 +-
 include/pad_shapes.h                          |   6 +-
 include/pcb_base_frame.h                      |   4 +-
 include/view/view_item.h                      |   6 +-
 pcbnew/array_creator.cpp                      |   2 +-
 pcbnew/autorouter/ar_autoplacer.cpp           |  12 +-
 pcbnew/autorouter/ar_autoplacer.h             |   8 +-
 pcbnew/autorouter/ar_matrix.cpp               |   2 +-
 pcbnew/autorouter/ar_matrix.h                 |  26 ++-
 pcbnew/board.cpp                              |  46 ++---
 pcbnew/board.h                                |  28 +--
 pcbnew/board_connected_item.h                 |   2 +-
 ...board_items_to_polygon_shape_transform.cpp |  18 +-
 pcbnew/collectors.cpp                         |   4 +-
 pcbnew/collectors.h                           |   2 +-
 pcbnew/connectivity/connectivity_algo.cpp     |   6 +-
 pcbnew/connectivity/connectivity_data.cpp     |  22 +-
 pcbnew/connectivity/connectivity_data.h       |   6 +-
 pcbnew/connectivity/connectivity_items.cpp    |   4 +-
 pcbnew/connectivity/connectivity_items.h      |   2 +-
 pcbnew/connectivity/from_to_cache.cpp         |   4 +-
 pcbnew/connectivity/from_to_cache.h           |  10 +-
 .../convert_drawsegment_list_to_polygon.cpp   |   2 +-
 pcbnew/cross-probing.cpp                      |   6 +-
 pcbnew/dialogs/dialog_board_statistics.cpp    |   2 +-
 pcbnew/dialogs/dialog_exchange_footprints.cpp |   4 +-
 pcbnew/dialogs/dialog_gendrill.cpp            |   2 +-
 pcbnew/dialogs/dialog_net_inspector.cpp       |   8 +-
 pcbnew/dialogs/dialog_pad_properties.cpp      |  18 +-
 pcbnew/dialogs/dialog_pad_properties.h        |  10 +-
 pcbnew/dialogs/dialog_push_pad_properties.h   |   2 +-
 .../dialogs/dialog_track_via_properties.cpp   |  25 ++-
 pcbnew/dialogs/dialog_track_via_properties.h  |   4 +-
 pcbnew/dialogs/dialog_unused_pad_layers.cpp   |   2 +-
 pcbnew/drc/drc_engine.cpp                     |   2 +-
 pcbnew/drc/drc_test_provider.cpp              |   2 +-
 .../drc_test_provider_copper_clearance.cpp    |  12 +-
 .../drc/drc_test_provider_hole_clearance.cpp  |   6 +-
 pcbnew/drc/drc_test_provider_hole_size.cpp    |   6 +-
 pcbnew/drc/drc_test_provider_lvs.cpp          |   2 +-
 .../drc/drc_test_provider_matched_length.cpp  |   4 +-
 pcbnew/edit.cpp                               |   2 +-
 .../exporters/export_footprints_placefile.cpp |   8 +-
 pcbnew/exporters/export_gencad.cpp            |  26 +--
 pcbnew/exporters/export_hyperlynx.cpp         |  10 +-
 pcbnew/exporters/export_vrml.cpp              |   6 +-
 .../exporters/gendrill_file_writer_base.cpp   |   4 +-
 pcbnew/exporters/gendrill_gerber_writer.cpp   |   4 +-
 pcbnew/exporters/gerber_jobfile_writer.cpp    |   2 +-
 pcbnew/exporters/gerber_placefile_writer.cpp  |  12 +-
 pcbnew/exporters/gerber_placefile_writer.h    |   4 +-
 pcbnew/files.cpp                              |   2 +-
 pcbnew/footprint.cpp                          |  70 +++----
 pcbnew/footprint.h                            |  28 +--
 pcbnew/footprint_editor_utils.cpp             |   9 +-
 pcbnew/kicad_clipboard.cpp                    |   6 +-
 pcbnew/microwave/microwave_footprint.cpp      |   4 +-
 pcbnew/microwave/microwave_inductor.cpp       |   6 +-
 pcbnew/microwave/microwave_polygon.cpp        |   3 +-
 pcbnew/netinfo.h                              |   4 +-
 pcbnew/netinfo_item.cpp                       |   2 +-
 pcbnew/netinfo_list.cpp                       |   2 +-
 .../netlist_reader/board_netlist_updater.cpp  |  28 +--
 pcbnew/netlist_reader/board_netlist_updater.h |  20 +-
 pcbnew/pad.cpp                                | 191 +++++++++---------
 pcbnew/pad.h                                  |  33 ++-
 pcbnew/pad_custom_shape_functions.cpp         |  39 ++--
 pcbnew/pad_naming.cpp                         |   2 +-
 pcbnew/pad_naming.h                           |   4 +-
 pcbnew/pcb_edit_frame.cpp                     |   2 +-
 pcbnew/pcb_edit_frame.h                       |   2 +-
 pcbnew/pcb_expr_evaluator.cpp                 |   4 +-
 pcbnew/pcb_painter.cpp                        |  18 +-
 pcbnew/pcb_painter.h                          |   8 +-
 pcbnew/pcbnew_printout.cpp                    |   4 +-
 pcbnew/pcbnew_printout.h                      |   4 +-
 pcbnew/pcbplot.h                              |   4 +-
 pcbnew/plot_board_layers.cpp                  |   6 +-
 pcbnew/plot_brditems_plotter.cpp              |   6 +-
 pcbnew/plugins/altium/altium_pcb.cpp          |   8 +-
 .../cadstar/cadstar_pcb_archive_loader.cpp    |   8 +-
 .../cadstar/cadstar_pcb_archive_loader.h      |   2 +-
 pcbnew/plugins/eagle/eagle_plugin.cpp         |  12 +-
 pcbnew/plugins/eagle/eagle_plugin.h           |   4 +-
 pcbnew/plugins/geda/gpcb_plugin.cpp           |   4 +-
 pcbnew/plugins/kicad/kicad_plugin.cpp         |  16 +-
 pcbnew/plugins/kicad/kicad_plugin.h           |   4 +-
 pcbnew/plugins/kicad/pcb_parser.cpp           |  26 +--
 pcbnew/plugins/kicad/pcb_parser.h             |   6 +-
 pcbnew/plugins/legacy/legacy_plugin.cpp       |   6 +-
 pcbnew/plugins/legacy/legacy_plugin.h         |   2 +-
 pcbnew/plugins/pcad/pcb_pad.cpp               |   2 +-
 pcbnew/router/pns_kicad_iface.cpp             |  14 +-
 pcbnew/router/pns_kicad_iface.h               |  10 +-
 pcbnew/router/pns_router.h                    |   2 +-
 pcbnew/router/router_tool.cpp                 |   2 +-
 pcbnew/specctra_import_export/specctra.h      |   6 +-
 .../specctra_export.cpp                       |   6 +-
 pcbnew/swig/board_item.i                      |  20 +-
 pcbnew/tools/drawing_tool.cpp                 |   4 +-
 pcbnew/tools/edit_tool.cpp                    |  12 +-
 pcbnew/tools/grid_helper.cpp                  |   6 +-
 pcbnew/tools/pad_tool.cpp                     |  38 ++--
 pcbnew/tools/pad_tool.h                       |   4 +-
 pcbnew/tools/pcb_editor_control.cpp           |   4 +-
 pcbnew/tools/pcb_inspection_tool.cpp          |  22 +-
 pcbnew/tools/pcb_inspection_tool.h            |   2 +-
 pcbnew/tools/pcb_viewer_tools.cpp             |   4 +-
 pcbnew/tools/pcbnew_control.cpp               |   2 +-
 pcbnew/tools/point_editor.cpp                 |  16 +-
 pcbnew/tools/selection_tool.cpp               |  19 +-
 pcbnew/track.h                                |   2 +-
 pcbnew/tracks_cleaner.cpp                     |   6 +-
 pcbnew/zone.cpp                               |   6 +-
 pcbnew/zone.h                                 |   6 +-
 pcbnew/zone_filler.cpp                        |  16 +-
 pcbnew/zone_filler.h                          |   2 +-
 qa/pcbnew/test_array_pad_name_provider.cpp    |   2 +-
 qa/pcbnew/test_pad_naming.cpp                 |  18 +-
 129 files changed, 658 insertions(+), 666 deletions(-)

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 <footprint.h>
 
 
-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<D_PAD *>( intersectedBoardItem );
+                    PAD* item = dynamic_cast<PAD *>( 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<const D_PAD*>( aItem );
+            const PAD* pad = static_cast<const PAD*>( aItem );
 
             ret = hash<int>{}( 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<D_PAD&>( *this_item );
+                    PAD& pad = static_cast<PAD&>( *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<KIID, EDA_ITEM*>& 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<D_PAD*> pads = GetPads();
+        std::vector<PAD*> 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<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerSet )
+PAD* BOARD::GetPad( std::vector<PAD*>& 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<D_PAD*>& 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<D_PAD*>& 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<D_PAD*>& aVector, int aNetCode )
+void BOARD::GetSortedPadListByXthenYCoord( std::vector<PAD*>& 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<D_PAD*>& aVector, int aNe
 }
 
 
-void BOARD::PadDelete( D_PAD* aPad )
+void BOARD::PadDelete( PAD* aPad )
 {
     GetConnectivity()->Remove( aPad );
 
@@ -1644,7 +1644,7 @@ std::tuple<int, double, double> BOARD::GetTrackLength( const TRACK& aTrack ) con
 
             for( auto pad_it : connectivity->GetConnectedPads( item ) )
             {
-                D_PAD* pad = static_cast<D_PAD*>( pad_it );
+                PAD* pad = static_cast<PAD*>( pad_it );
 
                 if( pad->HitTest( track->GetStart(), track->GetWidth() / 2 )
                         && pad->HitTest( track->GetEnd(), track->GetWidth() / 2 ) )
@@ -1657,7 +1657,7 @@ std::tuple<int, double, double> BOARD::GetTrackLength( const TRACK& aTrack ) con
             if( !inPad )
                 length += track->GetLength();
         }
-        else if( D_PAD* pad = dyn_cast<D_PAD*>( item ) )
+        else if( PAD* pad = dyn_cast<PAD*>( item ) )
         {
             package_length += pad->GetPadToDieLength();
         }
@@ -1856,13 +1856,13 @@ bool BOARD::GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines, wxString* aError
 }
 
 
-const std::vector<D_PAD*> BOARD::GetPads() const
+const std::vector<PAD*> BOARD::GetPads() const
 {
-    std::vector<D_PAD*> allPads;
+    std::vector<PAD*> 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_CONNECTED_ITEM*> 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<D_PAD*> GetPads() const;
+    const std::vector<PAD*> 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:
      * </p>
      * @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.
      * </p>
      * @note The normal pad list is sorted by increasing netcodes.
-     * @param aPadList = the list of pads candidates (a std::vector<D_PAD*>)
+     * @param aPadList = the list of pads candidates (a std::vector<PAD*>)
      * @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<D_PAD*>& aPadList, const wxPoint& aPosition, LSET aLayerMask );
+    PAD* GetPad( std::vector<PAD*>& 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<D_PAD*>& aVector, int aNetCode = -1 );
+    void GetSortedPadListByXthenYCoord( std::vector<PAD*>& 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<PAD*>( 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<D_PAD*>( aItem ) );
+        add( m_itemList, static_cast<PAD*>( 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<D_PAD*>* pads ) const
+                                          std::set<PAD*>* 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<D_PAD*> ( connected->Parent() ) );
+                pads->insert( static_cast<PAD*> ( connected->Parent() ) );
         }
     }
 }
 
 
-const std::vector<D_PAD*> CONNECTIVITY_DATA::GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem )
+const std::vector<PAD*> CONNECTIVITY_DATA::GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem )
 const
 {
-    std::set<D_PAD*> pads;
-    std::vector<D_PAD*> rv;
+    std::set<PAD*>    pads;
+    std::vector<PAD*> 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<D_PAD*>( pad->Parent() );
+        PAD* dpad = static_cast<PAD*>( pad->Parent() );
 
         if( aNet < 0 || aNet == dpad->GetNetCode() )
             n++;
@@ -727,7 +727,7 @@ const std::vector<CN_EDGE> CONNECTIVITY_DATA::GetRatsnestForItems( std::vector<B
 const std::vector<CN_EDGE> CONNECTIVITY_DATA::GetRatsnestForComponent( MODULE* aComponent, bool aSkipInternalConnections )
 {
     std::set<int> nets;
-    std::set<const D_PAD*> pads;
+    std::set<const PAD*> pads;
     std::vector<CN_EDGE> edges;
 
     for( auto pad : aComponent->Pads() )
@@ -745,8 +745,8 @@ const std::vector<CN_EDGE> CONNECTIVITY_DATA::GetRatsnestForComponent( MODULE* a
             auto srcNode = edge.GetSourceNode();
             auto dstNode = edge.GetTargetNode();
 
-            auto srcParent = static_cast<const D_PAD*>( srcNode->Parent() );
-            auto dstParent = static_cast<const D_PAD*>( dstNode->Parent() );
+            const PAD* srcParent = static_cast<const PAD*>( srcNode->Parent() );
+            const PAD* dstParent = static_cast<const PAD*>( 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<TRACK*> GetConnectedTracks( const BOARD_CONNECTED_ITEM* aItem ) const;
 
-    const std::vector<D_PAD*> GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem ) const;
+    const std::vector<PAD*> GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem ) const;
 
-    void GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem, std::set<D_PAD*>* pads ) const;
+    void GetConnectedPads( const BOARD_CONNECTED_ITEM* aItem, std::set<PAD*>* pads ) const;
 
     const std::vector<BOARD_CONNECTED_ITEM*> GetConnectedItems( const BOARD_CONNECTED_ITEM* aItem, const VECTOR2I& aAnchor, KICAD_T aTypes[] );
 
diff --git a/pcbnew/connectivity/connectivity_items.cpp b/pcbnew/connectivity/connectivity_items.cpp
index dc6b59cef3..2ec3330bf6 100644
--- a/pcbnew/connectivity/connectivity_items.cpp
+++ b/pcbnew/connectivity/connectivity_items.cpp
@@ -56,7 +56,7 @@ const VECTOR2I CN_ITEM::GetAnchor( int n ) const
     {
     case PCB_PAD_T:
     {
-        D_PAD* pad = (D_PAD*) m_parent;
+        PAD* pad = static_cast<PAD*>( m_parent );
 
         if( n == 0 )
             return VECTOR2I( pad->GetPosition() );
@@ -197,7 +197,7 @@ void CN_ITEM::RemoveInvalidRefs()
 }
 
 
-CN_ITEM* CN_LIST::Add( D_PAD* pad )
+CN_ITEM* CN_LIST::Add( PAD* pad )
  {
     if( !pad->IsOnCopperLayer() )
          return nullptr;
diff --git a/pcbnew/connectivity/connectivity_items.h b/pcbnew/connectivity/connectivity_items.h
index 0966a29b6d..ab08e625fa 100644
--- a/pcbnew/connectivity/connectivity_items.h
+++ b/pcbnew/connectivity/connectivity_items.h
@@ -503,7 +503,7 @@ public:
         return m_items.size();
     }
 
-    CN_ITEM* Add( D_PAD* pad );
+    CN_ITEM* Add( PAD* pad );
 
     CN_ITEM* Add( TRACK* track );
 
diff --git a/pcbnew/connectivity/from_to_cache.cpp b/pcbnew/connectivity/from_to_cache.cpp
index 1b18541321..fe5bd69e12 100644
--- a/pcbnew/connectivity/from_to_cache.cpp
+++ b/pcbnew/connectivity/from_to_cache.cpp
@@ -146,7 +146,7 @@ int FROM_TO_CACHE::cacheFromToPaths( const wxString& aFrom, const wxString& aTo
         const KICAD_T onlyRouting[] = { PCB_PAD_T, PCB_ARC_T, PCB_VIA_T, PCB_TRACE_T, EOT };
 
         auto padCandidates = connectivity->GetConnectedItems( path.from, onlyRouting );
-        D_PAD* toPad = nullptr;
+        PAD* toPad = nullptr;
 
         for( auto pitem : padCandidates )
         {
@@ -156,7 +156,7 @@ int FROM_TO_CACHE::cacheFromToPaths( const wxString& aFrom, const wxString& aTo
             if( pitem->Type() != PCB_PAD_T )
                 continue;
 
-            D_PAD *pad = static_cast<D_PAD*>( pitem );
+            PAD *pad = static_cast<PAD*>( pitem );
 
             wxString toName = pad->GetParent()->GetReference() + "-" + pad->GetName();
 
diff --git a/pcbnew/connectivity/from_to_cache.h b/pcbnew/connectivity/from_to_cache.h
index 73674fac85..2ee50f2e10 100644
--- a/pcbnew/connectivity/from_to_cache.h
+++ b/pcbnew/connectivity/from_to_cache.h
@@ -22,7 +22,7 @@
 
 #include <set>
 
-class D_PAD;
+class PAD;
 class BOARD_CONNECTED_ITEM;
 
 class FROM_TO_CACHE
@@ -32,17 +32,17 @@ public:
     struct FT_ENDPOINT
     {
         wxString name;
-        D_PAD* parent;
+        PAD* parent;
     };
 
     struct FT_PATH
     {
         int net;
-        D_PAD *from;
-        D_PAD *to;
+        PAD*     from;
+        PAD*     to;
         wxString fromName, toName;
         wxString fromWildcard, toWildcard;
-        bool isUnique;
+        bool     isUnique;
         std::set<BOARD_CONNECTED_ITEM*> pathItems;
     };
 
diff --git a/pcbnew/convert_drawsegment_list_to_polygon.cpp b/pcbnew/convert_drawsegment_list_to_polygon.cpp
index cd313d67a2..6423f5889d 100644
--- a/pcbnew/convert_drawsegment_list_to_polygon.cpp
+++ b/pcbnew/convert_drawsegment_list_to_polygon.cpp
@@ -906,7 +906,7 @@ bool isCopperOutside( const MODULE* aMod, SHAPE_POLY_SET& aShape )
 {
     bool padOutside = false;
 
-    for( D_PAD* pad : aMod->Pads() )
+    for( PAD* pad : aMod->Pads() )
     {
         SHAPE_POLY_SET poly = aShape;
 
diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp
index 4fcdc24cf5..5031076b19 100644
--- a/pcbnew/cross-probing.cpp
+++ b/pcbnew/cross-probing.cpp
@@ -69,7 +69,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
     int         netcode = -1;
     bool        multiHighlight = false;
     MODULE*     module = NULL;
-    D_PAD*      pad = NULL;
+    PAD*        pad = NULL;
     BOARD*      pcb = GetBoard();
 
     CROSS_PROBING_SETTINGS& crossProbingSettings = GetPcbNewSettings()->m_CrossProbing;
@@ -414,7 +414,7 @@ std::string FormatProbeItem( BOARD_ITEM* aItem )
     case PCB_PAD_T:
         {
             module = (MODULE*) aItem->GetParent();
-            wxString pad = ((D_PAD*)aItem)->GetName();
+            wxString pad = static_cast<PAD*>( aItem )->GetName();
 
             return StrPrintf( "$PART: \"%s\" $PAD: \"%s\"",
                               TO_UTF8( module->GetReference() ),
@@ -513,7 +513,7 @@ void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
             COMPONENT* component = new COMPONENT( module->GetFPID(), module->GetReference(),
                                                   module->GetValue(), module->GetPath() );
 
-            for( D_PAD* pad : module->Pads() )
+            for( PAD* pad : module->Pads() )
             {
                 const wxString& netname = pad->GetShortNetname();
 
diff --git a/pcbnew/dialogs/dialog_board_statistics.cpp b/pcbnew/dialogs/dialog_board_statistics.cpp
index 10cb15356d..816895bdbe 100644
--- a/pcbnew/dialogs/dialog_board_statistics.cpp
+++ b/pcbnew/dialogs/dialog_board_statistics.cpp
@@ -200,7 +200,7 @@ void DIALOG_BOARD_STATISTICS::getDataFromPCB()
             }
         }
 
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             // Go through pads types list
             for( auto& type : m_padsTypes )
diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp
index 118c5358bb..c7a97ba16f 100644
--- a/pcbnew/dialogs/dialog_exchange_footprints.cpp
+++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp
@@ -488,9 +488,9 @@ void PCB_EDIT_FRAME::ExchangeFootprint( MODULE* aExisting, MODULE* aNew, BOARD_C
 
     aNew->SetLocked( aExisting->IsLocked() );
 
-    for( D_PAD* pad : aNew->Pads() )
+    for( PAD* pad : aNew->Pads() )
     {
-        D_PAD* oldPad = aExisting->FindPadByName( pad->GetName() );
+        PAD* oldPad = aExisting->FindPadByName( pad->GetName() );
 
         if( oldPad )
         {
diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp
index b543c4dc3f..1f1f85dcee 100644
--- a/pcbnew/dialogs/dialog_gendrill.cpp
+++ b/pcbnew/dialogs/dialog_gendrill.cpp
@@ -141,7 +141,7 @@ void DIALOG_GENDRILL::InitDisplayParams()
 
     for( MODULE* module : m_board->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( pad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
             {
diff --git a/pcbnew/dialogs/dialog_net_inspector.cpp b/pcbnew/dialogs/dialog_net_inspector.cpp
index f838353476..6fddf8d0c1 100644
--- a/pcbnew/dialogs/dialog_net_inspector.cpp
+++ b/pcbnew/dialogs/dialog_net_inspector.cpp
@@ -1156,7 +1156,7 @@ void DIALOG_NET_INSPECTOR::OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aBoardIt
     }
     else if( MODULE* footprint = dynamic_cast<MODULE*>( aBoardItem ) )
     {
-        for( const D_PAD* pad : footprint->Pads() )
+        for( const PAD* pad : footprint->Pads() )
         {
             OPT<LIST_ITEM_ITER> r = m_data_model->findItem( pad->GetNet() );
 
@@ -1195,7 +1195,7 @@ void DIALOG_NET_INSPECTOR::OnBoardItemRemoved( BOARD& aBoard, BOARD_ITEM* aBoard
     }
     else if( MODULE* footprint = dynamic_cast<MODULE*>( aBoardItem ) )
     {
-        for( const D_PAD* pad : footprint->Pads() )
+        for( const PAD* pad : footprint->Pads() )
         {
             OPT<LIST_ITEM_ITER> r = m_data_model->findItem( pad->GetNet() );
 
@@ -1376,7 +1376,7 @@ std::unique_ptr<DIALOG_NET_INSPECTOR::LIST_ITEM> DIALOG_NET_INSPECTOR::buildNewI
         BOARD_CONNECTED_ITEM* item = ( *i )->Parent();
 
         if( item->Type() == PCB_PAD_T )
-            new_item->AddChipWireLength( static_cast<D_PAD*>( item )->GetPadToDieLength() );
+            new_item->AddChipWireLength( static_cast<PAD*>( item )->GetPadToDieLength() );
 
         else if( TRACK* track = dynamic_cast<TRACK*>( item ) )
         {
@@ -1473,7 +1473,7 @@ void DIALOG_NET_INSPECTOR::buildNetsList()
 
     for( MODULE* footprint : m_brd->Modules() )
     {
-        for( D_PAD* pad : footprint->Pads() )
+        for( PAD* pad : footprint->Pads() )
         {
             auto i = std::lower_bound( nets.begin(), nets.end(), pad->GetNetCode(),
                                        NET_INFO_CMP_LESS() );
diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp
index 01f83ee71c..b68fdca653 100644
--- a/pcbnew/dialogs/dialog_pad_properties.cpp
+++ b/pcbnew/dialogs/dialog_pad_properties.cpp
@@ -93,7 +93,7 @@ static PAD_ATTR_T code_type[] =
 #define NPTH_DLG_TYPE 3
 #define APERTURE_DLG_TYPE 4
 
-void PCB_BASE_FRAME::ShowPadPropertiesDialog( D_PAD* aPad )
+void PCB_BASE_FRAME::ShowPadPropertiesDialog( PAD* aPad )
 {
     DIALOG_PAD_PROPERTIES dlg( this, aPad );
 
@@ -112,7 +112,7 @@ void PCB_BASE_FRAME::ShowPadPropertiesDialog( D_PAD* aPad )
 }
 
 
-DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) :
+DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad ) :
     DIALOG_PAD_PROPERTIES_BASE( aParent ),
     m_parent( aParent ),
     m_canUpdate( false ),
@@ -156,7 +156,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
     m_nonCopperWarningIcon->SetBitmap( KiBitmap( dialog_warning_xpm ) );
 
     m_padMaster  = &m_parent->GetDesignSettings().m_Pad_Master;
-    m_dummyPad   = new D_PAD( (MODULE*) NULL );
+    m_dummyPad   = new PAD((MODULE*) NULL );
 
     if( aPad )
     {
@@ -1073,7 +1073,7 @@ void DIALOG_PAD_PROPERTIES::updatePadLayersList( LSET layer_mask, bool remove_un
     {
     case PTH_DLG_TYPE:
         if( !layer_mask.any() )
-            layer_mask = D_PAD::PTHMask();
+            layer_mask = PAD::PTHMask();
 
         if( !( layer_mask & LSET::AllCuMask() ).any() )
             m_rbCopperLayersSel->SetSelection( 3 );
@@ -1088,7 +1088,7 @@ void DIALOG_PAD_PROPERTIES::updatePadLayersList( LSET layer_mask, bool remove_un
 
     case SMD_DLG_TYPE:
         if( !layer_mask.any() )
-            layer_mask = D_PAD::SMDMask();
+            layer_mask = PAD::SMDMask();
 
         if( layer_mask.test( F_Cu ) )
             m_rbCopperLayersSel->SetSelection( 0 );
@@ -1099,7 +1099,7 @@ void DIALOG_PAD_PROPERTIES::updatePadLayersList( LSET layer_mask, bool remove_un
 
     case CONN_DLG_TYPE:
         if( !layer_mask.any() )
-            layer_mask = D_PAD::ConnSMDMask();
+            layer_mask = PAD::ConnSMDMask();
 
         if( layer_mask.test( F_Cu ) )
             m_rbCopperLayersSel->SetSelection( 0 );
@@ -1110,7 +1110,7 @@ void DIALOG_PAD_PROPERTIES::updatePadLayersList( LSET layer_mask, bool remove_un
 
     case NPTH_DLG_TYPE:
         if( !layer_mask.any() )
-            layer_mask = D_PAD::UnplatedHoleMask();
+            layer_mask = PAD::UnplatedHoleMask();
 
         if( layer_mask.test( F_Cu ) && layer_mask.test( B_Cu ) )
             m_rbCopperLayersSel->SetSelection( 0 );
@@ -1125,7 +1125,7 @@ void DIALOG_PAD_PROPERTIES::updatePadLayersList( LSET layer_mask, bool remove_un
 
     case APERTURE_DLG_TYPE:
         if( !layer_mask.any() )
-            layer_mask = D_PAD::ApertureMask();
+            layer_mask = PAD::ApertureMask();
 
         m_rbCopperLayersSel->SetSelection( 0 );
         break;
@@ -1635,7 +1635,7 @@ PAD_PROP_T DIALOG_PAD_PROPERTIES::getSelectedProperty()
 }
 
 
-bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
+bool DIALOG_PAD_PROPERTIES::transferDataToPad( PAD* aPad )
 {
     wxString    msg;
 
diff --git a/pcbnew/dialogs/dialog_pad_properties.h b/pcbnew/dialogs/dialog_pad_properties.h
index 2b1ed468ad..09034173fd 100644
--- a/pcbnew/dialogs/dialog_pad_properties.h
+++ b/pcbnew/dialogs/dialog_pad_properties.h
@@ -47,14 +47,14 @@
 class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
 {
 public:
-    DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad );
+    DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad );
     ~DIALOG_PAD_PROPERTIES();
 
 private:
     PCB_BASE_FRAME* m_parent;
-    D_PAD*  m_currentPad;           // pad currently being edited
-    D_PAD*  m_dummyPad;             // a working copy used to show changes
-    D_PAD*  m_padMaster;            // pad used to create new pads in board or footprint editor
+    PAD*    m_currentPad;           // pad currently being edited
+    PAD*    m_dummyPad;             // a working copy used to show changes
+    PAD*    m_padMaster;            // pad used to create new pads in board or footprint editor
     BOARD*  m_board;                // the main board: this is the board handled by the PCB
                                     //    editor or the dummy board used by the footprint editor
     bool    m_isFlipped;            // indicates the parent footprint is flipped (mirrored) in
@@ -104,7 +104,7 @@ private:
     void updatePadLayersList( LSET layer_mask, bool remove_unconnected, bool keep_top_bottom );
 
     /// Copy values from dialog field to aPad's members
-    bool transferDataToPad( D_PAD* aPad );
+    bool transferDataToPad( PAD* aPad );
 
     bool Show( bool aShow ) override;
 
diff --git a/pcbnew/dialogs/dialog_push_pad_properties.h b/pcbnew/dialogs/dialog_push_pad_properties.h
index 7efb8d5db0..21cb5999b3 100644
--- a/pcbnew/dialogs/dialog_push_pad_properties.h
+++ b/pcbnew/dialogs/dialog_push_pad_properties.h
@@ -26,7 +26,7 @@
 
 #include <dialog_push_pad_properties_base.h>
 
-class D_PAD;
+class PAD;
 class PCB_BASE_FRAME;
 /************************************/
 /* class DIALOG_PUSH_PAD_PROPERTIES */
diff --git a/pcbnew/dialogs/dialog_track_via_properties.cpp b/pcbnew/dialogs/dialog_track_via_properties.cpp
index 36762ea236..37e8cee5eb 100644
--- a/pcbnew/dialogs/dialog_track_via_properties.cpp
+++ b/pcbnew/dialogs/dialog_track_via_properties.cpp
@@ -319,13 +319,13 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
 }
 
 
-bool DIALOG_TRACK_VIA_PROPERTIES::confirmPadChange( const std::vector<D_PAD*>& changingPads )
+bool DIALOG_TRACK_VIA_PROPERTIES::confirmPadChange( const std::vector<PAD*>& changingPads )
 {
     wxString msg;
 
     if( changingPads.size() == 1 )
     {
-        D_PAD* pad = *changingPads.begin();
+        PAD* pad = *changingPads.begin();
         msg.Printf( _( "This will change the net assigned to %s pad %s to %s.\n"
                        "Do you wish to continue?" ),
                     pad->GetParent()->GetReference(),
@@ -334,8 +334,8 @@ bool DIALOG_TRACK_VIA_PROPERTIES::confirmPadChange( const std::vector<D_PAD*>& c
     }
     else if( changingPads.size() == 2 )
     {
-        D_PAD* pad1 = *changingPads.begin();
-        D_PAD* pad2 = *( ++changingPads.begin() );
+        PAD* pad1 = *changingPads.begin();
+        PAD* pad2 = *( ++changingPads.begin() );
         msg.Printf( _( "This will change the net assigned to %s pad %s and %s pad %s to %s.\n"
                        "Do you wish to continue?" ),
                     pad1->GetParent()->GetReference(),
@@ -364,26 +364,25 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
 {
     auto connectivity = m_frame->GetBoard()->GetConnectivity();
     int newNetCode = m_netSelector->GetSelectedNetcode();
-    std::vector<D_PAD*> changingPads;
+    std::vector<PAD*> changingPads;
 
     if ( !m_netSelector->IsIndeterminate() )
     {
-        std::set<D_PAD*> connectedPads;
+        std::set<PAD*> connectedPads;
 
-        for( auto& item : m_items )
+        for( EDA_ITEM* item : m_items )
         {
             const KICAD_T ourTypes[] = { PCB_TRACE_T, PCB_PAD_T, PCB_VIA_T, PCB_MODULE_T, EOT };
             auto connectedItems = connectivity->GetConnectedItems( static_cast<BOARD_CONNECTED_ITEM*>( item ), ourTypes, true );
-            for ( auto citem : connectedItems )
+
+            for ( BOARD_CONNECTED_ITEM* citem : connectedItems )
             {
                 if( citem->Type() == PCB_PAD_T )
-                {
-                    connectedPads.insert( static_cast<D_PAD*>( citem ) );
-                }
+                    connectedPads.insert( static_cast<PAD*>( citem ) );
             }
         }
 
-        for( D_PAD* pad : connectedPads )
+        for( PAD* pad : connectedPads )
         {
             if( pad->GetNetCode() != newNetCode )
                 changingPads.push_back( pad );
@@ -563,7 +562,7 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
         // Commit::Push() will rebuild connectivitiy propagating nets from connected pads
         // outwards.  We therefore have to update the connected pads in order for the net
         // change to "stick".
-        for( D_PAD* pad : changingPads )
+        for( PAD* pad : changingPads )
         {
             m_commit.Modify( pad );
             pad->SetNetCode( m_netSelector->GetSelectedNetcode() );
diff --git a/pcbnew/dialogs/dialog_track_via_properties.h b/pcbnew/dialogs/dialog_track_via_properties.h
index b3a5dd9ca3..31e8882293 100644
--- a/pcbnew/dialogs/dialog_track_via_properties.h
+++ b/pcbnew/dialogs/dialog_track_via_properties.h
@@ -30,7 +30,7 @@
 class PCBNEW_SELECTION;
 class COMMIT;
 class PCB_BASE_FRAME;
-class D_PAD;
+class PAD;
 
 class DIALOG_TRACK_VIA_PROPERTIES : public DIALOG_TRACK_VIA_PROPERTIES_BASE
 {
@@ -48,7 +48,7 @@ private:
     void onViaSelect( wxCommandEvent& aEvent ) override;
     void onViaEdit( wxCommandEvent& aEvent ) override;
 
-    bool confirmPadChange( const std::vector<D_PAD*>& connectedPads );
+    bool confirmPadChange( const std::vector<PAD*>& connectedPads );
 
     PCB_BASE_FRAME*         m_frame;
     const PCBNEW_SELECTION& m_items;   // List of items to be modified.
diff --git a/pcbnew/dialogs/dialog_unused_pad_layers.cpp b/pcbnew/dialogs/dialog_unused_pad_layers.cpp
index 54d6336f4f..5ea16e6bc1 100644
--- a/pcbnew/dialogs/dialog_unused_pad_layers.cpp
+++ b/pcbnew/dialogs/dialog_unused_pad_layers.cpp
@@ -114,7 +114,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow()
 
             if( item->Type() == PCB_PAD_T && m_rbScope->GetSelection() == SCOPE_PADS )
             {
-                D_PAD* pad = static_cast<D_PAD*>( item );
+                PAD* pad = static_cast<PAD*>( item );
 
                 pad->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE );
                 pad->SetKeepTopBottom( m_cbPreservePads->IsChecked() );
diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp
index 62be0178d7..4101a665aa 100644
--- a/pcbnew/drc/drc_engine.cpp
+++ b/pcbnew/drc/drc_engine.cpp
@@ -699,7 +699,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRulesForItems( DRC_CONSTRAINT_TYPE_T aConstraintI
         // whether or not there's a flashed pad.  Not true for NPTHs.
         if( a->Type() == PCB_PAD_T )
         {
-            const D_PAD* pad = static_cast<const D_PAD*>( a );
+            const PAD* pad = static_cast<const PAD*>( a );
 
             if( pad->GetAttribute() == PAD_ATTRIB_NPTH && !pad->FlashLayer( aLayer ) )
                 aConstraintId = HOLE_CLEARANCE_CONSTRAINT;
diff --git a/pcbnew/drc/drc_test_provider.cpp b/pcbnew/drc/drc_test_provider.cpp
index 3ca97382fc..e36bd50217 100644
--- a/pcbnew/drc/drc_test_provider.cpp
+++ b/pcbnew/drc/drc_test_provider.cpp
@@ -251,7 +251,7 @@ int DRC_TEST_PROVIDER::forEachGeometryItem( const std::vector<KICAD_T>& aTypes,
 
         if( typeMask[ PCB_PAD_T ] )
         {
-            for( D_PAD* pad : mod->Pads() )
+            for( PAD* pad : mod->Pads() )
             {
                 if( ( pad->GetLayerSet() & aLayers ).any() )
                 {
diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp
index 9ad84f77e7..0d3be48b8e 100644
--- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp
+++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp
@@ -84,7 +84,7 @@ private:
 
     void testTrackClearances();
 
-    bool testPadAgainstItem( D_PAD* pad, SHAPE* padShape, PCB_LAYER_ID layer, BOARD_ITEM* other );
+    bool testPadAgainstItem( PAD* pad, SHAPE* padShape, PCB_LAYER_ID layer, BOARD_ITEM* other );
 
     void testPadClearances();
 
@@ -226,9 +226,9 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run()
 
 static std::shared_ptr<SHAPE> getShape( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer )
 {
-    if( aItem->Type() == PCB_PAD_T && !static_cast<D_PAD*>( aItem )->FlashLayer( aLayer ) )
+    if( aItem->Type() == PCB_PAD_T && !static_cast<PAD*>( aItem )->FlashLayer( aLayer ) )
     {
-        D_PAD* aPad = static_cast<D_PAD*>( aItem );
+        PAD* aPad = static_cast<PAD*>( aItem );
 
         if( aPad->GetAttribute() == PAD_ATTRIB_PTH )
         {
@@ -397,7 +397,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances()
 }
 
 
-bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( D_PAD* pad, SHAPE* padShape,
+bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* padShape,
                                                              PCB_LAYER_ID layer,
                                                              BOARD_ITEM* other )
 {
@@ -420,7 +420,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( D_PAD* pad, SHAPE*
 
     if( other->Type() == PCB_PAD_T )
     {
-        auto otherPad = static_cast<D_PAD*>( other );
+        auto otherPad = static_cast<PAD*>( other );
 
         // If pads are equivalent (ie: from the same footprint with the same pad number)...
         if( pad->SameLogicalPadAs( otherPad ) )
@@ -522,7 +522,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadClearances( )
 
     for( MODULE* module : m_board->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( !reportProgress( ii++, count, delta ) )
                 break;
diff --git a/pcbnew/drc/drc_test_provider_hole_clearance.cpp b/pcbnew/drc/drc_test_provider_hole_clearance.cpp
index 0f7c6d7f79..0dd572206d 100644
--- a/pcbnew/drc/drc_test_provider_hole_clearance.cpp
+++ b/pcbnew/drc/drc_test_provider_hole_clearance.cpp
@@ -85,7 +85,7 @@ static std::shared_ptr<SHAPE_CIRCLE> getDrilledHoleShape( BOARD_ITEM* aItem )
     }
     else if( aItem->Type() == PCB_PAD_T )
     {
-        D_PAD* pad = static_cast<D_PAD*>( aItem );
+        PAD* pad = static_cast<PAD*>( aItem );
         return std::make_shared<SHAPE_CIRCLE>( pad->GetPosition(), pad->GetDrillSize().x / 2 );
     }
 
@@ -138,7 +138,7 @@ bool DRC_TEST_PROVIDER_HOLE_CLEARANCE::Run()
 
                 if( item->Type() == PCB_PAD_T )
                 {
-                    D_PAD* pad = static_cast<D_PAD*>( item );
+                    PAD* pad = static_cast<PAD*>( item );
 
                     // Check for round hole
                     if( pad->GetDrillSize().x && pad->GetDrillSize().x == pad->GetDrillSize().y )
@@ -198,7 +198,7 @@ bool DRC_TEST_PROVIDER_HOLE_CLEARANCE::Run()
 
     for( MODULE* footprint : m_board->Modules() )
     {
-        for( D_PAD* pad : footprint->Pads() )
+        for( PAD* pad : footprint->Pads() )
         {
             if( !reportProgress( ii++, count, delta ) )
                 break;
diff --git a/pcbnew/drc/drc_test_provider_hole_size.cpp b/pcbnew/drc/drc_test_provider_hole_size.cpp
index 86e451e220..36ee0e1a09 100644
--- a/pcbnew/drc/drc_test_provider_hole_size.cpp
+++ b/pcbnew/drc/drc_test_provider_hole_size.cpp
@@ -68,7 +68,7 @@ public:
 
 private:
     void checkVia( VIA* via, bool aExceedMicro, bool aExceedStd );
-    void checkPad( D_PAD* aPad );
+    void checkPad( PAD* aPad );
 
     BOARD* m_board;
 };
@@ -86,7 +86,7 @@ bool DRC_TEST_PROVIDER_HOLE_SIZE::Run()
         if( m_drcEngine->IsErrorLimitExceeded( DRCE_TOO_SMALL_DRILL ) )
             break;
 
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( m_drcEngine->IsErrorLimitExceeded( DRCE_TOO_SMALL_DRILL ) )
                 break;
@@ -124,7 +124,7 @@ bool DRC_TEST_PROVIDER_HOLE_SIZE::Run()
 }
 
 
-void DRC_TEST_PROVIDER_HOLE_SIZE::checkPad( D_PAD* aPad )
+void DRC_TEST_PROVIDER_HOLE_SIZE::checkPad( PAD* aPad )
 {
     int holeSize = std::min( aPad->GetDrillSize().x, aPad->GetDrillSize().y );
 
diff --git a/pcbnew/drc/drc_test_provider_lvs.cpp b/pcbnew/drc/drc_test_provider_lvs.cpp
index 31cbe19cb5..3e5b53ac72 100644
--- a/pcbnew/drc/drc_test_provider_lvs.cpp
+++ b/pcbnew/drc/drc_test_provider_lvs.cpp
@@ -126,7 +126,7 @@ void DRC_TEST_PROVIDER_LVS::testFootprints( NETLIST& aNetlist )
         }
         else
         {
-            for( D_PAD* pad : module->Pads() )
+            for( PAD* pad : module->Pads() )
             {
                 if( m_drcEngine->IsErrorLimitExceeded( DRCE_NET_CONFLICT ) )
                     break;
diff --git a/pcbnew/drc/drc_test_provider_matched_length.cpp b/pcbnew/drc/drc_test_provider_matched_length.cpp
index 504ffe9ace..bac14fe121 100644
--- a/pcbnew/drc/drc_test_provider_matched_length.cpp
+++ b/pcbnew/drc/drc_test_provider_matched_length.cpp
@@ -295,11 +295,11 @@ bool DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal( bool aDelayReportMode )
                     ent.viaCount++;
                     ent.totalVia += computeViaThruLength( via, nitem.second ); // fixme: via thru distance
                 }
-                else if ( auto trk = dyn_cast<TRACK*>(citem ))
+                else if ( TRACK* trk = dyn_cast<TRACK*>(citem ))
                 {
                     ent.totalRoute += trk->GetLength();
                 }
-                else if ( auto pad = dyn_cast<D_PAD*>( citem ))
+                else if ( PAD* pad = dyn_cast<PAD*>( citem ))
                 {
                     ent.totalPadToDie += pad->GetPadToDieLength();
                 }
diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp
index 5c1b582956..32aed10327 100644
--- a/pcbnew/edit.cpp
+++ b/pcbnew/edit.cpp
@@ -127,7 +127,7 @@ void PCB_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
         break;
 
     case PCB_PAD_T:
-        ShowPadPropertiesDialog( static_cast<D_PAD*>( aItem ) );
+        ShowPadPropertiesDialog( static_cast<PAD*>( aItem ) );
         break;
 
     case PCB_MODULE_T:
diff --git a/pcbnew/exporters/export_footprints_placefile.cpp b/pcbnew/exporters/export_footprints_placefile.cpp
index 9f72a064c4..a9d1e200dd 100644
--- a/pcbnew/exporters/export_footprints_placefile.cpp
+++ b/pcbnew/exporters/export_footprints_placefile.cpp
@@ -355,18 +355,18 @@ std::string PLACE_FILE_EXPORTER::GenReportData()
         else
             buffer += "layer other\n";
 
-        std::vector<D_PAD*> sortedPads;
+        std::vector<PAD*> sortedPads;
 
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
             sortedPads.push_back( pad );
 
         std::sort( sortedPads.begin(), sortedPads.end(),
-                   []( D_PAD* a, D_PAD* b ) -> bool
+                   []( PAD* a, PAD* b ) -> bool
                    {
                        return StrNumCmp( a->GetName(), b->GetName(), true ) < 0;
                    });
 
-        for( D_PAD* pad : sortedPads )
+        for( PAD* pad : sortedPads )
         {
             sprintf( line, "$PAD \"%s\"\n", TO_UTF8( pad->GetName() ) );
             buffer += line;
diff --git a/pcbnew/exporters/export_gencad.cpp b/pcbnew/exporters/export_gencad.cpp
index 780ee6e455..186391121b 100644
--- a/pcbnew/exporters/export_gencad.cpp
+++ b/pcbnew/exporters/export_gencad.cpp
@@ -354,9 +354,9 @@ static void CreateArtworksSection( FILE* aFile )
 // Via name is synthesized from their attributes, pads are numbered
 static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
 {
-    std::vector<D_PAD*> padstacks;
-    std::vector<VIA*>   vias;
-    std::vector<VIA*>   viastacks;
+    std::vector<PAD*> padstacks;
+    std::vector<VIA*> vias;
+    std::vector<VIA*> viastacks;
 
     padstacks.resize( 1 ); // We count pads from 1
 
@@ -368,10 +368,10 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
 
     // Enumerate and sort the pads
 
-    std::vector<D_PAD*> pads = aPcb->GetPads();
-    std::sort( pads.begin(), pads.end(), []( const D_PAD* a, const D_PAD* b )
+    std::vector<PAD*> pads = aPcb->GetPads();
+    std::sort( pads.begin(), pads.end(), []( const PAD* a, const PAD* b )
                                          {
-                                             return D_PAD::Compare( a, b ) < 0;
+                                             return PAD::Compare( a, b ) < 0;
                                          } );
 
 
@@ -402,17 +402,17 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
     }
 
     // Emit component pads
-    D_PAD* old_pad = 0;
-    int    pad_name_number = 0;
+    PAD* old_pad = 0;
+    int  pad_name_number = 0;
 
     for( unsigned i = 0; i<pads.size(); ++i )
     {
-        D_PAD* pad = pads[i];
+        PAD* pad = pads[i];
         const wxPoint& off = pad->GetOffset();
 
         pad->SetSubRatsnest( pad_name_number );
 
-        if( old_pad && 0==D_PAD::Compare( old_pad, pad ) )
+        if( old_pad && 0 == PAD::Compare( old_pad, pad ) )
             continue;  // already created
 
         old_pad = pad;
@@ -629,7 +629,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
      *  until it appears yet another noncompliant importer */
     for( unsigned i = 1; i < padstacks.size(); i++ )
     {
-        D_PAD* pad = padstacks[i];
+        PAD* pad = padstacks[i];
 
         // Straight padstack
         fprintf( aFile, "PADSTACK PAD%u %g\n", i, pad->GetDrillSize().x / SCALE_FACTOR );
@@ -750,7 +750,7 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb )
         // set of already emitted pins to check for duplicates
         std::set<wxString> pins;
 
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             /* Padstacks are defined using the correct layers for the pads, therefore to
              * all pads need to be marked as TOP to use the padstack information correctly.
@@ -900,7 +900,7 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb )
 
         for( MODULE* module : aPcb->Modules() )
         {
-            for( D_PAD* pad : module->Pads() )
+            for( PAD* pad : module->Pads() )
             {
                 if( pad->GetNetCode() != net->GetNet() )
                     continue;
diff --git a/pcbnew/exporters/export_hyperlynx.cpp b/pcbnew/exporters/export_hyperlynx.cpp
index 061e5c5747..21e9f6ce2f 100644
--- a/pcbnew/exporters/export_hyperlynx.cpp
+++ b/pcbnew/exporters/export_hyperlynx.cpp
@@ -49,7 +49,7 @@ class HYPERLYNX_PAD_STACK
 public:
     friend class HYPERLYNX_EXPORTER;
 
-    HYPERLYNX_PAD_STACK( BOARD* aBoard, const D_PAD* aPad );
+    HYPERLYNX_PAD_STACK( BOARD* aBoard, const PAD* aPad );
     HYPERLYNX_PAD_STACK( BOARD* aBoard, const VIA* aVia );
     ~HYPERLYNX_PAD_STACK(){};
 
@@ -222,7 +222,7 @@ private:
 };
 
 
-HYPERLYNX_PAD_STACK::HYPERLYNX_PAD_STACK( BOARD* aBoard, const D_PAD* aPad )
+HYPERLYNX_PAD_STACK::HYPERLYNX_PAD_STACK( BOARD* aBoard, const PAD* aPad )
 {
     m_board = aBoard;
     m_sx    = aPad->GetSize().x;
@@ -404,7 +404,7 @@ bool HYPERLYNX_EXPORTER::writePadStacks()
 {
     for( MODULE* mod : m_board->Modules() )
     {
-        for( D_PAD* pad : mod->Pads() )
+        for( PAD* pad : mod->Pads() )
         {
             HYPERLYNX_PAD_STACK* ps = addPadStack( HYPERLYNX_PAD_STACK( m_board, pad ) );
             m_padMap[pad] = ps;
@@ -431,7 +431,7 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector<BOARD_ITEM*>& aObjec
 {
     for( BOARD_ITEM* item : aObjects )
     {
-        if( D_PAD* pad = dyn_cast<D_PAD*>( item ) )
+        if( PAD* pad = dyn_cast<PAD*>( item ) )
         {
             auto pstackIter = m_padMap.find( pad );
 
@@ -548,7 +548,7 @@ const std::vector<BOARD_ITEM*> HYPERLYNX_EXPORTER::collectNetObjects( int netcod
 
     for( MODULE* mod : m_board->Modules() )
     {
-        for( D_PAD* pad : mod->Pads() )
+        for( PAD* pad : mod->Pads() )
         {
             if( check( pad ) )
                 rv.push_back( pad );
diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp
index e26520ae86..1282d654ba 100644
--- a/pcbnew/exporters/export_vrml.cpp
+++ b/pcbnew/exporters/export_vrml.cpp
@@ -1110,7 +1110,7 @@ static void export_vrml_edge_module( MODEL_VRML& aModel, FP_SHAPE* aOutline, MOD
 }
 
 
-static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_PAD* aPad )
+static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, PAD* aPad )
 {
     // The (maybe offset) pad position
     wxPoint pad_pos = aPad->ShapePos();
@@ -1243,7 +1243,7 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P
 }
 
 
-static void export_vrml_pad( MODEL_VRML& aModel, BOARD* aPcb, D_PAD* aPad )
+static void export_vrml_pad( MODEL_VRML& aModel, BOARD* aPcb, PAD* aPad )
 {
     double  hole_drill_w    = (double) aPad->GetDrillSize().x * BOARD_SCALE / 2.0;
     double  hole_drill_h    = (double) aPad->GetDrillSize().y * BOARD_SCALE / 2.0;
@@ -1394,7 +1394,7 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb,
     }
 
     // Export pads
-    for( D_PAD* pad : aModule->Pads() )
+    for( PAD* pad : aModule->Pads() )
         export_vrml_pad( aModel, aPcb, pad );
 
     bool isFlipped = aModule->GetLayer() == B_Cu;
diff --git a/pcbnew/exporters/gendrill_file_writer_base.cpp b/pcbnew/exporters/gendrill_file_writer_base.cpp
index 41526b666b..f508a8de29 100644
--- a/pcbnew/exporters/gendrill_file_writer_base.cpp
+++ b/pcbnew/exporters/gendrill_file_writer_base.cpp
@@ -45,8 +45,8 @@ static bool CmpHoleSorting( const HOLE_INFO& a, const HOLE_INFO& b )
         return a.m_Hole_Diameter < b.m_Hole_Diameter;
 
     // group by components when possible
-    const D_PAD* pada = dyn_cast<const D_PAD*>( a.m_ItemParent );
-    const D_PAD* padb = dyn_cast<const D_PAD*>( b.m_ItemParent );
+    const PAD* pada = dyn_cast<const PAD*>( a.m_ItemParent );
+    const PAD* padb = dyn_cast<const PAD*>( b.m_ItemParent );
 
     if( pada && padb )
     {
diff --git a/pcbnew/exporters/gendrill_gerber_writer.cpp b/pcbnew/exporters/gendrill_gerber_writer.cpp
index f80d8e22b3..1b8687e30d 100644
--- a/pcbnew/exporters/gendrill_gerber_writer.cpp
+++ b/pcbnew/exporters/gendrill_gerber_writer.cpp
@@ -183,10 +183,10 @@ int GERBER_WRITER::createDrillFile( wxString& aFullFilename, bool aIsNpth,
 
             last_item_is_via = true;
         }
-        else if( dyn_cast<const D_PAD*>( hole_descr.m_ItemParent ) )
+        else if( dyn_cast<const PAD*>( hole_descr.m_ItemParent ) )
         {
             last_item_is_via = false;
-            const D_PAD* pad = dyn_cast<const D_PAD*>( hole_descr.m_ItemParent );
+            const PAD* pad = dyn_cast<const PAD*>( hole_descr.m_ItemParent );
 
             if( pad->GetProperty() == PAD_PROP_CASTELLATED )
                 gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CASTELLATEDDRILL );
diff --git a/pcbnew/exporters/gerber_jobfile_writer.cpp b/pcbnew/exporters/gerber_jobfile_writer.cpp
index a5c76217ea..89be395317 100644
--- a/pcbnew/exporters/gerber_jobfile_writer.cpp
+++ b/pcbnew/exporters/gerber_jobfile_writer.cpp
@@ -466,7 +466,7 @@ void GERBER_JOBFILE_WRITER::addJSONDesignRules()
 
     for( MODULE* module : m_pcb->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             for( PCB_LAYER_ID layer : pad->GetLayerSet().Seq() )
             {
diff --git a/pcbnew/exporters/gerber_placefile_writer.cpp b/pcbnew/exporters/gerber_placefile_writer.cpp
index a996c32746..8639a796fb 100644
--- a/pcbnew/exporters/gerber_placefile_writer.cpp
+++ b/pcbnew/exporters/gerber_placefile_writer.cpp
@@ -222,13 +222,13 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
             plotter.PLOTTER::PlotPoly( poly, FILL_TYPE::NO_FILL, line_thickness, &gbr_metadata );
         }
 
-        std::vector<D_PAD*>pad_key_list;
+        std::vector<PAD*>pad_key_list;
 
         if( m_plotPad1Marker )
         {
             findPads1( pad_key_list, footprint );
 
-            for( D_PAD* pad1 : pad_key_list )
+            for( PAD* pad1 : pad_key_list )
             {
                 gbr_metadata.SetApertureAttrib(
                         GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_PAD1_POSITION );
@@ -253,11 +253,11 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
                     GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_PADOTHER_POSITION );
             gbr_metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_PAD );
 
-            for( D_PAD* pad: footprint->Pads() )
+            for( PAD* pad: footprint->Pads() )
             {
                 bool skip_pad = false;
 
-                for( D_PAD* pad1 : pad_key_list )
+                for( PAD* pad1 : pad_key_list )
                 {
                     if( pad == pad1 )   // Already plotted
                     {
@@ -324,13 +324,13 @@ double PLACEFILE_GERBER_WRITER::mapRotationAngle( double aAngle )
 }
 
 
-void PLACEFILE_GERBER_WRITER::findPads1( std::vector<D_PAD*>& aPadList, MODULE* aFootprint ) const
+void PLACEFILE_GERBER_WRITER::findPads1( std::vector<PAD*>& aPadList, MODULE* aFootprint ) const
 {
     // Fint the pad "1" or pad "A1"
     // this is possible only if only one pad is found
     // Usefull to place a marker in this position
 
-    for( D_PAD* pad : aFootprint->Pads() )
+    for( PAD* pad : aFootprint->Pads() )
     {
         if( !pad->IsOnLayer( m_layer ) )
             continue;
diff --git a/pcbnew/exporters/gerber_placefile_writer.h b/pcbnew/exporters/gerber_placefile_writer.h
index b5ec287b58..fc1ad9ffc5 100644
--- a/pcbnew/exporters/gerber_placefile_writer.h
+++ b/pcbnew/exporters/gerber_placefile_writer.h
@@ -31,7 +31,7 @@
 
 class BOARD;
 class MODULE;
-class D_PAD;
+class PAD;
 
 /**
  * PLACEFILE_GERBER_WRITER is a class mainly used to create Gerber drill files
@@ -101,7 +101,7 @@ private:
      * @param aPadList is the list to fill
      * @param aFootprint is the footprint to test
      */
-    void findPads1( std::vector<D_PAD*>& aPadList, MODULE* aFootprint ) const;
+    void findPads1( std::vector<PAD*>& aPadList, MODULE* aFootprint ) const;
 };
 
 #endif  //  #ifndef PLACEFILE_GERBER_WRITER_H
diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp
index 0f05046ba7..93b10eaf0c 100644
--- a/pcbnew/files.cpp
+++ b/pcbnew/files.cpp
@@ -1117,7 +1117,7 @@ bool PCB_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
 
 
             // Store net names for all pads, to create net remap information
-            std::unordered_map<D_PAD*, wxString> netMap;
+            std::unordered_map<PAD*, wxString> netMap;
 
             for( const auto& pad : GetBoard()->GetPads() )
             {
diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp
index 0ebfc90e65..e3dfecc670 100644
--- a/pcbnew/footprint.cpp
+++ b/pcbnew/footprint.cpp
@@ -99,9 +99,9 @@ MODULE::MODULE( const MODULE& aFootprint ) :
     std::map<BOARD_ITEM*, BOARD_ITEM*> ptrMap;
 
     // Copy pads
-    for( D_PAD* pad : aFootprint.Pads() )
+    for( PAD* pad : aFootprint.Pads() )
     {
-        D_PAD* newPad = static_cast<D_PAD*>( pad->Clone() );
+        PAD* newPad = static_cast<PAD*>( pad->Clone() );
         ptrMap[ pad ] = newPad;
         Add( newPad );
     }
@@ -178,7 +178,7 @@ MODULE::~MODULE()
     delete m_Value;
     delete m_initial_comments;
 
-    for( D_PAD* p : m_pads )
+    for( PAD* p : m_pads )
         delete p;
 
     m_pads.clear();
@@ -234,7 +234,7 @@ MODULE& MODULE::operator=( MODULE&& aOther )
     // Move the pads
     m_pads.clear();
 
-    for( D_PAD* pad : aOther.Pads() )
+    for( PAD* pad : aOther.Pads() )
         Add( pad );
 
     aOther.Pads().clear();
@@ -330,9 +330,9 @@ MODULE& MODULE::operator=( const MODULE& aOther )
     // Copy pads
     m_pads.clear();
 
-    for( D_PAD* pad : aOther.Pads() )
+    for( PAD* pad : aOther.Pads() )
     {
-        D_PAD* newPad = new D_PAD( *pad );
+        PAD* newPad = new PAD( *pad );
         ptrMap[ pad ] = newPad;
         Add( newPad );
     }
@@ -433,7 +433,7 @@ void MODULE::ClearAllNets()
 {
     // Force the ORPHANED dummy net info for all pads.
     // ORPHANED dummy net does not depend on a board
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
         pad->SetNetCode( NETINFO_LIST::ORPHANED );
 }
 
@@ -456,9 +456,9 @@ void MODULE::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode )
 
     case PCB_PAD_T:
         if( aMode == ADD_MODE::APPEND )
-            m_pads.push_back( static_cast<D_PAD*>( aBoardItem ) );
+            m_pads.push_back( static_cast<PAD*>( aBoardItem ) );
         else
-            m_pads.push_front( static_cast<D_PAD*>( aBoardItem ) );
+            m_pads.push_front( static_cast<PAD*>( aBoardItem ) );
         break;
 
     case PCB_FP_ZONE_T:
@@ -517,7 +517,7 @@ void MODULE::Remove( BOARD_ITEM* aBoardItem )
     case PCB_PAD_T:
         for( auto it = m_pads.begin(); it != m_pads.end(); ++it )
         {
-            if( *it == static_cast<D_PAD*>( aBoardItem ) )
+            if( *it == static_cast<PAD*>( aBoardItem ) )
             {
                 m_pads.erase( it );
                 break;
@@ -589,7 +589,7 @@ EDA_RECT MODULE::GetFootprintRect() const
             area.Merge( item->GetBoundingBox() );
     }
 
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
         area.Merge( pad->GetBoundingBox() );
 
     for( FP_ZONE* zone : m_fp_zones )
@@ -617,7 +617,7 @@ EDA_RECT MODULE::GetFpPadsLocalBbox() const
     if( dummy.GetOrientation() )
         dummy.SetOrientation( 0 );
 
-    for( D_PAD* pad : dummy.Pads() )
+    for( PAD* pad : dummy.Pads() )
         area.Merge( pad->GetBoundingBox() );
 
     return area;
@@ -817,7 +817,7 @@ bool MODULE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) co
             return false;
 
         // Determine if any elements in the MODULE intersect the rect
-        for( D_PAD* pad : m_pads )
+        for( PAD* pad : m_pads )
         {
             if( pad->HitTest( arect, false, 0 ) )
                 return true;
@@ -843,9 +843,9 @@ bool MODULE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) co
 }
 
 
-D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const
+PAD* MODULE::FindPadByName( const wxString& aPadName ) const
 {
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
     {
         if( pad->GetName() == aPadName )
             return pad;
@@ -855,9 +855,9 @@ D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const
 }
 
 
-D_PAD* MODULE::GetPad( const wxPoint& aPosition, LSET aLayerMask )
+PAD* MODULE::GetPad( const wxPoint& aPosition, LSET aLayerMask )
 {
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
     {
         // ... and on the correct layer.
         if( !( pad->GetLayerSet() & aLayerMask ).any() )
@@ -871,11 +871,11 @@ D_PAD* MODULE::GetPad( const wxPoint& aPosition, LSET aLayerMask )
 }
 
 
-D_PAD* MODULE::GetTopLeftPad()
+PAD* MODULE::GetTopLeftPad()
 {
-    D_PAD* topLeftPad = GetFirstPad();
+    PAD* topLeftPad = GetFirstPad();
 
-    for( D_PAD* p : m_pads )
+    for( PAD* p : m_pads )
     {
         wxPoint pnt = p->GetPosition(); // GetPosition() returns the center of the pad
 
@@ -897,7 +897,7 @@ unsigned MODULE::GetPadCount( INCLUDE_NPTH_T aIncludeNPTH ) const
 
     unsigned cnt = 0;
 
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
     {
         if( pad->GetAttribute() == PAD_ATTRIB_NPTH )
             continue;
@@ -914,7 +914,7 @@ unsigned MODULE::GetUniquePadCount( INCLUDE_NPTH_T aIncludeNPTH ) const
     std::set<wxString> usedNames;
 
     // Create a set of used pad numbers
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
     {
         // Skip pads not on copper layers (used to build complex
         // solder paste shapes for instance)
@@ -978,7 +978,7 @@ SEARCH_RESULT MODULE::Visit( INSPECTOR inspector, void* testData, const KICAD_T
             break;
 
         case PCB_PAD_T:
-            result = IterateForward<D_PAD*>( m_pads, inspector, testData, p );
+            result = IterateForward<PAD*>( m_pads, inspector, testData, p );
             ++p;
             break;
 
@@ -1067,7 +1067,7 @@ void MODULE::RunOnChildren( const std::function<void (BOARD_ITEM*)>& aFunction )
 {
     try
     {
-        for( D_PAD* pad : m_pads )
+        for( PAD* pad : m_pads )
             aFunction( static_cast<BOARD_ITEM*>( pad ) );
 
         for( FP_ZONE* zone : m_fp_zones )
@@ -1098,7 +1098,7 @@ void MODULE::GetAllDrawingLayers( int aLayers[], int& aCount, bool aIncludePads
 
     if( aIncludePads )
     {
-        for( D_PAD* pad : m_pads )
+        for( PAD* pad : m_pads )
         {
             int pad_layers[KIGFX::VIEW::VIEW_MAX_LAYERS], pad_layers_count;
             pad->ViewGetLayers( pad_layers, pad_layers_count );
@@ -1283,7 +1283,7 @@ void MODULE::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
     NORMALIZE_ANGLE_180( m_Orient );
 
     // Mirror pads to other side of board.
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
         pad->Flip( m_Pos, false );
 
     // Mirror zones to other side of board.
@@ -1330,7 +1330,7 @@ void MODULE::SetPosition( const wxPoint& aPos )
     m_Reference->EDA_TEXT::Offset( delta );
     m_Value->EDA_TEXT::Offset( delta );
 
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
         pad->SetPosition( pad->GetPosition() + delta );
 
     for( ZONE* zone : m_fp_zones )
@@ -1386,7 +1386,7 @@ void MODULE::MoveAnchorPosition( const wxPoint& aMoveVector )
     m_Value->SetDrawCoord();
 
     // Update the pad local coordinates.
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
     {
         pad->SetPos0( pad->GetPos0() + moveVector );
         pad->SetDrawCoord();
@@ -1429,7 +1429,7 @@ void MODULE::SetOrientation( double aNewAngle )
 
     m_Orient = aNewAngle;
 
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
     {
         pad->SetOrientation( pad->GetOrientation() + angleChange );
         pad->SetDrawCoord();
@@ -1482,7 +1482,7 @@ BOARD_ITEM* MODULE::DuplicateItem( const BOARD_ITEM* aItem, bool aAddToModule )
     {
     case PCB_PAD_T:
     {
-        D_PAD* new_pad = new D_PAD( *static_cast<const D_PAD*>( aItem ) );
+        PAD* new_pad = new PAD( *static_cast<const PAD*>( aItem ) );
         const_cast<KIID&>( new_pad->m_Uuid ) = KIID();
 
         if( aAddToModule )
@@ -1563,7 +1563,7 @@ wxString MODULE::GetNextPadName( const wxString& aLastPadName ) const
     std::set<wxString> usedNames;
 
     // Create a set of used pad numbers
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
         usedNames.insert( pad->GetName() );
 
     wxString prefix = UTIL::GetReferencePrefix( aLastPadName );
@@ -1624,7 +1624,7 @@ double MODULE::CoverageRatio( const GENERAL_COLLECTOR& aCollector ) const
     // build list of holes (covered areas not available for selection)
     SHAPE_POLY_SET holes;
 
-    for( D_PAD* pad : m_pads )
+    for( PAD* pad : m_pads )
         addRect( holes, pad->GetBoundingBox() );
 
     addRect( holes, m_Reference->GetBoundingBox() );
@@ -1681,7 +1681,7 @@ std::shared_ptr<SHAPE> MODULE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
 
     // We'll go with (2) for now....
 
-    for( D_PAD* pad : Pads() )
+    for( PAD* pad : Pads() )
         shape->AddShape( pad->GetEffectiveShape( aLayer )->Clone() );
 
     for( BOARD_ITEM* item : GraphicalItems() )
@@ -1752,7 +1752,7 @@ void MODULE::SwapData( BOARD_ITEM* aImage )
 
 bool MODULE::HasThroughHolePads() const
 {
-    for( D_PAD* pad : Pads() )
+    for( PAD* pad : Pads() )
     {
         if( pad->GetAttribute() != PAD_ATTRIB_SMD )
             return true;
@@ -1786,7 +1786,7 @@ bool MODULE::cmp_drawings::operator()( const BOARD_ITEM* aFirst, const BOARD_ITE
 }
 
 
-bool MODULE::cmp_pads::operator()( const D_PAD* aFirst, const D_PAD* aSecond ) const
+bool MODULE::cmp_pads::operator()( const PAD* aFirst, const PAD* aSecond ) const
 {
     if( aFirst->GetName() != aSecond->GetName() )
         return StrNumCmp( aFirst->GetName(), aSecond->GetName() ) < 0;
diff --git a/pcbnew/footprint.h b/pcbnew/footprint.h
index d5b5bbeca3..0540a3fd14 100644
--- a/pcbnew/footprint.h
+++ b/pcbnew/footprint.h
@@ -42,7 +42,7 @@
 
 class LINE_READER;
 class EDA_3D_CANVAS;
-class D_PAD;
+class PAD;
 class BOARD;
 class MSG_PANEL_ITEM;
 class SHAPE;
@@ -98,7 +98,7 @@ public:
     bool     m_Show;        ///< Include module in rendering
 };
 
-DECL_DEQ_FOR_SWIG( PADS, D_PAD* )
+DECL_DEQ_FOR_SWIG( PADS, PAD* )
 DECL_DEQ_FOR_SWIG( DRAWINGS, BOARD_ITEM* )
 DECL_VEC_FOR_SWIG( FP_ZONES, FP_ZONE* )
 DECL_VEC_FOR_SWIG( MODULE_GROUPS, PCB_GROUP* )
@@ -481,12 +481,12 @@ public:
 
     /**
      * Function FindPadByName
-     * returns a D_PAD* with a matching name.  Note that names may not be
+     * returns a PAD* with a matching name.  Note that names may not be
      * unique, depending on how the foot print was created.
      * @param aPadName the pad name to find
-     * @return D_PAD* - The first matching name is returned, or NULL if not found.
+     * @return PAD* - The first matching name is returned, or NULL if not found.
      */
-    D_PAD* FindPadByName( const wxString& aPadName ) const;
+    PAD* FindPadByName( const wxString& aPadName ) const;
 
     /**
      * Function GetPad
@@ -494,17 +494,17 @@ 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 otherwise NULL.
+     * @return A pointer to a PAD object if found otherwise NULL.
      */
-    D_PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET::AllLayersMask() );
+    PAD* GetPad( const wxPoint& aPosition, LSET aLayerMask = LSET::AllLayersMask() );
 
-    D_PAD* GetTopLeftPad();
+    PAD* GetTopLeftPad();
 
     /**
      * Gets the first pad in the list or NULL if none
      * @return first pad or null pointer
      */
-    D_PAD* GetFirstPad() const
+    PAD* GetFirstPad() const
     {
         return m_pads.empty() ? nullptr : m_pads.front();
     }
@@ -682,7 +682,7 @@ public:
 
     struct cmp_pads
     {
-        bool operator()( const D_PAD* aFirst, const D_PAD* aSecond ) const;
+        bool operator()( const PAD* aFirst, const PAD* aSecond ) const;
     };
 
 
@@ -691,10 +691,10 @@ public:
 #endif
 
 private:
-    DRAWINGS               m_drawings;  // BOARD_ITEMs for drawings on the board, owned by pointer.
-    PADS                   m_pads;      // D_PAD items, owned by pointer
-    FP_ZONES               m_fp_zones;  // FP_ZONE items, owned by pointer
-    MODULE_GROUPS          m_fp_groups; // PCB_GROUP items, owned by pointer
+    DRAWINGS       m_drawings;          // BOARD_ITEMs for drawings on the board, owned by pointer.
+    PADS           m_pads;              // PAD items, owned by pointer
+    FP_ZONES       m_fp_zones;          // FP_ZONE items, owned by pointer
+    MODULE_GROUPS  m_fp_groups;         // PCB_GROUP items, owned by pointer
 
     double         m_Orient;            // Orientation in tenths of a degree, 900=90.0 degrees.
     wxPoint        m_Pos;               // Position of module on the board in internal units.
diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp
index 395814a353..403bf8c9c9 100644
--- a/pcbnew/footprint_editor_utils.cpp
+++ b/pcbnew/footprint_editor_utils.cpp
@@ -163,7 +163,8 @@ void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
 {
     switch( aItem->Type() )
     {
-    case PCB_PAD_T:ShowPadPropertiesDialog( static_cast<D_PAD*>( aItem ));
+    case PCB_PAD_T:
+        ShowPadPropertiesDialog( static_cast<PAD*>( aItem ));
         break;
 
     case PCB_MODULE_T:
@@ -171,10 +172,12 @@ void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
         GetCanvas()->Refresh();
         break;
 
-    case PCB_FP_TEXT_T:ShowTextPropertiesDialog( aItem );
+    case PCB_FP_TEXT_T:
+        ShowTextPropertiesDialog( aItem );
         break;
 
-    case PCB_FP_SHAPE_T :ShowGraphicItemPropertiesDialog( aItem );
+    case PCB_FP_SHAPE_T :
+        ShowGraphicItemPropertiesDialog( aItem );
         break;
 
     case PCB_FP_ZONE_T:
diff --git a/pcbnew/kicad_clipboard.cpp b/pcbnew/kicad_clipboard.cpp
index 75217e33b5..e7d7dae034 100644
--- a/pcbnew/kicad_clipboard.cpp
+++ b/pcbnew/kicad_clipboard.cpp
@@ -85,7 +85,7 @@ void CLIPBOARD_IO::SaveSelection( const PCBNEW_SELECTION& aSelected, bool isModE
         // Do not modify existing board
         MODULE newFootprint( *footprint );
 
-        for( D_PAD* pad : newFootprint.Pads() )
+        for( PAD* pad : newFootprint.Pads() )
             pad->SetNetCode( 0 );
 
         // locked means "locked in place"; copied items therefore can't be locked
@@ -115,7 +115,7 @@ void CLIPBOARD_IO::SaveSelection( const PCBNEW_SELECTION& aSelected, bool isModE
                 text->SetType( FP_TEXT::TEXT_is_DIVERS );
 
             // If it is only a footprint, clear the nets from the pads
-            if( D_PAD* pad = dyn_cast<D_PAD*>( clone ) )
+            if( PAD* pad = dyn_cast<PAD*>( clone ) )
                pad->SetNetCode( 0 );
 
             // Add the pad to the new footprint before moving to ensure the local coords are
@@ -192,7 +192,7 @@ void CLIPBOARD_IO::SaveSelection( const PCBNEW_SELECTION& aSelected, bool isModE
             {
                 // Create a parent to own the copied pad
                 MODULE* footprint = new MODULE( m_board );
-                D_PAD*  pad = (D_PAD*) item->Clone();
+                PAD*    pad = (PAD*) item->Clone();
 
                 footprint->SetPosition( pad->GetPosition() );
                 pad->SetPos0( wxPoint() );
diff --git a/pcbnew/microwave/microwave_footprint.cpp b/pcbnew/microwave/microwave_footprint.cpp
index 2222e7ea62..69ebaf9fa8 100644
--- a/pcbnew/microwave/microwave_footprint.cpp
+++ b/pcbnew/microwave/microwave_footprint.cpp
@@ -32,7 +32,7 @@
 MODULE* MICROWAVE_TOOL::createFootprint( MICROWAVE_FOOTPRINT_SHAPE aFootprintShape )
 {
     int      oX;
-    D_PAD*   pad;
+    PAD*     pad;
     MODULE*  module;
     wxString msg, cmp_name;
     int      pad_count = 2;
@@ -203,7 +203,7 @@ MODULE* MICROWAVE_TOOL::createBaseFootprint( const wxString& aValue,
 
     while( aPadCount-- )
     {
-        D_PAD* pad = new D_PAD( footprint );
+        PAD* pad = new PAD( footprint );
 
         footprint->Add( pad, ADD_MODE::INSERT );
 
diff --git a/pcbnew/microwave/microwave_inductor.cpp b/pcbnew/microwave/microwave_inductor.cpp
index 38c3d4ee47..89a00da8d0 100644
--- a/pcbnew/microwave/microwave_inductor.cpp
+++ b/pcbnew/microwave/microwave_inductor.cpp
@@ -360,7 +360,7 @@ MODULE* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN& aIn
      * (Radius decreases if necessary)
      */
 
-    D_PAD*   pad;
+    PAD*     pad;
     wxString msg;
 
     PCB_EDIT_FRAME& editFrame = *getEditFrame<PCB_EDIT_FRAME>();
@@ -437,7 +437,7 @@ MODULE* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN& aIn
     }
 
     // Place a pad on each end of coil.
-    pad = new D_PAD( footprint );
+    pad = new PAD( footprint );
 
     footprint->Add( pad );
 
@@ -451,7 +451,7 @@ MODULE* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN& aIn
     pad->SetAttribute( PAD_ATTRIB_SMD );
     pad->SetShape( PAD_SHAPE_CIRCLE );
 
-    D_PAD* newpad = new D_PAD( *pad );
+    PAD* newpad = new PAD( *pad );
     const_cast<KIID&>( newpad->m_Uuid ) = KIID();
 
     footprint->Add( newpad );
diff --git a/pcbnew/microwave/microwave_polygon.cpp b/pcbnew/microwave/microwave_polygon.cpp
index f7ee2b63f4..041eef8361 100644
--- a/pcbnew/microwave/microwave_polygon.cpp
+++ b/pcbnew/microwave/microwave_polygon.cpp
@@ -240,7 +240,8 @@ void MWAVE_POLYGONAL_SHAPE_DLG::ReadDataShapeDescr( wxCommandEvent& event )
 
 MODULE* MICROWAVE_TOOL::createPolygonShape()
 {
-    D_PAD*    pad1, * pad2;
+    PAD*      pad1;
+    PAD*      pad2;
     MODULE*   module;
     wxString  cmp_name;
     int       pad_count = 2;
diff --git a/pcbnew/netinfo.h b/pcbnew/netinfo.h
index df74897b8d..bb177292c5 100644
--- a/pcbnew/netinfo.h
+++ b/pcbnew/netinfo.h
@@ -40,7 +40,7 @@ class wxDC;
 class wxPoint;
 class LINE_READER;
 class EDA_DRAW_FRAME;
-class D_PAD;
+class PAD;
 class BOARD;
 class BOARD_ITEM;
 class MSG_PANEL_ITEM;
@@ -56,7 +56,7 @@ class PCB_BASE_FRAME;
 #define CH_ACTIF            8        /* Not routed. */
 #define LOCAL_RATSNEST_ITEM 0x8000   /* Line between two pads of a single module. */
 
-DECL_VEC_FOR_SWIG( D_PADS, D_PAD* )
+DECL_VEC_FOR_SWIG( PADS_VEC, PAD* )
 
 /**
  * NETINFO_ITEM
diff --git a/pcbnew/netinfo_item.cpp b/pcbnew/netinfo_item.cpp
index 60dd67276f..f21778e619 100644
--- a/pcbnew/netinfo_item.cpp
+++ b/pcbnew/netinfo_item.cpp
@@ -90,7 +90,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANE
 
     for( MODULE* mod : board->Modules() )
     {
-        for( D_PAD* pad : mod->Pads() )
+        for( PAD* pad : mod->Pads() )
         {
             if( pad->GetNetCode() == GetNet() )
             {
diff --git a/pcbnew/netinfo_list.cpp b/pcbnew/netinfo_list.cpp
index ea440c8c39..10c5ee2f74 100644
--- a/pcbnew/netinfo_list.cpp
+++ b/pcbnew/netinfo_list.cpp
@@ -220,7 +220,7 @@ void NETINFO_MAPPING::Update()
     // footprints/pads
     for( MODULE* module : m_board->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
             nets.insert( pad->GetNetCode() );
     }
 
diff --git a/pcbnew/netlist_reader/board_netlist_updater.cpp b/pcbnew/netlist_reader/board_netlist_updater.cpp
index da8f6bb93c..ae889e59e9 100644
--- a/pcbnew/netlist_reader/board_netlist_updater.cpp
+++ b/pcbnew/netlist_reader/board_netlist_updater.cpp
@@ -79,13 +79,13 @@ BOARD_NETLIST_UPDATER::~BOARD_NETLIST_UPDATER()
 // These functions allow inspection of pad nets during dry runs by keeping a cache of
 // current pad netnames indexed by pad.
 
-void BOARD_NETLIST_UPDATER::cacheNetname( D_PAD* aPad, const wxString& aNetname )
+void BOARD_NETLIST_UPDATER::cacheNetname( PAD* aPad, const wxString& aNetname )
 {
     m_padNets[ aPad ] = aNetname;
 }
 
 
-wxString BOARD_NETLIST_UPDATER::getNetname( D_PAD* aPad )
+wxString BOARD_NETLIST_UPDATER::getNetname( PAD* aPad )
 {
     if( m_isDryRun && m_padNets.count( aPad ) )
         return m_padNets[ aPad ];
@@ -94,13 +94,13 @@ wxString BOARD_NETLIST_UPDATER::getNetname( D_PAD* aPad )
 }
 
 
-void BOARD_NETLIST_UPDATER::cachePinFunction( D_PAD* aPad, const wxString& aPinFunction )
+void BOARD_NETLIST_UPDATER::cachePinFunction( PAD* aPad, const wxString& aPinFunction )
 {
     m_padPinFunctions[ aPad ] = aPinFunction;
 }
 
 
-wxString BOARD_NETLIST_UPDATER::getPinFunction( D_PAD* aPad )
+wxString BOARD_NETLIST_UPDATER::getPinFunction( PAD* aPad )
 {
     if( m_isDryRun && m_padPinFunctions.count( aPad ) )
         return m_padPinFunctions[ aPad ];
@@ -171,7 +171,7 @@ MODULE* BOARD_NETLIST_UPDATER::addNewComponent( COMPONENT* aComponent )
     // Set the pads ratsnest settings to the global settings
     bool set_ratsnest = m_frame->GetDisplayOptions().m_ShowGlobalRatsnest;
 
-    for ( D_PAD* pad : footprint->Pads() )
+    for( PAD* pad : footprint->Pads() )
         pad->SetLocalRatsnestVisible( set_ratsnest );
 
     m_newFootprintsCount++;
@@ -355,7 +355,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
     bool changed = false;
 
     // At this point, the component footprint is updated.  Now update the nets.
-    for( D_PAD* pad : aPcbComponent->Pads() )
+    for( PAD* pad : aPcbComponent->Pads() )
     {
         const COMPONENT_NET& net = aNewComponent->GetNet( pad->GetName() );
 
@@ -568,7 +568,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
             // net is guaranteed to be wrong.
             wxString updatedNetname = wxEmptyString;
 
-            for( D_PAD* pad : m_zoneConnectionsCache[ zone ] )
+            for( PAD* pad : m_zoneConnectionsCache[ zone ] )
             {
                 if( getNetname( pad ) != zone->GetNetname() )
                 {
@@ -657,24 +657,24 @@ bool BOARD_NETLIST_UPDATER::deleteUnusedComponents( NETLIST& aNetlist )
 
 bool BOARD_NETLIST_UPDATER::deleteSinglePadNets()
 {
-    int         count = 0;
-    wxString    netname;
-    wxString    msg;
-    D_PAD*      previouspad = NULL;
+    int       count = 0;
+    wxString  netname;
+    wxString  msg;
+    PAD*      previouspad = NULL;
 
     // We need the pad list for next tests.
 
     m_board->BuildListOfNets();
 
-    std::vector<D_PAD*> padlist = m_board->GetPads();
+    std::vector<PAD*> padlist = m_board->GetPads();
 
     // Sort pads by netlist name
-    std::sort( padlist.begin(), padlist.end(), [ this ]( D_PAD* a, D_PAD* b ) -> bool
+    std::sort( padlist.begin(), padlist.end(), [ this ]( PAD* a, PAD* b ) -> bool
                                                {
                                                    return getNetname( a ) < getNetname( b );
                                                } );
 
-    for( D_PAD* pad : padlist )
+    for( PAD* pad : padlist )
     {
         if( getNetname( pad ).IsEmpty() )
             continue;
diff --git a/pcbnew/netlist_reader/board_netlist_updater.h b/pcbnew/netlist_reader/board_netlist_updater.h
index c06da81cc8..60d91de165 100644
--- a/pcbnew/netlist_reader/board_netlist_updater.h
+++ b/pcbnew/netlist_reader/board_netlist_updater.h
@@ -134,11 +134,11 @@ public:
     }
 
 private:
-    void cacheNetname( D_PAD* aPad, const wxString& aNetname );
-    wxString getNetname( D_PAD* aPad );
+    void cacheNetname( PAD* aPad, const wxString& aNetname );
+    wxString getNetname( PAD* aPad );
 
-    void cachePinFunction( D_PAD* aPad, const wxString& aPinFunction );
-    wxString getPinFunction( D_PAD* aPad );
+    void cachePinFunction( PAD* aPad, const wxString& aPinFunction );
+    wxString getPinFunction( PAD* aPad );
 
     wxPoint estimateComponentInsertionPosition();
     MODULE* addNewComponent( COMPONENT* aComponent );
@@ -156,12 +156,12 @@ private:
     BOARD*          m_board;
     REPORTER*       m_reporter;
 
-    std::map<ZONE*, std::vector<D_PAD*>> m_zoneConnectionsCache;
-    std::map<wxString, wxString>         m_oldToNewNets;
-    std::map<D_PAD*, wxString>           m_padNets;
-    std::map<D_PAD*, wxString>           m_padPinFunctions;
-    std::vector<MODULE*>                 m_addedComponents;
-    std::map<wxString, NETINFO_ITEM*>    m_addedNets;
+    std::map<ZONE*, std::vector<PAD*>> m_zoneConnectionsCache;
+    std::map<wxString, wxString>       m_oldToNewNets;
+    std::map<PAD*, wxString>           m_padNets;
+    std::map<PAD*, wxString>           m_padPinFunctions;
+    std::vector<MODULE*>               m_addedComponents;
+    std::map<wxString, NETINFO_ITEM*>  m_addedNets;
 
     bool m_deleteSinglePadNets;
     bool m_deleteUnusedComponents;
diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp
index 5d75320724..60d536cbda 100644
--- a/pcbnew/pad.cpp
+++ b/pcbnew/pad.cpp
@@ -23,11 +23,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
 
-/**
- * @file class_pad.cpp
- * D_PAD class implementation.
- */
-
 #include <base_units.h>
 #include <bitmaps.h>
 #include <math/util.h>      // for KiROUND
@@ -50,7 +45,7 @@
 
 #include <memory>
 
-D_PAD::D_PAD( MODULE* parent ) :
+PAD::PAD( MODULE* parent ) :
     BOARD_CONNECTED_ITEM( parent, PCB_PAD_T )
 {
     m_size.x = m_size.y   = Mils2iu( 60 );  // Default pad size 60 mils.
@@ -97,7 +92,7 @@ D_PAD::D_PAD( MODULE* parent ) :
 }
 
 
-D_PAD::D_PAD( const D_PAD& aOther ) :
+PAD::PAD( const PAD& aOther ) :
     BOARD_CONNECTED_ITEM( aOther.GetParent(), PCB_PAD_T )
 {
     BOARD_CONNECTED_ITEM::operator=( aOther );
@@ -116,7 +111,7 @@ D_PAD::D_PAD( const D_PAD& aOther ) :
 }
 
 
-D_PAD& D_PAD::operator=( const D_PAD &aOther )
+PAD& PAD::operator=( const PAD &aOther )
 {
     BOARD_CONNECTED_ITEM::operator=( aOther );
 
@@ -135,42 +130,42 @@ D_PAD& D_PAD::operator=( const D_PAD &aOther )
 }
 
 
-LSET D_PAD::PTHMask()
+LSET PAD::PTHMask()
 {
     static LSET saved = LSET::AllCuMask() | LSET( 2, F_Mask, B_Mask );
     return saved;
 }
 
 
-LSET D_PAD::SMDMask()
+LSET PAD::SMDMask()
 {
     static LSET saved( 3, F_Cu, F_Paste, F_Mask );
     return saved;
 }
 
 
-LSET D_PAD::ConnSMDMask()
+LSET PAD::ConnSMDMask()
 {
     static LSET saved( 2, F_Cu, F_Mask );
     return saved;
 }
 
 
-LSET D_PAD::UnplatedHoleMask()
+LSET PAD::UnplatedHoleMask()
 {
     static LSET saved = LSET( 4, F_Cu, B_Cu, F_Mask, B_Mask );
     return saved;
 }
 
 
-LSET D_PAD::ApertureMask()
+LSET PAD::ApertureMask()
 {
     static LSET saved( 1, F_Paste );
     return saved;
 }
 
 
-bool D_PAD::IsFlipped() const
+bool PAD::IsFlipped() const
 {
     if( GetParent() &&  GetParent()->GetLayer() == B_Cu )
         return true;
@@ -178,7 +173,7 @@ bool D_PAD::IsFlipped() const
 }
 
 
-bool D_PAD::FlashLayer( LSET aLayers ) const
+bool PAD::FlashLayer( LSET aLayers ) const
 {
     for( auto layer : aLayers.Seq() )
     {
@@ -190,7 +185,7 @@ bool D_PAD::FlashLayer( LSET aLayers ) const
 }
 
 
-bool D_PAD::FlashLayer( int aLayer ) const
+bool PAD::FlashLayer( int aLayer ) const
 {
     // Return the "normal" shape if the caller doesn't specify a particular layer
     if( aLayer == UNDEFINED_LAYER )
@@ -222,13 +217,13 @@ bool D_PAD::FlashLayer( int aLayer ) const
 }
 
 
-int D_PAD::GetRoundRectCornerRadius() const
+int PAD::GetRoundRectCornerRadius() const
 {
     return KiROUND( std::min( m_size.x, m_size.y ) * m_roundedCornerScale );
 }
 
 
-void D_PAD::SetRoundRectCornerRadius( double aRadius )
+void PAD::SetRoundRectCornerRadius( double aRadius )
 {
     int min_r = std::min( m_size.x, m_size.y );
 
@@ -237,7 +232,7 @@ void D_PAD::SetRoundRectCornerRadius( double aRadius )
 }
 
 
-void D_PAD::SetRoundRectRadiusRatio( double aRadiusScale )
+void PAD::SetRoundRectRadiusRatio( double aRadiusScale )
 {
     m_roundedCornerScale = std::max( 0.0, std::min( aRadiusScale, 0.5 ) );
 
@@ -245,7 +240,7 @@ void D_PAD::SetRoundRectRadiusRatio( double aRadiusScale )
 }
 
 
-void D_PAD::SetChamferRectRatio( double aChamferScale )
+void PAD::SetChamferRectRatio( double aChamferScale )
 {
     m_chamferScale = std::max( 0.0, std::min( aChamferScale, 0.5 ) );
 
@@ -253,7 +248,7 @@ void D_PAD::SetChamferRectRatio( double aChamferScale )
 }
 
 
-const std::shared_ptr<SHAPE_POLY_SET>& D_PAD::GetEffectivePolygon( PCB_LAYER_ID aLayer ) const
+const std::shared_ptr<SHAPE_POLY_SET>& PAD::GetEffectivePolygon( PCB_LAYER_ID aLayer ) const
 {
     if( m_shapesDirty )
         BuildEffectiveShapes( aLayer );
@@ -262,7 +257,7 @@ const std::shared_ptr<SHAPE_POLY_SET>& D_PAD::GetEffectivePolygon( PCB_LAYER_ID
 }
 
 
-std::shared_ptr<SHAPE> D_PAD::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
+std::shared_ptr<SHAPE> PAD::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
 {
     if( m_shapesDirty )
         BuildEffectiveShapes( aLayer );
@@ -271,7 +266,7 @@ std::shared_ptr<SHAPE> D_PAD::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
 }
 
 
-const SHAPE_SEGMENT* D_PAD::GetEffectiveHoleShape() const
+const SHAPE_SEGMENT* PAD::GetEffectiveHoleShape() const
 {
     if( m_shapesDirty )
         BuildEffectiveShapes( UNDEFINED_LAYER );
@@ -280,7 +275,7 @@ const SHAPE_SEGMENT* D_PAD::GetEffectiveHoleShape() const
 }
 
 
-int D_PAD::GetBoundingRadius() const
+int PAD::GetBoundingRadius() const
 {
     if( m_shapesDirty )
         BuildEffectiveShapes( UNDEFINED_LAYER );
@@ -289,7 +284,7 @@ int D_PAD::GetBoundingRadius() const
 }
 
 
-void D_PAD::BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const
+void PAD::BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const
 {
     BOARD* board = GetBoard();
     int    maxError = board ? board->GetDesignSettings().m_MaxError : ARC_HIGH_DEF;
@@ -407,7 +402,7 @@ void D_PAD::BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const
         break;
 
     default:
-        wxFAIL_MSG( "D_PAD::buildEffectiveShapes: Unsupported pad shape: "
+        wxFAIL_MSG( "PAD::buildEffectiveShapes: Unsupported pad shape: "
                     + PAD_SHAPE_T_asString( effectiveShape ) );
         break;
     }
@@ -471,7 +466,7 @@ void D_PAD::BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const
 }
 
 
-const EDA_RECT D_PAD::GetBoundingBox() const
+const EDA_RECT PAD::GetBoundingBox() const
 {
     if( m_shapesDirty )
         BuildEffectiveShapes( UNDEFINED_LAYER );
@@ -480,7 +475,7 @@ const EDA_RECT D_PAD::GetBoundingBox() const
 }
 
 
-void D_PAD::SetDrawCoord()
+void PAD::SetDrawCoord()
 {
     MODULE* module = (MODULE*) m_Parent;
 
@@ -498,7 +493,7 @@ void D_PAD::SetDrawCoord()
 }
 
 
-void D_PAD::SetLocalCoord()
+void PAD::SetLocalCoord()
 {
     MODULE* module = (MODULE*) m_Parent;
 
@@ -513,7 +508,7 @@ void D_PAD::SetLocalCoord()
 }
 
 
-void D_PAD::SetAttribute( PAD_ATTR_T aAttribute )
+void PAD::SetAttribute( PAD_ATTR_T aAttribute )
 {
     m_attribute = aAttribute;
 
@@ -524,7 +519,7 @@ void D_PAD::SetAttribute( PAD_ATTR_T aAttribute )
 }
 
 
-void D_PAD::SetProperty( PAD_PROP_T aProperty )
+void PAD::SetProperty( PAD_PROP_T aProperty )
 {
     m_property = aProperty;
 
@@ -532,7 +527,7 @@ void D_PAD::SetProperty( PAD_PROP_T aProperty )
 }
 
 
-void D_PAD::SetOrientation( double aAngle )
+void PAD::SetOrientation( double aAngle )
 {
     NORMALIZE_ANGLE_POS( aAngle );
     m_orient = aAngle;
@@ -541,7 +536,7 @@ void D_PAD::SetOrientation( double aAngle )
 }
 
 
-void D_PAD::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
+void PAD::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
 {
     if( aFlipLeftRight )
     {
@@ -600,7 +595,7 @@ void D_PAD::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
 
 
 // Flip (mirror) the basic shapes (primitives), in custom pads
-void D_PAD::FlipPrimitives( bool aFlipLeftRight )
+void PAD::FlipPrimitives( bool aFlipLeftRight )
 {
     for( std::shared_ptr<PCB_SHAPE>& primitive : m_editPrimitives )
         primitive->Flip( wxPoint( 0, 0 ), aFlipLeftRight );
@@ -610,7 +605,7 @@ void D_PAD::FlipPrimitives( bool aFlipLeftRight )
 
 
 // Returns the position of the pad.
-wxPoint D_PAD::ShapePos() const
+wxPoint PAD::ShapePos() const
 {
     if( m_offset.x == 0 && m_offset.y == 0 )
         return m_pos;
@@ -625,7 +620,7 @@ wxPoint D_PAD::ShapePos() const
 }
 
 
-int D_PAD::GetLocalClearanceOverrides( wxString* aSource ) const
+int PAD::GetLocalClearanceOverrides( wxString* aSource ) const
 {
     // A pad can have specific clearance that overrides its NETCLASS clearance value
     if( GetLocalClearance() )
@@ -639,7 +634,7 @@ int D_PAD::GetLocalClearanceOverrides( wxString* aSource ) const
 }
 
 
-int D_PAD::GetLocalClearance( wxString* aSource ) const
+int PAD::GetLocalClearance( wxString* aSource ) const
 {
     if( aSource )
         *aSource = wxString::Format( _( "pad %s" ), GetName() );
@@ -650,7 +645,7 @@ int D_PAD::GetLocalClearance( wxString* aSource ) const
 
 // Mask margins handling:
 
-int D_PAD::GetSolderMaskMargin() const
+int PAD::GetSolderMaskMargin() const
 {
     // The pad inherits the margin only to calculate a default shape,
     // therefore only if it is also a copper layer
@@ -695,7 +690,7 @@ int D_PAD::GetSolderMaskMargin() const
 }
 
 
-wxSize D_PAD::GetSolderPasteMargin() const
+wxSize PAD::GetSolderPasteMargin() const
 {
     // The pad inherits the margin only to calculate a default shape,
     // therefore only if it is also a copper layer.
@@ -719,9 +714,7 @@ wxSize D_PAD::GetSolderPasteMargin() const
         auto brd = GetBoard();
 
         if( margin == 0 && brd )
-        {
-                margin = brd->GetDesignSettings().m_SolderPasteMargin;
-        }
+            margin = brd->GetDesignSettings().m_SolderPasteMargin;
 
         if( mratio == 0.0 )
             mratio = module->GetLocalSolderPasteMarginRatio();
@@ -747,7 +740,7 @@ wxSize D_PAD::GetSolderPasteMargin() const
 }
 
 
-ZONE_CONNECTION D_PAD::GetEffectiveZoneConnection( wxString* aSource ) const
+ZONE_CONNECTION PAD::GetEffectiveZoneConnection( wxString* aSource ) const
 {
     MODULE* module = GetParent();
 
@@ -768,7 +761,7 @@ ZONE_CONNECTION D_PAD::GetEffectiveZoneConnection( wxString* aSource ) const
 }
 
 
-int D_PAD::GetEffectiveThermalSpokeWidth( wxString* aSource ) const
+int PAD::GetEffectiveThermalSpokeWidth( wxString* aSource ) const
 {
     MODULE* module = GetParent();
 
@@ -787,7 +780,7 @@ int D_PAD::GetEffectiveThermalSpokeWidth( wxString* aSource ) const
 }
 
 
-int D_PAD::GetEffectiveThermalGap( wxString* aSource ) const
+int PAD::GetEffectiveThermalGap( wxString* aSource ) const
 {
     MODULE* module = GetParent();
 
@@ -806,7 +799,7 @@ int D_PAD::GetEffectiveThermalGap( wxString* aSource ) const
 }
 
 
-void D_PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
+void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
 {
     EDA_UNITS              units = aFrame->GetUserUnits();
     wxString               msg, msg2;
@@ -909,7 +902,7 @@ void D_PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>
 }
 
 
-bool D_PAD::HitTest( const wxPoint& aPosition, int aAccuracy ) const
+bool PAD::HitTest( const wxPoint& aPosition, int aAccuracy ) const
 {
     VECTOR2I delta = aPosition - GetPosition();
     int      boundingRadius = GetBoundingRadius() + aAccuracy;
@@ -921,7 +914,7 @@ bool D_PAD::HitTest( const wxPoint& aPosition, int aAccuracy ) const
 }
 
 
-bool D_PAD::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
+bool PAD::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
 {
     auto getArea = []( const SHAPE_POLY_SET& aPoly ) -> double
                    {
@@ -960,7 +953,7 @@ bool D_PAD::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) con
 }
 
 
-int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp )
+int PAD::Compare( const PAD* padref, const PAD* padcmp )
 {
     int diff;
 
@@ -1016,7 +1009,7 @@ int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp )
 }
 
 
-void D_PAD::Rotate( const wxPoint& aRotCentre, double aAngle )
+void PAD::Rotate( const wxPoint& aRotCentre, double aAngle )
 {
     RotatePoint( &m_pos, aRotCentre, aAngle );
 
@@ -1028,7 +1021,7 @@ void D_PAD::Rotate( const wxPoint& aRotCentre, double aAngle )
 }
 
 
-wxString D_PAD::ShowPadShape() const
+wxString PAD::ShowPadShape() const
 {
     switch( GetShape() )
     {
@@ -1044,7 +1037,7 @@ wxString D_PAD::ShowPadShape() const
 }
 
 
-wxString D_PAD::ShowPadAttr() const
+wxString PAD::ShowPadAttr() const
 {
     switch( GetAttribute() )
     {
@@ -1057,7 +1050,7 @@ wxString D_PAD::ShowPadAttr() const
 }
 
 
-wxString D_PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
+wxString PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
 {
     if( GetName().IsEmpty() )
     {
@@ -1075,26 +1068,26 @@ wxString D_PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
 }
 
 
-BITMAP_DEF D_PAD::GetMenuImage() const
+BITMAP_DEF PAD::GetMenuImage() const
 {
     return pad_xpm;
 }
 
 
-EDA_ITEM* D_PAD::Clone() const
+EDA_ITEM* PAD::Clone() const
 {
-    return new D_PAD( *this );
+    return new PAD( *this );
 }
 
 
-bool D_PAD::PadShouldBeNPTH() const
+bool PAD::PadShouldBeNPTH() const
 {
     return( m_attribute == PAD_ATTRIB_PTH
             && m_drill.x >= m_size.x && m_drill.y >= m_size.y );
 }
 
 
-void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
+void PAD::ViewGetLayers( int aLayers[], int& aCount ) const
 {
     aCount = 0;
 
@@ -1168,7 +1161,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
 }
 
 
-double D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
+double PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
 {
     if( aView->GetPrintMode() > 0 )  // In printing mode the pad is always drawable
         return 0.0;
@@ -1228,7 +1221,7 @@ double D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
 }
 
 
-const BOX2I D_PAD::ViewBBox() const
+const BOX2I PAD::ViewBBox() const
 {
     // Bounding box includes soldermask too. Remember mask and/or paste
     // margins can be < 0
@@ -1245,13 +1238,13 @@ const BOX2I D_PAD::ViewBBox() const
 }
 
 
-MODULE* D_PAD::GetParent() const
+MODULE* PAD::GetParent() const
 {
     return dynamic_cast<MODULE*>( m_Parent );
 }
 
 
-void D_PAD::ImportSettingsFrom( const D_PAD& aMasterPad )
+void PAD::ImportSettingsFrom( const PAD& aMasterPad )
 {
     SetShape( aMasterPad.GetShape() );
     SetLayerSet( aMasterPad.GetLayerSet() );
@@ -1335,7 +1328,7 @@ void D_PAD::ImportSettingsFrom( const D_PAD& aMasterPad )
 }
 
 
-void D_PAD::SwapData( BOARD_ITEM* aImage )
+void PAD::SwapData( BOARD_ITEM* aImage )
 {
     assert( aImage->Type() == PCB_PAD_T );
 
@@ -1372,56 +1365,56 @@ static struct PAD_DESC
                 .Map( PAD_PROP_CASTELLATED,       _HKI( "Castellated pad" ) );
 
         PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
-        REGISTER_TYPE( D_PAD );
-        propMgr.InheritsAfter( TYPE_HASH( D_PAD ), TYPE_HASH( BOARD_CONNECTED_ITEM ) );
+        REGISTER_TYPE( PAD );
+        propMgr.InheritsAfter( TYPE_HASH( PAD ), TYPE_HASH( BOARD_CONNECTED_ITEM ) );
 
-        auto padType = new PROPERTY_ENUM<D_PAD, PAD_ATTR_T>( _HKI( "Pad Type" ),
-                    &D_PAD::SetAttribute, &D_PAD::GetAttribute );
+        auto padType = new PROPERTY_ENUM<PAD, PAD_ATTR_T>( _HKI( "Pad Type" ),
+                    &PAD::SetAttribute, &PAD::GetAttribute );
         propMgr.AddProperty( padType );
 
-        auto shape = new PROPERTY_ENUM<D_PAD, PAD_SHAPE_T>( _HKI( "Shape" ),
-                    &D_PAD::SetShape, &D_PAD::GetShape );
+        auto shape = new PROPERTY_ENUM<PAD, PAD_SHAPE_T>( _HKI( "Shape" ),
+                    &PAD::SetShape, &PAD::GetShape );
         propMgr.AddProperty( shape );
 
-        propMgr.AddProperty( new PROPERTY<D_PAD, wxString>( _HKI( "Pad Number" ),
-                    &D_PAD::SetName, &D_PAD::GetName ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, double>( _HKI( "Orientation" ),
-                    &D_PAD::SetOrientationDegrees, &D_PAD::GetOrientationDegrees,
+        propMgr.AddProperty( new PROPERTY<PAD, wxString>( _HKI( "Pad Number" ),
+                    &PAD::SetName, &PAD::GetName ) );
+        propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Orientation" ),
+                    &PAD::SetOrientationDegrees, &PAD::GetOrientationDegrees,
                     PROPERTY_DISPLAY::DEGREE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Size X" ),
-                    &D_PAD::SetSizeX, &D_PAD::GetSizeX,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Size X" ),
+                    &PAD::SetSizeX, &PAD::GetSizeX,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Size Y" ),
-                    &D_PAD::SetSizeY, &D_PAD::GetSizeY,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Size Y" ),
+                    &PAD::SetSizeY, &PAD::GetSizeY,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Hole Size X" ),
-                    &D_PAD::SetDrillSizeX, &D_PAD::GetDrillSizeX,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Hole Size X" ),
+                    &PAD::SetDrillSizeX, &PAD::GetDrillSizeX,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Hole Size Y" ),
-                    &D_PAD::SetDrillSizeY, &D_PAD::GetDrillSizeY,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Hole Size Y" ),
+                    &PAD::SetDrillSizeY, &PAD::GetDrillSizeY,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Pad To Die Length" ),
-                    &D_PAD::SetPadToDieLength, &D_PAD::GetPadToDieLength,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Pad To Die Length" ),
+                    &PAD::SetPadToDieLength, &PAD::GetPadToDieLength,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Local Soldermask Margin" ),
-                    &D_PAD::SetLocalSolderMaskMargin, &D_PAD::GetLocalSolderMaskMargin,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Local Soldermask Margin" ),
+                    &PAD::SetLocalSolderMaskMargin, &PAD::GetLocalSolderMaskMargin,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Local Solderpaste Margin" ),
-                    &D_PAD::SetLocalSolderPasteMargin, &D_PAD::GetLocalSolderPasteMargin,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Local Solderpaste Margin" ),
+                    &PAD::SetLocalSolderPasteMargin, &PAD::GetLocalSolderPasteMargin,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, double>( _HKI( "Local Solderpaste Margin Ratio" ),
-                    &D_PAD::SetLocalSolderPasteMarginRatio, &D_PAD::GetLocalSolderPasteMarginRatio ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Thermal Relief Spoke Width" ),
-                    &D_PAD::SetThermalSpokeWidth, &D_PAD::GetThermalSpokeWidth,
+        propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Local Solderpaste Margin Ratio" ),
+                    &PAD::SetLocalSolderPasteMarginRatio, &PAD::GetLocalSolderPasteMarginRatio ) );
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Thermal Relief Spoke Width" ),
+                    &PAD::SetThermalSpokeWidth, &PAD::GetThermalSpokeWidth,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Thermal Relief" ),
-                    &D_PAD::SetThermalGap, &D_PAD::GetThermalGap,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Thermal Relief" ),
+                    &PAD::SetThermalGap, &PAD::GetThermalGap,
                     PROPERTY_DISPLAY::DISTANCE ) );
-        propMgr.AddProperty( new PROPERTY_ENUM<D_PAD, PAD_PROP_T>( _HKI( "Fabrication Property" ),
-                    &D_PAD::SetProperty, &D_PAD::GetProperty ) );
+        propMgr.AddProperty( new PROPERTY_ENUM<PAD, PAD_PROP_T>( _HKI( "Fabrication Property" ),
+                    &PAD::SetProperty, &PAD::GetProperty ) );
 
-        auto roundRadiusRatio = new PROPERTY<D_PAD, double>( _HKI( "Round Radius Ratio" ),
-                    &D_PAD::SetRoundRectRadiusRatio, &D_PAD::GetRoundRectRadiusRatio );
+        auto roundRadiusRatio = new PROPERTY<PAD, double>( _HKI( "Round Radius Ratio" ),
+                    &PAD::SetRoundRectRadiusRatio, &PAD::GetRoundRectRadiusRatio );
         roundRadiusRatio->SetAvailableFunc(
                     [=]( INSPECTABLE* aItem ) -> bool
                     {
@@ -1429,8 +1422,8 @@ static struct PAD_DESC
                     } );
         propMgr.AddProperty( roundRadiusRatio );
 
-        propMgr.AddProperty( new PROPERTY<D_PAD, int>( _HKI( "Local Clearance" ),
-                    &D_PAD::SetLocalClearance, &D_PAD::GetLocalClearance,
+        propMgr.AddProperty( new PROPERTY<PAD, int>( _HKI( "Local Clearance" ),
+                    &PAD::SetLocalClearance, &PAD::GetLocalClearance,
                     PROPERTY_DISPLAY::DISTANCE ) );
         // TODO delta, dirill shape offset, layerset, zone connection
     }
diff --git a/pcbnew/pad.h b/pcbnew/pad.h
index b9047b2e87..73460ab81a 100644
--- a/pcbnew/pad.h
+++ b/pcbnew/pad.h
@@ -22,15 +22,10 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
 
-/**
- * @file class_pad.h
- * @brief Pad object description
- */
+#ifndef PAD_H
+#define PAD_H
 
-#ifndef PAD_H_
-#define PAD_H_
-
-#include "zones.h"
+#include <zones.h>
 #include <board_connected_item.h>
 #include <class_board_item.h>
 #include <convert_to_biu.h>
@@ -61,15 +56,15 @@ namespace KIGFX
     class VIEW;
 }
 
-class D_PAD : public BOARD_CONNECTED_ITEM
+class PAD : public BOARD_CONNECTED_ITEM
 {
 public:
-    D_PAD( MODULE* parent );
+    PAD( MODULE* parent );
 
     // Copy constructor & operator= are needed because the list of basic shapes
     // must be duplicated in copy.
-    D_PAD( const D_PAD& aPad );
-    D_PAD& operator=( const D_PAD &aOther );
+    PAD( const PAD& aPad );
+    PAD& operator=( const PAD &aOther );
 
     /*
      * Default layers used for pads, according to the pad type.
@@ -116,7 +111,7 @@ public:
      * as aMasterPad
      * @param aMasterPad = the template pad
      */
-    void ImportSettingsFrom( const D_PAD& aMasterPad );
+    void ImportSettingsFrom( const PAD& aMasterPad );
 
     /**
      * @return true if the pad has a footprint parent flipped
@@ -143,7 +138,7 @@ public:
      * @param other
      * @return
      */
-    bool SameLogicalPadAs( const D_PAD* other ) const
+    bool SameLogicalPadAs( const PAD* other ) const
     {
         // hide tricks behind sensible API
         return GetParent() == other->GetParent() && m_name == other->m_name;
@@ -579,7 +574,7 @@ public:
      * compares two pads and return 0 if they are equal.
      * @return int - <0 if left less than right, 0 if equal, >0 if left greater than right.
      */
-    static int Compare( const D_PAD* padref, const D_PAD* padcmp );
+    static int Compare( const PAD* padref, const PAD* padcmp );
 
     void Move( const wxPoint& aMoveVector ) override
     {
@@ -609,12 +604,12 @@ public:
     EDA_ITEM* Clone() const override;
 
     /**
-     * same as Clone, but returns a D_PAD item.
+     * same as Clone, but returns a PAD item.
      * Useful mainly for python scripts, because Clone returns an EDA_ITEM.
      */
-    D_PAD* ClonePad() const
+    PAD* ClonePad() const
     {
-        return (D_PAD*) Clone();
+        return (PAD*) Clone();
     }
 
     /**
@@ -745,4 +740,4 @@ private:
     int         m_thermalGap;
 };
 
-#endif  // PAD_H_
+#endif  // PAD_H
diff --git a/pcbnew/pad_custom_shape_functions.cpp b/pcbnew/pad_custom_shape_functions.cpp
index 69cf9b2d27..de00a21914 100644
--- a/pcbnew/pad_custom_shape_functions.cpp
+++ b/pcbnew/pad_custom_shape_functions.cpp
@@ -22,11 +22,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
 
-/**
- * @file class_pad_custom_shape_functions.cpp
- * D_PAD functions specific to custom shaped pads.
- */
-
 #include <board.h>
 #include <class_board_item.h>
 #include <pcb_shape.h>
@@ -41,7 +36,7 @@
  * the shape is a polygon (can be with thick outline), segment, circle or arc
  */
 
-void D_PAD::AddPrimitivePoly( const SHAPE_POLY_SET& aPoly, int aThickness )
+void PAD::AddPrimitivePoly( const SHAPE_POLY_SET& aPoly, int aThickness )
 {
     std::vector<wxPoint> points;
 
@@ -57,7 +52,7 @@ void D_PAD::AddPrimitivePoly( const SHAPE_POLY_SET& aPoly, int aThickness )
 }
 
 
-void D_PAD::AddPrimitivePoly( const std::vector<wxPoint>& aPoly, int aThickness )
+void PAD::AddPrimitivePoly( const std::vector<wxPoint>& aPoly, int aThickness )
 {
     PCB_SHAPE* item = new PCB_SHAPE();
     item->SetShape( S_POLYGON );
@@ -68,7 +63,7 @@ void D_PAD::AddPrimitivePoly( const std::vector<wxPoint>& aPoly, int aThickness
 }
 
 
-void D_PAD::AddPrimitiveSegment( const wxPoint& aStart, const wxPoint& aEnd, int aThickness )
+void PAD::AddPrimitiveSegment( const wxPoint& aStart, const wxPoint& aEnd, int aThickness )
 {
     PCB_SHAPE* item = new PCB_SHAPE();
     item->SetStart( aStart );
@@ -79,8 +74,8 @@ void D_PAD::AddPrimitiveSegment( const wxPoint& aStart, const wxPoint& aEnd, int
 }
 
 
-void D_PAD::AddPrimitiveArc( const wxPoint& aCenter, const wxPoint& aStart, int aArcAngle,
-                             int aThickness )
+void PAD::AddPrimitiveArc( const wxPoint& aCenter, const wxPoint& aStart, int aArcAngle,
+                           int aThickness )
 {
     PCB_SHAPE* item = new PCB_SHAPE();
     item->SetShape( S_ARC );
@@ -93,8 +88,8 @@ void D_PAD::AddPrimitiveArc( const wxPoint& aCenter, const wxPoint& aStart, int
 }
 
 
-void D_PAD::AddPrimitiveCurve( const wxPoint& aStart, const wxPoint& aEnd, const wxPoint& aCtrl1,
-                               const wxPoint& aCtrl2, int aThickness )
+void PAD::AddPrimitiveCurve( const wxPoint& aStart, const wxPoint& aEnd, const wxPoint& aCtrl1,
+                             const wxPoint& aCtrl2, int aThickness )
 {
     PCB_SHAPE* item = new PCB_SHAPE();
     item->SetShape( S_CURVE );
@@ -108,7 +103,7 @@ void D_PAD::AddPrimitiveCurve( const wxPoint& aStart, const wxPoint& aEnd, const
 }
 
 
-void D_PAD::AddPrimitiveCircle( const wxPoint& aCenter, int aRadius, int aThickness )
+void PAD::AddPrimitiveCircle( const wxPoint& aCenter, int aRadius, int aThickness )
 {
     PCB_SHAPE* item = new PCB_SHAPE();
     item->SetShape( S_CIRCLE );
@@ -120,7 +115,7 @@ void D_PAD::AddPrimitiveCircle( const wxPoint& aCenter, int aRadius, int aThickn
 }
 
 
-void D_PAD::AddPrimitiveRect( const wxPoint& aStart, const wxPoint& aEnd, int aThickness )
+void PAD::AddPrimitiveRect( const wxPoint& aStart, const wxPoint& aEnd, int aThickness )
 {
     PCB_SHAPE* item = new PCB_SHAPE();
     item->SetShape( S_RECT );
@@ -132,7 +127,7 @@ void D_PAD::AddPrimitiveRect( const wxPoint& aStart, const wxPoint& aEnd, int aT
 }
 
 
-void D_PAD::ReplacePrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList )
+void PAD::ReplacePrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList )
 {
     // clear old list
     DeletePrimitivesList();
@@ -145,7 +140,7 @@ void D_PAD::ReplacePrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aP
 }
 
 
-void D_PAD::AppendPrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList )
+void PAD::AppendPrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList )
 {
     // Add duplicates of aPrimitivesList to the pad primitives list:
     for( const std::shared_ptr<PCB_SHAPE>& prim : aPrimitivesList )
@@ -155,7 +150,7 @@ void D_PAD::AppendPrimitives( const std::vector<std::shared_ptr<PCB_SHAPE>>& aPr
 }
 
 
-void D_PAD::AddPrimitive( PCB_SHAPE* aPrimitive )
+void PAD::AddPrimitive( PCB_SHAPE* aPrimitive )
 {
     m_editPrimitives.emplace_back( aPrimitive );
 
@@ -164,7 +159,7 @@ void D_PAD::AddPrimitive( PCB_SHAPE* aPrimitive )
 
 
 // clear the basic shapes list and associated data
-void D_PAD::DeletePrimitivesList()
+void PAD::DeletePrimitivesList()
 {
     m_editPrimitives.clear();
 
@@ -172,8 +167,8 @@ void D_PAD::DeletePrimitivesList()
 }
 
 
-void D_PAD::addPadPrimitivesToPolygon( SHAPE_POLY_SET* aMergedPolygon, PCB_LAYER_ID aLayer,
-                                       int aError, ERROR_LOC aErrorLoc ) const
+void PAD::addPadPrimitivesToPolygon( SHAPE_POLY_SET* aMergedPolygon, PCB_LAYER_ID aLayer,
+                                     int aError, ERROR_LOC aErrorLoc ) const
 {
     SHAPE_POLY_SET polyset;
 
@@ -190,7 +185,7 @@ void D_PAD::addPadPrimitivesToPolygon( SHAPE_POLY_SET* aMergedPolygon, PCB_LAYER
     }
 }
 
-void D_PAD::MergePrimitivesAsPolygon( SHAPE_POLY_SET* aMergedPolygon, PCB_LAYER_ID aLayer ) const
+void PAD::MergePrimitivesAsPolygon( SHAPE_POLY_SET* aMergedPolygon, PCB_LAYER_ID aLayer ) const
 {
     BOARD* board = GetBoard();
     int    maxError = board ? board->GetDesignSettings().m_MaxError: ARC_HIGH_DEF;
@@ -219,7 +214,7 @@ void D_PAD::MergePrimitivesAsPolygon( SHAPE_POLY_SET* aMergedPolygon, PCB_LAYER_
 }
 
 
-bool D_PAD::GetBestAnchorPosition( VECTOR2I& aPos )
+bool PAD::GetBestAnchorPosition( VECTOR2I& aPos )
 {
     SHAPE_POLY_SET poly;
     addPadPrimitivesToPolygon( &poly, UNDEFINED_LAYER, ARC_LOW_DEF, ERROR_INSIDE );
diff --git a/pcbnew/pad_naming.cpp b/pcbnew/pad_naming.cpp
index 3577cbc112..d2acf5159e 100644
--- a/pcbnew/pad_naming.cpp
+++ b/pcbnew/pad_naming.cpp
@@ -23,7 +23,7 @@
 
 #include "pad_naming.h"
 
-bool PAD_NAMING::PadCanHaveName( const D_PAD& aPad )
+bool PAD_NAMING::PadCanHaveName( const PAD& aPad )
 {
     // Aperture pads don't get a number
     if( aPad.IsAperturePad() )
diff --git a/pcbnew/pad_naming.h b/pcbnew/pad_naming.h
index cea0e18435..070c921775 100644
--- a/pcbnew/pad_naming.h
+++ b/pcbnew/pad_naming.h
@@ -29,7 +29,7 @@
 
 /**
  * The PAD_NAMING namespace contains helper functions for common operations
- * to do with naming of #D_PAD objects.
+ * to do with naming of #PAD objects.
  */
 namespace PAD_NAMING
 {
@@ -43,7 +43,7 @@ namespace PAD_NAMING
  * @param  aPad the pad to check
  * @return      true if the pad gets a name
  */
-bool PadCanHaveName( const D_PAD& aPad );
+bool PadCanHaveName( const PAD& aPad );
 
 } // namespace PAD_NAMING
 
diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp
index 042556ce43..b24b84c128 100644
--- a/pcbnew/pcb_edit_frame.cpp
+++ b/pcbnew/pcb_edit_frame.cpp
@@ -969,7 +969,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
         GetCanvas()->GetView()->UpdateAllItemsConditionally( KIGFX::REPAINT,
                 [&]( KIGFX::VIEW_ITEM* aItem ) -> bool
                 {
-                    if( D_PAD* pad = dynamic_cast<D_PAD*>( aItem ) )
+                    if( PAD* pad = dynamic_cast<PAD*>( aItem ) )
                     {
                         // Round-corner rects are expensive to draw, but are mostly found on
                         // SMD pads which only need redrawing on an active-to-not-active
diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h
index 72448d6bca..9725d11b3a 100644
--- a/pcbnew/pcb_edit_frame.h
+++ b/pcbnew/pcb_edit_frame.h
@@ -39,7 +39,7 @@ class BOARD_ITEM_CONTAINER;
 class MODULE;
 class TRACK;
 class VIA;
-class D_PAD;
+class PAD;
 class PCB_TARGET;
 class PCB_GROUP;
 class DIMENSION_BASE;
diff --git a/pcbnew/pcb_expr_evaluator.cpp b/pcbnew/pcb_expr_evaluator.cpp
index 30343092e1..4015119228 100644
--- a/pcbnew/pcb_expr_evaluator.cpp
+++ b/pcbnew/pcb_expr_evaluator.cpp
@@ -124,7 +124,7 @@ static void isPlated( LIBEVAL::CONTEXT* aCtx, void* self )
 
     PCB_EXPR_VAR_REF* vref = static_cast<PCB_EXPR_VAR_REF*>( self );
     BOARD_ITEM*       item = vref ? vref->GetObject( aCtx ) : nullptr;
-    D_PAD*            pad = dynamic_cast<D_PAD*>( item );
+    PAD*              pad = dynamic_cast<PAD*>( item );
 
     if( pad && pad->GetAttribute() == PAD_ATTRIB_PTH )
         result->Set( 1.0 );
@@ -230,7 +230,7 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
                 {
                     if( item->Type() == PCB_PAD_T )
                     {
-                        D_PAD*               pad = static_cast<D_PAD*>( item );
+                        PAD*                 pad = static_cast<PAD*>( item );
                         const SHAPE_SEGMENT* holeShape = pad->GetEffectiveHoleShape();
 
                         return zone->Outline()->Collide( holeShape );
diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp
index 853f597e6c..198b682419 100644
--- a/pcbnew/pcb_painter.cpp
+++ b/pcbnew/pcb_painter.cpp
@@ -253,7 +253,7 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
             return color.Brightened( m_selectFactor ).WithAlpha( 0.8 );
 
         // Don't let pads that *should* be NPTHs get lost
-        if( item->Type() == PCB_PAD_T && dyn_cast<const D_PAD*>( item )->PadShouldBeNPTH() )
+        if( item->Type() == PCB_PAD_T && dyn_cast<const PAD*>( item )->PadShouldBeNPTH() )
             aLayer = LAYER_MOD_TEXT_INVISIBLE;
 
         if( item->IsSelected() )
@@ -331,7 +331,7 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
             }
             else if( item->Type() == PCB_PAD_T )
             {
-                isActive = static_cast<const D_PAD*>( item )->IsOnLayer( primary );
+                isActive = static_cast<const PAD*>( item )->IsOnLayer( primary );
             }
             else if( item->Type() == PCB_TRACE_T || item->Type() == PCB_ARC_T )
             {
@@ -382,13 +382,13 @@ int PCB_PAINTER::getLineThickness( int aActualThickness ) const
 }
 
 
-int PCB_PAINTER::getDrillShape( const D_PAD* aPad ) const
+int PCB_PAINTER::getDrillShape( const PAD* aPad ) const
 {
     return aPad->GetDrillShape();
 }
 
 
-VECTOR2D PCB_PAINTER::getDrillSize( const D_PAD* aPad ) const
+VECTOR2D PCB_PAINTER::getDrillSize( const PAD* aPad ) const
 {
     return VECTOR2D( aPad->GetDrillSize() );
 }
@@ -423,7 +423,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
         break;
 
     case PCB_PAD_T:
-        draw( static_cast<const D_PAD*>( item ), aLayer );
+        draw( static_cast<const PAD*>( item ), aLayer );
         break;
 
     case PCB_SHAPE_T:
@@ -770,7 +770,7 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer )
 }
 
 
-void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
+void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
 {
     // Draw description layer
     if( IsNetnameLayer( aLayer ) )
@@ -934,7 +934,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
 
         if( margin.x != margin.y )
         {
-            const_cast<D_PAD*>( aPad )->SetSize( pad_size + margin + margin );
+            const_cast<PAD*>( aPad )->SetSize( pad_size + margin + margin );
             margin.x = margin.y = 0;
         }
 
@@ -943,7 +943,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
         {
             // Reset the stored pad size
             if( aPad->GetSize() != pad_size )
-                const_cast<D_PAD*>( aPad )->SetSize( pad_size );
+                const_cast<PAD*>( aPad )->SetSize( pad_size );
 
             return;
         }
@@ -1054,7 +1054,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
         }
 
         if( aPad->GetSize() != pad_size )
-            const_cast<D_PAD*>( aPad )->SetSize( pad_size );
+            const_cast<PAD*>( aPad )->SetSize( pad_size );
     }
 
     // Clearance outlines
diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h
index b8dcebab7b..eecd320941 100644
--- a/pcbnew/pcb_painter.h
+++ b/pcbnew/pcb_painter.h
@@ -40,7 +40,7 @@ class ARC;
 class BOARD;
 class VIA;
 class TRACK;
-class D_PAD;
+class PAD;
 class PCB_SHAPE;
 class PCB_GROUP;
 class MODULE;
@@ -284,7 +284,7 @@ protected:
     void draw( const TRACK* aTrack, int aLayer );
     void draw( const ARC* aArc, int aLayer );
     void draw( const VIA* aVia, int aLayer );
-    void draw( const D_PAD* aPad, int aLayer );
+    void draw( const PAD* aPad, int aLayer );
     void draw( const PCB_SHAPE* aSegment, int aLayer );
     void draw( const PCB_TEXT* aText, int aLayer );
     void draw( const FP_TEXT* aText, int aLayer );
@@ -307,12 +307,12 @@ protected:
     /**
      * Return drill shape of a pad.
      */
-    virtual int getDrillShape( const D_PAD* aPad ) const;
+    virtual int getDrillShape( const PAD* aPad ) const;
 
     /**
      * Return drill size for a pad (internal units).
      */
-    virtual VECTOR2D getDrillSize( const D_PAD* aPad ) const;
+    virtual VECTOR2D getDrillSize( const PAD* aPad ) const;
 
     /**
      * Return drill diameter for a via (internal units).
diff --git a/pcbnew/pcbnew_printout.cpp b/pcbnew/pcbnew_printout.cpp
index 7a9b3e1df1..f750092a5b 100644
--- a/pcbnew/pcbnew_printout.cpp
+++ b/pcbnew/pcbnew_printout.cpp
@@ -285,13 +285,13 @@ KIGFX::PCB_PRINT_PAINTER::PCB_PRINT_PAINTER( GAL* aGal )
 }
 
 
-int KIGFX::PCB_PRINT_PAINTER::getDrillShape( const D_PAD* aPad ) const
+int KIGFX::PCB_PRINT_PAINTER::getDrillShape( const PAD* aPad ) const
 {
     return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillShape( aPad ) : PAD_DRILL_SHAPE_CIRCLE;
 }
 
 
-VECTOR2D KIGFX::PCB_PRINT_PAINTER::getDrillSize( const D_PAD* aPad ) const
+VECTOR2D KIGFX::PCB_PRINT_PAINTER::getDrillSize( const PAD* aPad ) const
 {
     // TODO should it depend on the pad size?
     return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillSize( aPad ) :
diff --git a/pcbnew/pcbnew_printout.h b/pcbnew/pcbnew_printout.h
index ba91257fd6..3b14a626aa 100644
--- a/pcbnew/pcbnew_printout.h
+++ b/pcbnew/pcbnew_printout.h
@@ -99,9 +99,9 @@ public:
     }
 
 protected:
-    int getDrillShape( const D_PAD* aPad ) const override;
+    int getDrillShape( const PAD* aPad ) const override;
 
-    VECTOR2D getDrillSize( const D_PAD* aPad ) const override;
+    VECTOR2D getDrillSize( const PAD* aPad ) const override;
 
     int getDrillSize( const VIA* aVia ) const override;
 
diff --git a/pcbnew/pcbplot.h b/pcbnew/pcbplot.h
index f97a246414..3bf367b00e 100644
--- a/pcbnew/pcbplot.h
+++ b/pcbnew/pcbplot.h
@@ -39,7 +39,7 @@
 
 class PLOTTER;
 class PCB_TEXT;
-class D_PAD;
+class PAD;
 class PCB_SHAPE;
 class DIMENSION_BASE;
 class MODULE;
@@ -112,7 +112,7 @@ public:
      * and be drawn as a non filled item although the plot mode is filled
      * color and plot mode are needed by this function
      */
-    void PlotPad( D_PAD* aPad, COLOR4D aColor, OUTLINE_MODE aPlotMode );
+    void PlotPad( PAD* aPad, COLOR4D aColor, OUTLINE_MODE aPlotMode );
 
     /**
      * plot items like text and graphics,
diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp
index fba9008f66..6cfac240c2 100644
--- a/pcbnew/plot_board_layers.cpp
+++ b/pcbnew/plot_board_layers.cpp
@@ -231,7 +231,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
     {
         aPlotter->StartBlock( NULL );
 
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             OUTLINE_MODE padPlotMode = plotMode;
 
@@ -335,7 +335,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
             {
                 // inflate/deflate a custom shape is a bit complex.
                 // so build a similar pad shape, and inflate/deflate the polygonal shape
-                D_PAD dummy( *pad );
+                PAD dummy( *pad );
                 SHAPE_POLY_SET shape;
                 pad->MergePrimitivesAsPolygon( &shape, UNDEFINED_LAYER );
                 // Shape polygon can have holes so use InflateWithLinkedHoles(), not Inflate()
@@ -634,7 +634,7 @@ void PlotLayerOutlines( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask,
 
             for( MODULE* module : aBoard->Modules() )
             {
-                for( D_PAD* pad : module->Pads() )
+                for( PAD* pad : module->Pads() )
                 {
                     wxSize hole = pad->GetDrillSize();
 
diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp
index 50abd3f727..bbdceb61c6 100644
--- a/pcbnew/plot_brditems_plotter.cpp
+++ b/pcbnew/plot_brditems_plotter.cpp
@@ -57,9 +57,9 @@
 #include <pcb_shape.h>
 #include <fp_shape.h>
 #include <footprint.h>
-#include <fp_text.h>                          // for FP_TEXT
+#include <fp_text.h>
 #include <track.h>
-#include <pad.h>                        // for D_PAD
+#include <pad.h>
 #include <pcb_target.h>
 #include <pcb_text.h>
 #include <zone.h>
@@ -85,7 +85,7 @@ COLOR4D BRDITEMS_PLOTTER::getColor( LAYER_NUM aLayer )
 }
 
 
-void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, OUTLINE_MODE aPlotMode )
+void BRDITEMS_PLOTTER::PlotPad( PAD* aPad, COLOR4D aColor, OUTLINE_MODE aPlotMode )
 {
     wxPoint shape_pos = aPad->ShapePos();
     GBR_METADATA gbr_metadata;
diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp
index 8f2de6f3b9..f0a460b502 100644
--- a/pcbnew/plugins/altium/altium_pcb.cpp
+++ b/pcbnew/plugins/altium/altium_pcb.cpp
@@ -1699,7 +1699,7 @@ void ALTIUM_PCB::ParsePads6Data( const CFB::CompoundFileReader& aReader,
             module = m_components.at( elem.component );
         }
 
-        D_PAD* pad = new D_PAD( module );
+        PAD* pad = new PAD( module );
         module->Add( pad, ADD_MODE::APPEND );
 
         pad->SetName( elem.name );
@@ -1834,14 +1834,14 @@ void ALTIUM_PCB::ParsePads6Data( const CFB::CompoundFileReader& aReader,
         {
         case ALTIUM_LAYER::TOP_LAYER:
             pad->SetLayer( F_Cu );
-            pad->SetLayerSet( D_PAD::SMDMask() );
+            pad->SetLayerSet( PAD::SMDMask() );
             break;
         case ALTIUM_LAYER::BOTTOM_LAYER:
             pad->SetLayer( B_Cu );
-            pad->SetLayerSet( FlipLayerMask( D_PAD::SMDMask() ) );
+            pad->SetLayerSet( FlipLayerMask( PAD::SMDMask() ) );
             break;
         case ALTIUM_LAYER::MULTI_LAYER:
-            pad->SetLayerSet( elem.plated ? D_PAD::PTHMask() : D_PAD::UnplatedHoleMask() );
+            pad->SetLayerSet( elem.plated ? PAD::PTHMask() : PAD::UnplatedHoleMask() );
             break;
         default:
             PCB_LAYER_ID klayer = GetKicadLayer( elem.layer );
diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp
index c0ccad88f1..067ff27df6 100644
--- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp
+++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp
@@ -703,7 +703,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryPads( const SYMDEF_PCB& aComponent,
 {
     for( std::pair<PAD_ID, COMPONENT_PAD> padPair : aComponent.ComponentPads )
     {
-        D_PAD* pad = getKiCadPad( padPair.second, aModule );
+        PAD* pad = getKiCadPad( padPair.second, aModule );
         aModule->Add( pad,
                 ADD_MODE::INSERT ); // insert so that we get correct behaviour when finding pads
                                     // in the module by PAD_ID - see loadNets()
@@ -711,11 +711,11 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryPads( const SYMDEF_PCB& aComponent,
 }
 
 
-D_PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad, MODULE* aParent )
+PAD* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad( const COMPONENT_PAD& aCadstarPad, MODULE* aParent )
 {
     PADCODE csPadcode = getPadCode( aCadstarPad.PadCodeID );
 
-    D_PAD* pad = new D_PAD( aParent );
+    PAD* pad = new PAD( aParent );
 
     switch( aCadstarPad.Side )
     {
@@ -1226,7 +1226,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadComponents()
                     csPad.Side = padEx.Side;
 
                 //Find the pad in the module definition
-                D_PAD* kiPad = m->Pads().at( padEx.ID - (long) 1 );
+                PAD* kiPad = m->Pads().at( padEx.ID - (long) 1 );
 
                 if( kiPad )
                     delete kiPad;
diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h
index 416db02b92..a716987212 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 COMPONENT_PAD& aCadstarPad, MODULE* aParent );
+    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/eagle/eagle_plugin.cpp b/pcbnew/plugins/eagle/eagle_plugin.cpp
index 70b941f8ac..a301f4ddbe 100644
--- a/pcbnew/plugins/eagle/eagle_plugin.cpp
+++ b/pcbnew/plugins/eagle/eagle_plugin.cpp
@@ -1040,7 +1040,7 @@ void EAGLE_PLUGIN::loadElements( wxXmlNode* aElements )
         m_board->Add( m, ADD_MODE::APPEND );
 
         // update the nets within the pads of the clone
-        for( D_PAD* pad : m->Pads() )
+        for( PAD* pad : m->Pads() )
         {
             wxString pn_key = makeKey( e.name, pad->GetName() );
 
@@ -1671,7 +1671,7 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, wxXmlNode* aTree )
     int shape = EPAD::UNDEF;
     int eagleDrillz = e.drill.ToPcbUnits();
 
-    D_PAD* pad = new D_PAD( aModule );
+    PAD* pad = new PAD( aModule );
     aModule->Add( pad );
     transferPad( e, pad );
 
@@ -1706,7 +1706,7 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, wxXmlNode* aTree )
         case EPAD::OCTAGON:
             // no KiCad octagonal pad shape, use PAD_CIRCLE for now.
             // pad->SetShape( PAD_OCTAGON );
-            wxASSERT( pad->GetShape() == PAD_SHAPE_CIRCLE );    // verify set in D_PAD constructor
+            wxASSERT( pad->GetShape() == PAD_SHAPE_CIRCLE );    // verify set in PAD constructor
             pad->SetShape( PAD_SHAPE_CHAMFERED_RECT );
             pad->SetChamferPositions( RECT_CHAMFER_ALL );
             pad->SetChamferRectRatio( 0.25 );
@@ -2134,7 +2134,7 @@ void EAGLE_PLUGIN::packageHole( MODULE* aModule, wxXmlNode* aTree, bool aCenter
     EHOLE   e( aTree );
 
     // we add a PAD_ATTRIB_NPTH pad to this module.
-    D_PAD* pad = new D_PAD( aModule );
+    PAD* pad = new PAD( aModule );
     aModule->Add( pad );
 
     pad->SetShape( PAD_SHAPE_CIRCLE );
@@ -2176,7 +2176,7 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, wxXmlNode* aTree ) const
     if( !IsCopperLayer( layer ) )
         return;
 
-    D_PAD* pad = new D_PAD( aModule );
+    PAD* pad = new PAD( aModule );
     aModule->Add( pad );
     transferPad( e, pad );
 
@@ -2240,7 +2240,7 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, wxXmlNode* aTree ) const
 }
 
 
-void EAGLE_PLUGIN::transferPad( const EPAD_COMMON& aEaglePad, D_PAD* aPad ) const
+void EAGLE_PLUGIN::transferPad( const EPAD_COMMON& aEaglePad, PAD* aPad ) const
 {
     aPad->SetName( FROM_UTF8( aEaglePad.name.c_str() ) );
 
diff --git a/pcbnew/plugins/eagle/eagle_plugin.h b/pcbnew/plugins/eagle/eagle_plugin.h
index 19b07f3add..46a2f8650c 100644
--- a/pcbnew/plugins/eagle/eagle_plugin.h
+++ b/pcbnew/plugins/eagle/eagle_plugin.h
@@ -34,7 +34,7 @@
 #include <tuple>
 #include <wx/xml/xml.h>
 
-class D_PAD;
+class PAD;
 class FP_TEXT;
 class ZONE;
 
@@ -307,7 +307,7 @@ private:
     void packageSMD( MODULE* aModule, wxXmlNode* aTree ) const;
 
     ///> Handles common pad properties
-    void transferPad( const EPAD_COMMON& aEaglePad, D_PAD* aPad ) const;
+    void transferPad( const EPAD_COMMON& aEaglePad, PAD* aPad ) const;
 
     ///> Deletes the footprint templates list
     void deleteTemplates();
diff --git a/pcbnew/plugins/geda/gpcb_plugin.cpp b/pcbnew/plugins/geda/gpcb_plugin.cpp
index b8bb59e5b4..49f72df0ff 100644
--- a/pcbnew/plugins/geda/gpcb_plugin.cpp
+++ b/pcbnew/plugins/geda/gpcb_plugin.cpp
@@ -539,7 +539,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader )
                                    aLineReader->LineNumber(), 0 );
             }
 
-            D_PAD* pad = new D_PAD( module.get() );
+            PAD* pad = new PAD( module.get() );
 
             static const LSET pad_front( 3, F_Cu, F_Mask, F_Paste );
             static const LSET pad_back(  3, B_Cu, B_Mask, B_Paste );
@@ -627,7 +627,7 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader )
                                    aLineReader->LineNumber(), 0 );
             }
 
-            D_PAD* pad = new D_PAD( module.get() );
+            PAD* pad = new PAD( module.get() );
 
             pad->SetShape( PAD_SHAPE_CIRCLE );
 
diff --git a/pcbnew/plugins/kicad/kicad_plugin.cpp b/pcbnew/plugins/kicad/kicad_plugin.cpp
index 3b4a372c78..8905c7dac2 100644
--- a/pcbnew/plugins/kicad/kicad_plugin.cpp
+++ b/pcbnew/plugins/kicad/kicad_plugin.cpp
@@ -416,7 +416,7 @@ void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const
         break;
 
     case PCB_PAD_T:
-        format( static_cast<D_PAD*>( aItem ), aNestLevel );
+        format( static_cast<PAD*>( aItem ), aNestLevel );
         break;
 
     case PCB_TEXT_T:
@@ -1077,14 +1077,14 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const
     Format( (BOARD_ITEM*) &aModule->Reference(), aNestLevel+1 );
     Format( (BOARD_ITEM*) &aModule->Value(), aNestLevel+1 );
 
-    std::set<D_PAD*, MODULE::cmp_pads> sorted_pads( aModule->Pads().begin(),
-            aModule->Pads().end() );
+    std::set<PAD*, MODULE::cmp_pads> sorted_pads( aModule->Pads().begin(),
+                                                  aModule->Pads().end() );
     std::set<BOARD_ITEM*, MODULE::cmp_drawings> sorted_drawings( aModule->GraphicalItems().begin(),
-            aModule->GraphicalItems().end() );
+                                                                 aModule->GraphicalItems().end() );
     std::set<BOARD_ITEM*, BOARD_ITEM::ptr_cmp> sorted_zones( aModule->Zones().begin(),
-            aModule->Zones().end() );
+                                                             aModule->Zones().end() );
     std::set<BOARD_ITEM*, PCB_GROUP::ptr_cmp> sorted_groups( aModule->Groups().begin(),
-            aModule->Groups().end() );
+                                                             aModule->Groups().end() );
 
     // Save drawing elements.
 
@@ -1092,7 +1092,7 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const
         Format( gr, aNestLevel+1 );
 
     // Save pads.
-    for( D_PAD* pad : sorted_pads )
+    for( PAD* pad : sorted_pads )
         Format( pad, aNestLevel+1 );
 
     // Save zones.
@@ -1229,7 +1229,7 @@ void PCB_IO::formatLayers( LSET aLayerMask, int aNestLevel ) const
 }
 
 
-void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
+void PCB_IO::format( PAD* aPad, int aNestLevel ) const
 {
     const char* shape;
 
diff --git a/pcbnew/plugins/kicad/kicad_plugin.h b/pcbnew/plugins/kicad/kicad_plugin.h
index 49ec6dd217..5ad1d3cad3 100644
--- a/pcbnew/plugins/kicad/kicad_plugin.h
+++ b/pcbnew/plugins/kicad/kicad_plugin.h
@@ -39,7 +39,7 @@ class DIMENSION_BASE;
 class FP_SHAPE;
 class PCB_SHAPE;
 class PCB_TARGET;
-class D_PAD;
+class PAD;
 class FP_TEXT;
 class PCB_GROUP;
 class TRACK;
@@ -270,7 +270,7 @@ private:
 
     void format( MODULE* aModule, int aNestLevel = 0 ) const;
 
-    void format( D_PAD* aPad, int aNestLevel = 0 ) const;
+    void format( PAD* aPad, int aNestLevel = 0 ) const;
 
     void format( PCB_TEXT* aText, int aNestLevel = 0 ) const;
 
diff --git a/pcbnew/plugins/kicad/pcb_parser.cpp b/pcbnew/plugins/kicad/pcb_parser.cpp
index 51cce6b03e..5c8209965b 100644
--- a/pcbnew/plugins/kicad/pcb_parser.cpp
+++ b/pcbnew/plugins/kicad/pcb_parser.cpp
@@ -3041,8 +3041,8 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments )
 
         case T_pad:
         {
-            D_PAD* pad = parseD_PAD( module.get() );
-            pt         = pad->GetPos0();
+            PAD* pad = parsePAD( module.get() );
+            pt       = pad->GetPos0();
 
             RotatePoint( &pt, module->GetOrientation() );
             pad->SetPosition( pt + module->GetPosition() );
@@ -3412,15 +3412,15 @@ FP_SHAPE* PCB_PARSER::parseFP_SHAPE()
 }
 
 
-D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
+PAD* PCB_PARSER::parsePAD( MODULE* aParent )
 {
     wxCHECK_MSG( CurTok() == T_pad, NULL,
-                 wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as D_PAD." ) );
+                 wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as PAD." ) );
 
     wxSize  sz;
     wxPoint pt;
 
-    std::unique_ptr<D_PAD> pad = std::make_unique<D_PAD>( aParent );
+    std::unique_ptr<PAD> pad = std::make_unique<PAD>( aParent );
 
     // File only contains a token if KeepTopBottom is true
     pad->SetKeepTopBottom( false );
@@ -3439,7 +3439,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
     case T_smd:
         pad->SetAttribute( PAD_ATTRIB_SMD );
 
-        // Default D_PAD object is thru hole with drill.
+        // Default PAD object is thru hole with drill.
         // SMD pads have no hole
         pad->SetDrillSize( wxSize( 0, 0 ) );
         break;
@@ -3447,7 +3447,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
     case T_connect:
         pad->SetAttribute( PAD_ATTRIB_CONN );
 
-        // Default D_PAD object is thru hole with drill.
+        // Default PAD object is thru hole with drill.
         // CONN pads have no hole
         pad->SetDrillSize( wxSize( 0, 0 ) );
         break;
@@ -3584,10 +3584,10 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
                     }
                 }
 
-                // This fixes a bug caused by setting the default D_PAD drill size to a value
-                // other than 0 used to fix a bunch of debug assertions even though it is defined
-                // as a through hole pad.  Wouldn't a though hole pad with no drill be a surface
-                // mount pad (or a conn pad which is a smd pad with no solder paste)?
+                // This fixes a bug caused by setting the default PAD drill size to a value other
+                // than 0 used to fix a bunch of debug assertions even though it is defined as a
+                // through hole pad.  Wouldn't a though hole pad with no drill be a surface mount
+                // pad (or a conn pad which is a smd pad with no solder paste)?
                 if( ( pad->GetAttribute() != PAD_ATTRIB_SMD ) && ( pad->GetAttribute() != PAD_ATTRIB_CONN ) )
                     pad->SetDrillSize( drillSize );
                 else
@@ -3787,7 +3787,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
             break;
 
         case T_options:
-            parseD_PAD_option( pad.get() );
+            parsePAD_option( pad.get() );
             break;
 
         case T_primitives:
@@ -3881,7 +3881,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
 }
 
 
-bool PCB_PARSER::parseD_PAD_option( D_PAD* aPad )
+bool PCB_PARSER::parsePAD_option( PAD* aPad )
 {
     // Parse only the (option ...) inside a pad description
     for( T token = NextTok(); token != T_RIGHT; token = NextTok() )
diff --git a/pcbnew/plugins/kicad/pcb_parser.h b/pcbnew/plugins/kicad/pcb_parser.h
index eac41e2a90..24e10d82ff 100644
--- a/pcbnew/plugins/kicad/pcb_parser.h
+++ b/pcbnew/plugins/kicad/pcb_parser.h
@@ -43,7 +43,7 @@ class ARC;
 class BOARD;
 class BOARD_ITEM;
 class BOARD_ITEM_CONTAINER;
-class D_PAD;
+class PAD;
 class BOARD_DESIGN_SETTINGS;
 class DIMENSION_BASE;
 class PCB_SHAPE;
@@ -173,9 +173,9 @@ class PCB_PARSER : public PCB_LEXER
     MODULE*         parseMODULE_unchecked( wxArrayString* aInitialComments = 0 );
     FP_TEXT*        parseFP_TEXT();
     FP_SHAPE*       parseFP_SHAPE();
-    D_PAD*          parseD_PAD( MODULE* aParent = NULL );
+    PAD*            parsePAD( MODULE* aParent = NULL );
     // Parse only the (option ...) inside a pad description
-    bool            parseD_PAD_option( D_PAD* aPad );
+    bool            parsePAD_option( PAD* aPad );
     ARC*            parseARC();
     TRACK*          parseTRACK();
     VIA*            parseVIA();
diff --git a/pcbnew/plugins/legacy/legacy_plugin.cpp b/pcbnew/plugins/legacy/legacy_plugin.cpp
index 4d27b93ebf..50ce12a1b2 100644
--- a/pcbnew/plugins/legacy/legacy_plugin.cpp
+++ b/pcbnew/plugins/legacy/legacy_plugin.cpp
@@ -1398,9 +1398,9 @@ void LEGACY_PLUGIN::loadMODULE( MODULE* aModule )
 
 void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
 {
-    std::unique_ptr<D_PAD> pad = std::make_unique<D_PAD>( aModule );
-    char*           line;
-    char*           saveptr;
+    std::unique_ptr<PAD> pad = std::make_unique<PAD>( aModule );
+    char*                line;
+    char*                saveptr;
 
     while( ( line = READLINE( m_reader ) ) != NULL )
     {
diff --git a/pcbnew/plugins/legacy/legacy_plugin.h b/pcbnew/plugins/legacy/legacy_plugin.h
index 73d8224081..05c165e378 100644
--- a/pcbnew/plugins/legacy/legacy_plugin.h
+++ b/pcbnew/plugins/legacy/legacy_plugin.h
@@ -49,7 +49,7 @@ class NETINFO_ITEM;
 class NETINFO_MAPPING;
 class FP_TEXT;
 class TRACK;
-class D_PAD;
+class PAD;
 struct LP_CACHE;
 
 
diff --git a/pcbnew/plugins/pcad/pcb_pad.cpp b/pcbnew/plugins/pcad/pcb_pad.cpp
index 1b5faf80b7..6d150a84ca 100644
--- a/pcbnew/plugins/pcad/pcb_pad.cpp
+++ b/pcbnew/plugins/pcad/pcb_pad.cpp
@@ -193,7 +193,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
     int             width = 0;
     int             height = 0;
 
-    D_PAD* pad = new D_PAD( aModule );
+    PAD* pad = new PAD( aModule );
 
     if( !m_isHolePlated && m_hole )
     {
diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp
index 2ad5f1e210..47d992f1eb 100644
--- a/pcbnew/router/pns_kicad_iface.cpp
+++ b/pcbnew/router/pns_kicad_iface.cpp
@@ -121,7 +121,7 @@ int PNS_PCBNEW_RULE_RESOLVER::holeRadius( const PNS::ITEM* aItem ) const
 {
     if( aItem->Kind() == PNS::ITEM::SOLID_T )
     {
-        const D_PAD* pad = dynamic_cast<const D_PAD*>( aItem->Parent() );
+        const PAD* pad = dynamic_cast<const PAD*>( aItem->Parent() );
 
         if( pad && pad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
             return pad->GetDrillSize().x / 2;
@@ -763,7 +763,7 @@ PNS_KICAD_IFACE::~PNS_KICAD_IFACE()
 }
 
 
-std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE_BASE::syncPad( D_PAD* aPad )
+std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE_BASE::syncPad( PAD* aPad )
 {
     LAYER_RANGE layers( 0, MAX_CU_LAYERS - 1 );
 
@@ -852,7 +852,7 @@ std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE_BASE::syncPad( D_PAD* aPad )
         // router, otherwise it won't know how to correctly build walkaround 'hulls' for the pad
         // primitives - it can recognize only simple shapes, but not COMPOUNDs made of multiple shapes.
         // The proper way to fix this would be to implement SHAPE_COMPOUND::ConvertToSimplePolygon(),
-        // but the complexity of pad polygonization code (see D_PAD::GetEffectivePolygon), including approximation
+        // but the complexity of pad polygonization code (see PAD::GetEffectivePolygon), including approximation
         // error handling makes me slightly scared to do it right now.
 
         const std::shared_ptr<SHAPE_POLY_SET>& outline = aPad->GetEffectivePolygon();
@@ -1109,7 +1109,7 @@ bool PNS_KICAD_IFACE::IsOnLayer( const PNS::ITEM* aItem, int aLayer ) const
 
         case PCB_PAD_T:
         {
-            const D_PAD* pad = static_cast<const D_PAD*>( aItem->Parent() );
+            const PAD* pad = static_cast<const PAD*>( aItem->Parent() );
 
             return pad->FlashLayer( static_cast<PCB_LAYER_ID>( aLayer ));
         }
@@ -1188,7 +1188,7 @@ void PNS_KICAD_IFACE_BASE::SyncWorld( PNS::NODE *aWorld )
 
     for( MODULE* module : m_board->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( std::unique_ptr<PNS::SOLID> solid = syncPad( pad ) )
                 aWorld->Add( std::move( solid ) );
@@ -1352,7 +1352,7 @@ void PNS_KICAD_IFACE::RemoveItem( PNS::ITEM* aItem )
 
     if ( aItem->OfKind(PNS::ITEM::SOLID_T) )
     {
-        D_PAD*   pad = static_cast<D_PAD*>( parent );
+        PAD*   pad = static_cast<PAD*>( parent );
         VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
 
         m_moduleOffsets[ pad ].p_old = pos;
@@ -1420,7 +1420,7 @@ void PNS_KICAD_IFACE::AddItem( PNS::ITEM* aItem )
 
     case PNS::ITEM::SOLID_T:
     {
-        D_PAD*   pad = static_cast<D_PAD*>( aItem->Parent() );
+        PAD*   pad = static_cast<PAD*>( aItem->Parent() );
         VECTOR2I pos = static_cast<PNS::SOLID*>( aItem )->Pos();
 
         m_moduleOffsets[ pad ].p_new = pos;
diff --git a/pcbnew/router/pns_kicad_iface.h b/pcbnew/router/pns_kicad_iface.h
index 3299001ee9..9f47ad5f30 100644
--- a/pcbnew/router/pns_kicad_iface.h
+++ b/pcbnew/router/pns_kicad_iface.h
@@ -34,7 +34,7 @@ class BOARD_COMMIT;
 class PCB_DISPLAY_OPTIONS;
 class PCB_TOOL_BASE;
 class MODULE;
-class D_PAD;
+class PAD;
 
 namespace PNS
 {
@@ -88,10 +88,10 @@ protected:
     PNS_PCBNEW_RULE_RESOLVER* m_ruleResolver;
     PNS::DEBUG_DECORATOR* m_debugDecorator;
 
-    std::unique_ptr<PNS::SOLID> syncPad( D_PAD* aPad );
+    std::unique_ptr<PNS::SOLID>   syncPad( PAD* aPad );
     std::unique_ptr<PNS::SEGMENT> syncTrack( TRACK* aTrack );
-    std::unique_ptr<PNS::ARC> syncArc( ARC* aArc );
-    std::unique_ptr<PNS::VIA> syncVia( VIA* aVia );
+    std::unique_ptr<PNS::ARC>     syncArc( ARC* aArc );
+    std::unique_ptr<PNS::VIA>     syncVia( VIA* aVia );
     bool syncTextItem( PNS::NODE* aWorld, EDA_TEXT* aText, PCB_LAYER_ID aLayer );
     bool syncGraphicalItem( PNS::NODE* aWorld, PCB_SHAPE* aItem );
     bool syncZone( PNS::NODE* aWorld, ZONE* aZone, SHAPE_POLY_SET* aBoardOutline );
@@ -132,7 +132,7 @@ private:
         VECTOR2I p_old, p_new;
     };
 
-    std::map<D_PAD*, OFFSET>        m_moduleOffsets;
+    std::map<PAD*, OFFSET>          m_moduleOffsets;
     KIGFX::VIEW*                    m_view;
     KIGFX::VIEW_GROUP*              m_previewItems;
     std::unordered_set<BOARD_ITEM*> m_hiddenItems;
diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h
index 80b4e811d8..637241c10a 100644
--- a/pcbnew/router/pns_router.h
+++ b/pcbnew/router/pns_router.h
@@ -247,7 +247,7 @@ private:
     ITEM* pickSingleItem( ITEM_SET& aItems ) const;
     void splitAdjacentSegments( NODE* aNode, ITEM* aSeg, const VECTOR2I& aP );
 
-    ITEM* syncPad( D_PAD* aPad );
+    ITEM* syncPad( PAD* aPad );
     ITEM* syncTrack( TRACK* aTrack );
     ITEM* syncVia( VIA* aVia );
 
diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp
index 5f29d8fcc3..40d64729d0 100644
--- a/pcbnew/router/router_tool.cpp
+++ b/pcbnew/router/router_tool.cpp
@@ -1459,7 +1459,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
     {
         module = static_cast<const MODULE*>(item);
 
-        for( const D_PAD* pad : module->Pads() )
+        for( const PAD* pad : module->Pads() )
         {
             PNS::ITEM* solid = m_router->GetWorld()->FindItemByParent( pad );
 
diff --git a/pcbnew/specctra_import_export/specctra.h b/pcbnew/specctra_import_export/specctra.h
index 3d41b76287..aff678fe4f 100644
--- a/pcbnew/specctra_import_export/specctra.h
+++ b/pcbnew/specctra_import_export/specctra.h
@@ -3774,11 +3774,11 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
      * Function makePADSTACK
      * creates a PADSTACK which matches the given pad.  Only pads which do not
      * satisfy the function isKeepout() should be passed to this function.
-     * @param aBoard The owner of the MODULE.
-     * @param aPad The D_PAD which needs to be made into a PADSTACK.
+     * @param aBoard The owner of the PAD's footprint.
+     * @param aPad The PAD which needs to be made into a PADSTACK.
      * @return PADSTACK* - The created padstack, including its padstack_id.
      */
-    PADSTACK* makePADSTACK( BOARD* aBoard, D_PAD* aPad );
+    PADSTACK* makePADSTACK( BOARD* aBoard, PAD* aPad );
 
     /**
      * Function makeVia
diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp
index 6ba658cce1..06232c91d5 100644
--- a/pcbnew/specctra_import_export/specctra_export.cpp
+++ b/pcbnew/specctra_import_export/specctra_export.cpp
@@ -199,7 +199,7 @@ static POINT mapPt( const wxPoint& pt )
  * decides if the pad is a copper-less through hole which needs to be made into
  * a round keepout.
  */
-static bool isRoundKeepout( D_PAD* aPad )
+static bool isRoundKeepout( PAD* aPad )
 {
     if( aPad->GetShape()==PAD_SHAPE_CIRCLE )
     {
@@ -229,7 +229,7 @@ static PATH* makePath( const POINT& aStart, const POINT& aEnd, const std::string
 }
 
 
-PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
+PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, PAD* aPad )
 {
     char        name[256];                  // padstack name builder
     std::string uniqifier;
@@ -610,7 +610,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
     // from the pads, and make an IMAGE using collated padstacks.
     for( int p=0; p < moduleItems.GetCount(); ++p )
     {
-        D_PAD* pad = (D_PAD*) moduleItems[p];
+        PAD* pad = (PAD*) moduleItems[p];
 
         // see if this pad is a through hole with no copper on its perimeter
         if( isRoundKeepout( pad ) )
diff --git a/pcbnew/swig/board_item.i b/pcbnew/swig/board_item.i
index cfa76d5372..a2cb848e50 100644
--- a/pcbnew/swig/board_item.i
+++ b/pcbnew/swig/board_item.i
@@ -47,19 +47,19 @@
 
 
 %{
-class TEXTE_PCB;
+class PCB_TEXT;
 class ALIGNED_DIMENSION;
 class ORTHOGONAL_DIMENSION;
 class LEADER;
 class CENTER_DIMENSION;
 class MODULE;
 class PCB_GROUP;
-class TEXTE_MODULE;
-class DRAWSEGMENT;
+class FP_TEXT;
+class PCB_SHAPE;
 class MARKER_PCB;
 class BOARD;
-class EDGE_MODULE;
-class D_PAD;
+class FP_SHAPE;
+class PAD;
 class TRACK;
 class VIA;
 class ZONE;
@@ -84,7 +84,7 @@ static PCB_SHAPE*            Cast_to_PCB_SHAPE( BOARD_ITEM* );
 static MARKER_PCB*           Cast_to_MARKER_PCB( BOARD_ITEM* );
 static BOARD*                Cast_to_BOARD( BOARD_ITEM* );
 static FP_SHAPE*             Cast_to_FP_SHAPE( BOARD_ITEM* );
-static D_PAD*                Cast_to_D_PAD( BOARD_ITEM* );
+static PAD*                  Cast_to_PAD( BOARD_ITEM* );
 static TRACK*                Cast_to_TRACK( BOARD_ITEM* );
 static VIA*                  Cast_to_VIA( BOARD_ITEM* );
 static ZONE*                 Cast_to_ZONE( BOARD_ITEM* );
@@ -109,7 +109,7 @@ static PCB_SHAPE*            Cast_to_PCB_SHAPE( BOARD_ITEM* );
 static MARKER_PCB*           Cast_to_MARKER_PCB( BOARD_ITEM* );
 static BOARD*                Cast_to_BOARD( BOARD_ITEM* );
 static FP_SHAPE*             Cast_to_FP_SHAPE( BOARD_ITEM* );
-static D_PAD*                Cast_to_D_PAD( BOARD_ITEM* );
+static PAD*                  Cast_to_PAD( BOARD_ITEM* );
 static TRACK*                Cast_to_TRACK( BOARD_ITEM* );
 static VIA*                  Cast_to_VIA( BOARD_ITEM* );
 static ZONE*                 Cast_to_ZONE( BOARD_ITEM* );
@@ -192,12 +192,12 @@ static LEADER*               Cast_to_LEADER( BOARD_ITEM* self )               {
 static CENTER_DIMENSION*     Cast_to_CENTER_DIMENSION( BOARD_ITEM* self )     { return dynamic_cast<CENTER_DIMENSION*>(self);     }
 static MODULE*               Cast_to_MODULE( BOARD_ITEM* self )               { return dynamic_cast<MODULE*>(self);               }
 static PCB_GROUP*            Cast_to_PCB_GROUP( BOARD_ITEM* self )            { return dynamic_cast<PCB_GROUP*>(self);            }
-static FP_TEXT*              Cast_to_FP_TEXT( BOARD_ITEM* self )              { return dynamic_cast<FP_TEXT *>(self);             }
-static PCB_SHAPE*            Cast_to_PCB_SHAPE( BOARD_ITEM* self )            { return dynamic_cast<PCB_SHAPE *>(self);           }
+static FP_TEXT*              Cast_to_FP_TEXT( BOARD_ITEM* self )              { return dynamic_cast<FP_TEXT*>(self);              }
+static PCB_SHAPE*            Cast_to_PCB_SHAPE( BOARD_ITEM* self )            { return dynamic_cast<PCB_SHAPE*>(self);            }
 static MARKER_PCB*           Cast_to_MARKER_PCB( BOARD_ITEM* self )           { return dynamic_cast<MARKER_PCB*>(self);           }
 static BOARD*                Cast_to_BOARD( BOARD_ITEM* self )                { return dynamic_cast<BOARD*>(self);                }
 static FP_SHAPE*             Cast_to_FP_SHAPE( BOARD_ITEM* self )             { return dynamic_cast<FP_SHAPE *>(self);            }
-static D_PAD*                Cast_to_D_PAD( BOARD_ITEM* self )                { return dynamic_cast<D_PAD*>(self);                }
+static PAD*                  Cast_to_PAD( BOARD_ITEM* self )                  { return dynamic_cast<PAD*>( self);                 }
 static TRACK*                Cast_to_TRACK( BOARD_ITEM* self )                { return dynamic_cast<TRACK*>(self);                }
 static VIA*                  Cast_to_VIA( BOARD_ITEM* self )                  { return dynamic_cast<VIA*>(self);                  }
 static ZONE*                 Cast_to_ZONE( BOARD_ITEM* self )                 { return dynamic_cast<ZONE*>( self);                }
diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp
index 5cd5e29137..f52a7de857 100644
--- a/pcbnew/tools/drawing_tool.cpp
+++ b/pcbnew/tools/drawing_tool.cpp
@@ -2137,7 +2137,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
 
                 if( MODULE* mod = dyn_cast<MODULE*>( item ) )
                 {
-                    for( D_PAD* pad : mod->Pads() )
+                    for( PAD* pad : mod->Pads() )
                     {
                         for( PCB_LAYER_ID layer : pad->GetLayerSet().Seq() )
                         {
@@ -2175,7 +2175,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
 
             for( auto mod : m_board->Modules() )
             {
-                for( D_PAD* pad : mod->Pads() )
+                for( PAD* pad : mod->Pads() )
                 {
                     if( pad->HitTest( position ) && ( pad->GetLayerSet() & lset ).any() )
                         return -1;
diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp
index a7ab2f9177..3907f59753 100644
--- a/pcbnew/tools/edit_tool.cpp
+++ b/pcbnew/tools/edit_tool.cpp
@@ -397,7 +397,7 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference )
 
         if( footprint )
         {
-            for( D_PAD* pad : footprint->Pads() )
+            for( PAD* pad : footprint->Pads() )
                 sel_items.push_back( pad );
         }
     }
@@ -1016,7 +1016,7 @@ static wxPoint mirrorPointX( const wxPoint& aPoint, const wxPoint& aMirrorPoint
 /**
  * Mirror a pad in the vertical axis passing through a point (mirror left to right)
  */
-static void mirrorPadX( D_PAD& aPad, const wxPoint& aMirrorPoint )
+static void mirrorPadX( PAD& aPad, const wxPoint& aMirrorPoint )
 {
     if( aPad.GetShape() == PAD_SHAPE_CUSTOM )
         aPad.FlipPrimitives( true );  // mirror primitives left to right
@@ -1108,7 +1108,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
 
         case PCB_PAD_T:
         {
-            D_PAD* pad = static_cast<D_PAD*>( item );
+            PAD* pad = static_cast<PAD*>( item );
             mirrorPadX( *pad, mirrorPoint );
             break;
         }
@@ -1292,7 +1292,7 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
 
         case PCB_PAD_T:
             {
-                D_PAD*  pad = static_cast<D_PAD*>( item );
+                PAD*    pad = static_cast<PAD*>( item );
                 MODULE* parent = static_cast<MODULE*>( item->GetParent() );
 
                 m_commit->Modify( parent );
@@ -1570,13 +1570,13 @@ int EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent )
             dupe_item = parentFootprint->DuplicateItem( orig_item );
 
             if( increment && item->Type() == PCB_PAD_T
-                    && PAD_NAMING::PadCanHaveName( *static_cast<D_PAD*>( dupe_item ) ) )
+                    && PAD_NAMING::PadCanHaveName( *static_cast<PAD*>( dupe_item ) ) )
             {
                 PAD_TOOL* padTool = m_toolMgr->GetTool<PAD_TOOL>();
                 wxString padName = padTool->GetLastPadName();
                 padName = parentFootprint->GetNextPadName( padName );
                 padTool->SetLastPadName( padName );
-                static_cast<D_PAD*>( dupe_item )->SetName( padName );
+                static_cast<PAD*>( dupe_item )->SetName( padName );
             }
         }
         else if( orig_item->GetParent() && orig_item->GetParent()->Type() == PCB_MODULE_T )
diff --git a/pcbnew/tools/grid_helper.cpp b/pcbnew/tools/grid_helper.cpp
index 0b0d50165f..6942e493d3 100644
--- a/pcbnew/tools/grid_helper.cpp
+++ b/pcbnew/tools/grid_helper.cpp
@@ -401,7 +401,7 @@ void GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos, bo
     bool                          isHighContrast = settings->GetHighContrast();
 
     auto handlePadShape =
-            [&]( D_PAD* aPad )
+            [&]( PAD* aPad )
             {
                 addAnchor( aPad->GetPosition(), CORNER | SNAPPABLE, aPad );
 
@@ -517,7 +517,7 @@ void GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos, bo
         {
             MODULE* mod = static_cast<MODULE*>( aItem );
 
-            for( D_PAD* pad : mod->Pads() )
+            for( PAD* pad : mod->Pads() )
             {
                 // Getting pads from the module requires re-checking that the pad is shown
                 if( ( aFrom || m_magneticSettings->pads == MAGNETIC_OPTIONS::CAPTURE_ALWAYS )
@@ -540,7 +540,7 @@ void GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos, bo
         {
             if( aFrom || m_magneticSettings->pads == MAGNETIC_OPTIONS::CAPTURE_ALWAYS )
             {
-                D_PAD* pad = static_cast<D_PAD*>( aItem );
+                PAD* pad = static_cast<PAD*>( aItem );
                 handlePadShape( pad );
             }
 
diff --git a/pcbnew/tools/pad_tool.cpp b/pcbnew/tools/pad_tool.cpp
index 0be37138b4..40dcd130b9 100644
--- a/pcbnew/tools/pad_tool.cpp
+++ b/pcbnew/tools/pad_tool.cpp
@@ -107,19 +107,19 @@ bool PAD_TOOL::Init()
 
 int PAD_TOOL::pastePadProperties( const TOOL_EVENT& aEvent )
 {
-    auto& selTool = *m_toolMgr->GetTool<SELECTION_TOOL>();
+    auto&       selTool = *m_toolMgr->GetTool<SELECTION_TOOL>();
     const auto& selection = selTool.GetSelection();
-    const D_PAD& masterPad = frame()->GetDesignSettings().m_Pad_Master;
+    const PAD&  masterPad = frame()->GetDesignSettings().m_Pad_Master;
 
     BOARD_COMMIT commit( frame() );
 
     // for every selected pad, paste global settings
-    for( auto item : selection )
+    for( EDA_ITEM* item : selection )
     {
         if( item->Type() == PCB_PAD_T )
         {
             commit.Modify( item );
-            static_cast<D_PAD&>( *item ).ImportSettingsFrom( masterPad );
+            static_cast<PAD&>( *item ).ImportSettingsFrom( masterPad );
         }
     }
 
@@ -137,7 +137,7 @@ int PAD_TOOL::copyPadSettings( const TOOL_EVENT& aEvent )
     auto& selTool = *m_toolMgr->GetTool<SELECTION_TOOL>();
     const auto& selection = selTool.GetSelection();
 
-    D_PAD& masterPad = frame()->GetDesignSettings().m_Pad_Master;
+    PAD& masterPad = frame()->GetDesignSettings().m_Pad_Master;
 
     // can only copy from a single pad
     if( selection.Size() == 1 )
@@ -146,7 +146,7 @@ int PAD_TOOL::copyPadSettings( const TOOL_EVENT& aEvent )
 
         if( item->Type() == PCB_PAD_T )
         {
-            const auto& selPad = static_cast<const D_PAD&>( *item );
+            const PAD& selPad = static_cast<const PAD&>( *item );
             masterPad.ImportSettingsFrom( selPad );
             m_padCopied = true;
         }
@@ -156,7 +156,7 @@ int PAD_TOOL::copyPadSettings( const TOOL_EVENT& aEvent )
 }
 
 
-static void doPushPadProperties( BOARD& board, const D_PAD& aSrcPad, BOARD_COMMIT& commit,
+static void doPushPadProperties( BOARD& board, const PAD& aSrcPad, BOARD_COMMIT& commit,
                                  bool aSameFootprints,
                                  bool aPadShapeFilter,
                                  bool aPadOrientFilter,
@@ -211,10 +211,10 @@ int PAD_TOOL::pushPadSettings( const TOOL_EVENT& aEvent )
 {
     auto&       selTool = *m_toolMgr->GetTool<SELECTION_TOOL>();
     const auto& selection = selTool.GetSelection();
-    D_PAD*      srcPad;
+    PAD*      srcPad;
 
     if( selection.Size() == 1 && selection[0]->Type() == PCB_PAD_T )
-        srcPad = static_cast<D_PAD*>( selection[0] );
+        srcPad = static_cast<PAD*>( selection[0] );
     else
         return 0;
 
@@ -283,7 +283,7 @@ int PAD_TOOL::EnumeratePads( const TOOL_EVENT& aEvent )
 
     KIGFX::VIEW* view = m_toolMgr->GetView();
     VECTOR2I oldCursorPos;  // store the previous mouse cursor position, during mouse drag
-    std::list<D_PAD*> selectedPads;
+    std::list<PAD*> selectedPads;
     BOARD_COMMIT commit( frame() );
     std::map<wxString, std::pair<int, wxString>> oldNames;
     bool isFirstPoint = true;   // used to be sure oldCursorPos will be initialized at least once.
@@ -352,12 +352,12 @@ int PAD_TOOL::EnumeratePads( const TOOL_EVENT& aEvent )
                 collector.Collect( board(), types, testpoint, guide );
 
                 for( int i = 0; i < collector.GetCount(); ++i )
-                    selectedPads.push_back( static_cast<D_PAD*>( collector[i] ) );
+                    selectedPads.push_back( static_cast<PAD*>( collector[i] ) );
             }
 
             selectedPads.unique();
 
-            for( D_PAD* pad : selectedPads )
+            for( PAD* pad : selectedPads )
             {
                 // If pad was not selected, then enumerate it
                 if( !pad->IsSelected() )
@@ -437,7 +437,7 @@ int PAD_TOOL::EnumeratePads( const TOOL_EVENT& aEvent )
         statusPopup.Move( wxGetMousePosition() + wxPoint( 20, 20 ) );
     }
 
-    for( D_PAD* p : board()->GetFirstFootprint()->Pads() )
+    for( PAD* p : board()->GetFirstFootprint()->Pads() )
     {
         p->ClearSelected();
         view->Update( p );
@@ -466,7 +466,7 @@ int PAD_TOOL::PlacePad( const TOOL_EVENT& aEvent )
 
         std::unique_ptr<BOARD_ITEM> CreateItem() override
         {
-            D_PAD* pad = new D_PAD( m_board->GetFirstFootprint() );
+            PAD* pad = new PAD( m_board->GetFirstFootprint() );
 
             pad->ImportSettingsFrom( m_frame->GetDesignSettings().m_Pad_Master );
 
@@ -483,7 +483,7 @@ int PAD_TOOL::PlacePad( const TOOL_EVENT& aEvent )
 
         bool PlaceItem( BOARD_ITEM *aItem, BOARD_COMMIT& aCommit ) override
         {
-            D_PAD* pad = dynamic_cast<D_PAD*>( aItem );
+            PAD* pad = dynamic_cast<PAD*>( aItem );
 
             if( pad )
             {
@@ -517,7 +517,7 @@ int PAD_TOOL::EditPad( const TOOL_EVENT& aEvent )
 
     if( m_editPad != niluuid )
     {
-        D_PAD* pad = dynamic_cast<D_PAD*>( frame()->GetItem( m_editPad ) );
+        PAD* pad = dynamic_cast<PAD*>( frame()->GetItem( m_editPad ) );
 
         if( pad )
             recombinePad( pad );
@@ -526,7 +526,7 @@ int PAD_TOOL::EditPad( const TOOL_EVENT& aEvent )
     }
     else if( selection.Size() == 1 && selection[0]->Type() == PCB_PAD_T )
     {
-        D_PAD*       pad = static_cast<D_PAD*>( selection[0] );
+        PAD*         pad = static_cast<PAD*>( selection[0] );
         PCB_LAYER_ID layer = explodePad( pad );
 
         m_wasHighContrast = ( opts.m_ContrastModeDisplay !=
@@ -564,7 +564,7 @@ int PAD_TOOL::EditPad( const TOOL_EVENT& aEvent )
 }
 
 
-PCB_LAYER_ID PAD_TOOL::explodePad( D_PAD* aPad )
+PCB_LAYER_ID PAD_TOOL::explodePad( PAD* aPad )
 {
     PCB_LAYER_ID layer;
     BOARD_COMMIT commit( frame() );
@@ -611,7 +611,7 @@ PCB_LAYER_ID PAD_TOOL::explodePad( D_PAD* aPad )
 }
 
 
-void PAD_TOOL::recombinePad( D_PAD* aPad )
+void PAD_TOOL::recombinePad( PAD* aPad )
 {
     int  maxError = board()->GetDesignSettings().m_MaxError;
 
diff --git a/pcbnew/tools/pad_tool.h b/pcbnew/tools/pad_tool.h
index 6d3d46f5b2..45aac0593d 100644
--- a/pcbnew/tools/pad_tool.h
+++ b/pcbnew/tools/pad_tool.h
@@ -79,8 +79,8 @@ private:
     ///> Push pad settings from a pad to other pads on board or module
     int pushPadSettings( const TOOL_EVENT& aEvent );
 
-    PCB_LAYER_ID explodePad( D_PAD* aPad );
-    void recombinePad( D_PAD* aPad );
+    PCB_LAYER_ID explodePad( PAD* aPad );
+    void recombinePad( PAD* aPad );
 
 private:
     wxString       m_lastPadName;
diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp
index 5d34add8e8..0c015f9e46 100644
--- a/pcbnew/tools/pcb_editor_control.cpp
+++ b/pcbnew/tools/pcb_editor_control.cpp
@@ -419,7 +419,7 @@ int PCB_EDITOR_CONTROL::RepairBoard( const TOOL_EVENT& aEvent )
 
     for( MODULE* footprint : board()->Modules() )
     {
-        for( D_PAD* pad : footprint->Pads() )
+        for( PAD* pad : footprint->Pads() )
             processItem( pad );
     }
 
@@ -868,7 +868,7 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent )
                 fp->SetParent( board );
 
                 // Pads in the library all have orphaned nets.  Replace with Default.
-                for( D_PAD* pad : fp->Pads() )
+                for( PAD* pad : fp->Pads() )
                     pad->SetNetCode( 0 );
 
                 // Put it on FRONT layer,
diff --git a/pcbnew/tools/pcb_inspection_tool.cpp b/pcbnew/tools/pcb_inspection_tool.cpp
index 8dd0ff1642..06f9080710 100644
--- a/pcbnew/tools/pcb_inspection_tool.cpp
+++ b/pcbnew/tools/pcb_inspection_tool.cpp
@@ -109,7 +109,7 @@ int PCB_INSPECTION_TOOL::ShowStatisticsDialog( const TOOL_EVENT& aEvent )
 }
 
 
-void PCB_INSPECTION_TOOL::reportZoneConnection( ZONE* aZone, D_PAD* aPad, REPORTER* r )
+void PCB_INSPECTION_TOOL::reportZoneConnection( ZONE* aZone, PAD* aPad, REPORTER* r )
 {
     ENUM_MAP<ZONE_CONNECTION> connectionEnum = ENUM_MAP<ZONE_CONNECTION>::Instance();
     wxString                  source;
@@ -264,9 +264,9 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
         layer = a->GetLayer();
     else if( b->Type() == PCB_TRACE_T || b->Type() == PCB_ARC_T )
         layer = b->GetLayer();
-    else if( a->Type() == PCB_PAD_T && static_cast<D_PAD*>( a )->GetAttribute() == PAD_ATTRIB_SMD )
+    else if( a->Type() == PCB_PAD_T && static_cast<PAD*>( a )->GetAttribute() == PAD_ATTRIB_SMD )
     {
-        D_PAD* pad = static_cast<D_PAD*>( a );
+        PAD* pad = static_cast<PAD*>( a );
 
         if( pad->GetAttribute() == PAD_ATTRIB_SMD && pad->IsOnLayer( F_Cu ) )
             layer = F_Cu;
@@ -275,7 +275,7 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
     }
     else if( b->Type() == PCB_PAD_T )
     {
-        D_PAD* pad = static_cast<D_PAD*>( b );
+        PAD* pad = static_cast<PAD*>( b );
 
         if( pad->GetAttribute() == PAD_ATTRIB_SMD && pad->IsOnLayer( F_Cu ) )
             layer = F_Cu;
@@ -342,7 +342,7 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
 
             if( ac->Type() == PCB_ZONE_T && bc->Type() == PCB_PAD_T )
             {
-                reportZoneConnection( static_cast<ZONE*>( ac ), static_cast<D_PAD*>( bc ), r );
+                reportZoneConnection( static_cast<ZONE*>( ac ), static_cast<PAD*>( bc ), r );
             }
             else
             {
@@ -519,7 +519,7 @@ int PCB_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
         r->Flush();
     }
 
-    if( ( item->Type() == PCB_PAD_T && static_cast<D_PAD*>( item )->GetDrillSize().x > 0 )
+    if( ( item->Type() == PCB_PAD_T && static_cast<PAD*>( item )->GetDrillSize().x > 0 )
             || item->Type() == PCB_VIA_T )
     {
         WX_HTML_REPORT_BOX* r = m_inspectConstraintsDialog->AddPage( _( "Hole Size" ) );
@@ -865,7 +865,7 @@ int PCB_INSPECTION_TOOL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
                 // Clear the previous local ratsnest if we click off all items
                 for( MODULE* fp : board->Modules() )
                 {
-                    for( D_PAD* pad : fp->Pads() )
+                    for( PAD* pad : fp->Pads() )
                         pad->SetLocalRatsnestVisible( opt.m_ShowGlobalRatsnest );
                 }
             }
@@ -873,7 +873,7 @@ int PCB_INSPECTION_TOOL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
             {
                 for( EDA_ITEM* item : selection )
                 {
-                    if( D_PAD* pad = dyn_cast<D_PAD*>(item) )
+                    if( PAD* pad = dyn_cast<PAD*>( item) )
                     {
                         pad->SetLocalRatsnestVisible( !pad->GetLocalRatsnestVisible() );
                     }
@@ -883,7 +883,7 @@ int PCB_INSPECTION_TOOL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
                         {
                             bool enable = !fp->Pads()[0]->GetLocalRatsnestVisible();
 
-                            for( D_PAD* childPad : fp->Pads() )
+                            for( PAD* childPad : fp->Pads() )
                                 childPad->SetLocalRatsnestVisible( enable );
                         }
                     }
@@ -902,7 +902,7 @@ int PCB_INSPECTION_TOOL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
             {
                 for( MODULE* fp : board->Modules() )
                 {
-                    for( D_PAD* pad : fp->Pads() )
+                    for( PAD* pad : fp->Pads() )
                         pad->SetLocalRatsnestVisible( opt.m_ShowGlobalRatsnest );
                 }
             }
@@ -974,7 +974,7 @@ void PCB_INSPECTION_TOOL::calculateSelectionRatsnest( const VECTOR2I& aDelta )
 
         if( item->Type() == PCB_MODULE_T )
         {
-            for( D_PAD* pad : static_cast<MODULE*>( item )->Pads() )
+            for( PAD* pad : static_cast<MODULE*>( item )->Pads() )
             {
                 if( pad->GetLocalRatsnestVisible() || displayOptions().m_ShowModuleRatsnest )
                     items.push_back( pad );
diff --git a/pcbnew/tools/pcb_inspection_tool.h b/pcbnew/tools/pcb_inspection_tool.h
index 1988506850..698e121c41 100644
--- a/pcbnew/tools/pcb_inspection_tool.h
+++ b/pcbnew/tools/pcb_inspection_tool.h
@@ -130,7 +130,7 @@ private:
     void onInspectClearanceDialogClosed( wxCommandEvent& aEvent );
     void onInspectConstraintsDialogClosed( wxCommandEvent& aEvent );
 
-    void reportZoneConnection( ZONE* aZone, D_PAD* aPad, REPORTER* r );
+    void reportZoneConnection( ZONE* aZone, PAD* aPad, REPORTER* r );
 
     void reportClearance( DRC_CONSTRAINT_TYPE_T aClearanceType, PCB_LAYER_ID aLayer,
                           BOARD_ITEM* aA, BOARD_ITEM* aB, REPORTER* r );
diff --git a/pcbnew/tools/pcb_viewer_tools.cpp b/pcbnew/tools/pcb_viewer_tools.cpp
index 7e47826f2f..02c76c25ce 100644
--- a/pcbnew/tools/pcb_viewer_tools.cpp
+++ b/pcbnew/tools/pcb_viewer_tools.cpp
@@ -100,7 +100,7 @@ int PCB_VIEWER_TOOLS::ShowPadNumbers( const TOOL_EVENT& aEvent )
 
     for( MODULE* fp : board()->Modules() )
     {
-        for( D_PAD* pad : fp->Pads() )
+        for( PAD* pad : fp->Pads() )
             view()->Update( pad, KIGFX::GEOMETRY );
     }
 
@@ -119,7 +119,7 @@ int PCB_VIEWER_TOOLS::PadDisplayMode( const TOOL_EVENT& aEvent )
 
     for( MODULE* fp : board()->Modules() )
     {
-        for( D_PAD* pad : fp->Pads() )
+        for( PAD* pad : fp->Pads() )
             view()->Update( pad, KIGFX::GEOMETRY );
     }
 
diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp
index 88601e2c89..f56ffae4f5 100644
--- a/pcbnew/tools/pcbnew_control.cpp
+++ b/pcbnew/tools/pcbnew_control.cpp
@@ -546,7 +546,7 @@ void pasteFootprintItemsToFootprintEditor( MODULE* aClipFootprint, BOARD* aBoard
 
     aClipFootprint->SetParent( aBoard );
 
-    for( D_PAD* pad : aClipFootprint->Pads() )
+    for( PAD* pad : aClipFootprint->Pads() )
     {
         pad->SetParent( editorFootprint );
         aPastedItems.push_back( pad );
diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp
index eceb913190..96ae9560fd 100644
--- a/pcbnew/tools/point_editor.cpp
+++ b/pcbnew/tools/point_editor.cpp
@@ -199,9 +199,9 @@ public:
 
         case PCB_PAD_T:
         {
-            const D_PAD* pad = static_cast<const D_PAD*>( aItem );
-            wxPoint      shapePos = pad->ShapePos();
-            wxPoint      halfSize( pad->GetSize().x / 2, pad->GetSize().y / 2 );
+            const PAD* pad = static_cast<const PAD*>( aItem );
+            wxPoint    shapePos = pad->ShapePos();
+            wxPoint    halfSize( pad->GetSize().x / 2, pad->GetSize().y / 2 );
 
             if( pad->GetParent() &&
                     ( pad->GetParent()->IsLocked() || pad->GetParent()->PadsLocked() ) )
@@ -1186,7 +1186,7 @@ void POINT_EDITOR::updateItem() const
 
     case PCB_PAD_T:
     {
-        D_PAD* pad = static_cast<D_PAD*>( item );
+        PAD* pad = static_cast<PAD*>( item );
 
         switch( pad->GetShape() )
         {
@@ -1594,10 +1594,10 @@ void POINT_EDITOR::updatePoints()
 
     case PCB_PAD_T:
     {
-        const D_PAD* pad = static_cast<const D_PAD*>( item );
-        bool         locked = pad->GetParent() && pad->GetParent()->PadsLocked();
-        wxPoint      shapePos = pad->ShapePos();
-        wxPoint      halfSize( pad->GetSize().x / 2, pad->GetSize().y / 2 );
+        const PAD* pad = static_cast<const PAD*>( item );
+        bool       locked = pad->GetParent() && pad->GetParent()->PadsLocked();
+        wxPoint    shapePos = pad->ShapePos();
+        wxPoint    halfSize( pad->GetSize().x / 2, pad->GetSize().y / 2 );
 
         switch( pad->GetShape() )
         {
diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp
index bbe8a7d8ab..0b4c0d28ae 100644
--- a/pcbnew/tools/selection_tool.cpp
+++ b/pcbnew/tools/selection_tool.cpp
@@ -1014,7 +1014,7 @@ void SELECTION_TOOL::selectConnectedTracks( BOARD_CONNECTED_ITEM& aStartItem,
 
     std::map<wxPoint, std::vector<TRACK*>> trackMap;
     std::map<wxPoint, VIA*>                viaMap;
-    std::map<wxPoint, D_PAD*>              padMap;
+    std::map<wxPoint, PAD*>                padMap;
 
     // Build maps of connected items
     for( BOARD_CONNECTED_ITEM* item : connectedItems )
@@ -1039,7 +1039,7 @@ void SELECTION_TOOL::selectConnectedTracks( BOARD_CONNECTED_ITEM& aStartItem,
 
         case PCB_PAD_T:
         {
-            D_PAD* pad = static_cast<D_PAD*>( item );
+            PAD* pad = static_cast<PAD*>( item );
             padMap[ pad->GetPosition() ] = pad;
         }
             break;
@@ -1188,11 +1188,12 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
     }
 
     //Generate a list of all pads, and of all nets they belong to.
-    std::list<int> netcodeList;
-    std::list<D_PAD*> padList;
+    std::list<int>  netcodeList;
+    std::list<PAD*> padList;
+
     for( MODULE* mmod : modList )
     {
-        for( D_PAD* pad : mmod->Pads() )
+        for( PAD* pad : mmod->Pads() )
         {
             if( pad->IsConnected() )
             {
@@ -1208,7 +1209,7 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
     // auto select trivial connections segments which are launched from the pads
     std::list<TRACK*> launchTracks;
 
-    for( D_PAD* pad : padList )
+    for( PAD* pad : padList )
         selectConnectedTracks( *pad, STOP_NEVER );
 
     // now we need to find all footprints that are connected to each of these nets
@@ -1901,7 +1902,7 @@ bool SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOn
                 return true;
         }
 
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( Selectable( pad, true ) )
                 return true;
@@ -1951,7 +1952,7 @@ bool SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOn
 
         if( aItem->Type() == PCB_PAD_T )
         {
-            auto pad = static_cast<const D_PAD*>( aItem );
+            const PAD* pad = static_cast<const PAD*>( aItem );
 
             // Check render mode (from the Items tab) first
             switch( pad->GetAttribute() )
@@ -2427,7 +2428,7 @@ void SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector,
     {
         for( int i = 0; i < aCollector.GetCount(); ++i )
         {
-            if( D_PAD* pad = dyn_cast<D_PAD*>( aCollector[i] ) )
+            if( PAD* pad = dyn_cast<PAD*>( aCollector[i] ) )
             {
                 MODULE* parent = pad->GetParent();
                 double ratio = calcRatio( calcArea( pad ), calcArea( parent ) );
diff --git a/pcbnew/track.h b/pcbnew/track.h
index 4c9949ba35..be58d1a7d2 100644
--- a/pcbnew/track.h
+++ b/pcbnew/track.h
@@ -51,7 +51,7 @@
 
 class TRACK;
 class VIA;
-class D_PAD;
+class PAD;
 class MSG_PANEL_ITEM;
 class SHAPE_POLY_SET;
 
diff --git a/pcbnew/tracks_cleaner.cpp b/pcbnew/tracks_cleaner.cpp
index a47abe9a3d..7159d63a33 100644
--- a/pcbnew/tracks_cleaner.cpp
+++ b/pcbnew/tracks_cleaner.cpp
@@ -85,7 +85,7 @@ void TRACKS_CLEANER::removeShortingTrackSegments()
 
     for( TRACK* segment : m_brd->Tracks() )
     {
-        for( D_PAD* testedPad : connectivity->GetConnectedPads( segment ) )
+        for( PAD* testedPad : connectivity->GetConnectedPads( segment ) )
         {
             if( segment->GetNetCode() != testedPad->GetNetCode() )
             {
@@ -225,7 +225,7 @@ void TRACKS_CLEANER::deleteTracksInPads()
             continue;
 
         // Mark track if connected to pads
-        for( D_PAD* pad : connectivity->GetConnectedPads( track ) )
+        for( PAD* pad : connectivity->GetConnectedPads( track ) )
         {
             if( pad->HitTest( track->GetStart() ) && pad->HitTest( track->GetEnd() ) )
             {
@@ -310,7 +310,7 @@ void TRACKS_CLEANER::cleanup( bool aDeleteDuplicateVias, bool aDeleteNullSegment
 
             // To delete through Via on THT pads at same location
             // Examine the list of connected pads: if a through pad is found, the via is redundant
-            for( D_PAD* pad : m_brd->GetConnectivity()->GetConnectedPads( via ) )
+            for( PAD* pad : m_brd->GetConnectivity()->GetConnectedPads( via ) )
             {
                 const LSET all_cu = LSET::AllCuMask();
 
diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp
index ba4b620cea..c5921ac8c1 100644
--- a/pcbnew/zone.cpp
+++ b/pcbnew/zone.cpp
@@ -325,7 +325,7 @@ const EDA_RECT ZONE::GetBoundingBox() const
 }
 
 
-int ZONE::GetThermalReliefGap( D_PAD* aPad, wxString* aSource ) const
+int ZONE::GetThermalReliefGap( PAD* aPad, wxString* aSource ) const
 {
     if( aPad->GetEffectiveThermalGap() == 0 )
     {
@@ -340,7 +340,7 @@ int ZONE::GetThermalReliefGap( D_PAD* aPad, wxString* aSource ) const
 }
 
 
-int ZONE::GetThermalReliefSpokeWidth( D_PAD* aPad, wxString* aSource ) const
+int ZONE::GetThermalReliefSpokeWidth( PAD* aPad, wxString* aSource ) const
 {
     if( aPad->GetEffectiveThermalSpokeWidth() == 0 )
     {
@@ -765,7 +765,7 @@ void ZONE::Mirror( const wxPoint& aMirrorRef, bool aMirrorLeftRight )
 }
 
 
-ZONE_CONNECTION ZONE::GetPadConnection( D_PAD* aPad, wxString* aSource ) const
+ZONE_CONNECTION ZONE::GetPadConnection( PAD* aPad, wxString* aSource ) const
 {
     if( aPad == NULL || aPad->GetEffectiveZoneConnection() == ZONE_CONNECTION::INHERITED )
     {
diff --git a/pcbnew/zone.h b/pcbnew/zone.h
index 7c0ba8ce36..972134bb80 100644
--- a/pcbnew/zone.h
+++ b/pcbnew/zone.h
@@ -165,7 +165,7 @@ public:
         m_thermalReliefGap = aThermalReliefGap;
     }
     int GetThermalReliefGap() const { return m_thermalReliefGap; }
-    int GetThermalReliefGap( D_PAD* aPad, wxString* aSource = nullptr ) const;
+    int GetThermalReliefGap( PAD* aPad, wxString* aSource = nullptr ) const;
 
     void SetThermalReliefSpokeWidth( int aThermalReliefSpokeWidth )
     {
@@ -175,7 +175,7 @@ public:
         m_thermalReliefSpokeWidth = aThermalReliefSpokeWidth;
     }
     int GetThermalReliefSpokeWidth() const { return m_thermalReliefSpokeWidth; }
-    int GetThermalReliefSpokeWidth( D_PAD* aPad, wxString* aSource = nullptr ) const;
+    int GetThermalReliefSpokeWidth( PAD* aPad, wxString* aSource = nullptr ) const;
 
     /**
      * Compute the area currently occupied by the zone fill.
@@ -212,7 +212,7 @@ public:
     bool NeedRefill() const { return m_needRefill; }
     void SetNeedRefill( bool aNeedRefill ) { m_needRefill = aNeedRefill; }
 
-    ZONE_CONNECTION GetPadConnection( D_PAD* aPad, wxString* aSource = nullptr ) const;
+    ZONE_CONNECTION GetPadConnection( PAD* aPad, wxString* aSource = nullptr ) const;
     ZONE_CONNECTION GetPadConnection() const { return m_PadConnection; }
     void SetPadConnection( ZONE_CONNECTION aPadConnection ) { m_PadConnection = aPadConnection; }
 
diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp
index 75a72aab9a..63a13ffa6a 100644
--- a/pcbnew/zone_filler.cpp
+++ b/pcbnew/zone_filler.cpp
@@ -121,7 +121,7 @@ bool ZONE_FILLER::Fill( std::vector<ZONE*>& aZones, bool aCheck, wxWindow* aPare
 
     for( MODULE* module : m_board->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( pad->IsDirty() )
                 pad->BuildEffectiveShapes( UNDEFINED_LAYER );
@@ -502,7 +502,7 @@ bool ZONE_FILLER::Fill( std::vector<ZONE*>& aZones, bool aCheck, wxWindow* aPare
 /**
  * Return true if the given pad has a thermal connection with the given zone.
  */
-bool hasThermalConnection( D_PAD* pad, const ZONE* aZone )
+bool hasThermalConnection( PAD* pad, const ZONE* aZone )
 {
     // Rejects non-standard pads with tht-only thermal reliefs
     if( aZone->GetPadConnection( pad ) == ZONE_CONNECTION::THT_THERMAL
@@ -532,7 +532,7 @@ bool hasThermalConnection( D_PAD* pad, const ZONE* aZone )
  * Add a knockout for a pad.  The knockout is 'aGap' larger than the pad (which might be
  * either the thermal clearance or the electrical clearance).
  */
-void ZONE_FILLER::addKnockout( D_PAD* aPad, PCB_LAYER_ID aLayer, int aGap, SHAPE_POLY_SET& aHoles )
+void ZONE_FILLER::addKnockout( PAD* aPad, PCB_LAYER_ID aLayer, int aGap, SHAPE_POLY_SET& aHoles )
 {
     if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
     {
@@ -617,7 +617,7 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
 
     for( MODULE* module : m_board->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( !hasThermalConnection( pad, aZone ) )
                 continue;
@@ -692,7 +692,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
     // Add non-connected pad clearances
     //
     auto knockoutPadClearance =
-            [&]( D_PAD* aPad )
+            [&]( PAD* aPad )
             {
                 if( aPad->GetBoundingBox().Intersects( zone_boundingbox ) )
                 {
@@ -731,7 +731,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
 
     for( MODULE* module : m_board->Modules() )
     {
-        for( D_PAD* pad : module->Pads() )
+        for( PAD* pad : module->Pads() )
         {
             if( checkForCancel( m_progressReporter ) )
                 return;
@@ -1290,7 +1290,7 @@ void ZONE_FILLER::buildThermalSpokes( const ZONE* aZone, PCB_LAYER_ID aLayer,
             // We have to use a dummy pad to avoid dirtying the cached shapes
             wxPoint shapePos = pad->ShapePos();
             double  padAngle = pad->GetOrientation();
-            D_PAD   dummy_pad( *pad );
+            PAD     dummy_pad( *pad );
             dummy_pad.SetOrientation( 0.0 );
             dummy_pad.SetPosition( { 0, 0 } );
 
@@ -1532,7 +1532,7 @@ bool ZONE_FILLER::addHatchFillTypeOnZone( const ZONE* aZone, PCB_LAYER_ID aLayer
 
         for( MODULE* module : m_board->Modules() )
         {
-            for( D_PAD* pad : module->Pads() )
+            for( PAD* pad : module->Pads() )
             {
                 if( pad->GetNetCode() == aZone->GetNetCode()
                     && pad->IsOnLayer( aLayer )
diff --git a/pcbnew/zone_filler.h b/pcbnew/zone_filler.h
index 4a0f892974..80dd840d5c 100644
--- a/pcbnew/zone_filler.h
+++ b/pcbnew/zone_filler.h
@@ -50,7 +50,7 @@ public:
 
 private:
 
-    void addKnockout( D_PAD* aPad, PCB_LAYER_ID aLayer, int aGap, SHAPE_POLY_SET& aHoles );
+    void addKnockout( PAD* aPad, PCB_LAYER_ID aLayer, int aGap, SHAPE_POLY_SET& aHoles );
 
     void addKnockout( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer, int aGap, bool aIgnoreLineWidth,
                       SHAPE_POLY_SET& aHoles );
diff --git a/qa/pcbnew/test_array_pad_name_provider.cpp b/qa/pcbnew/test_array_pad_name_provider.cpp
index 18a521fa13..3863fb2a15 100644
--- a/qa/pcbnew/test_array_pad_name_provider.cpp
+++ b/qa/pcbnew/test_array_pad_name_provider.cpp
@@ -44,7 +44,7 @@ static std::unique_ptr<MODULE> ModuleWithPads( const std::vector<wxString> aName
 
     for( const auto& name : aNames )
     {
-        auto pad = std::make_unique<D_PAD>( module.get() );
+        std::unique_ptr<PAD> pad = std::make_unique<PAD>( module.get() );
 
         pad->SetName( name );
 
diff --git a/qa/pcbnew/test_pad_naming.cpp b/qa/pcbnew/test_pad_naming.cpp
index 5646b6ef16..c4eeda2050 100644
--- a/qa/pcbnew/test_pad_naming.cpp
+++ b/qa/pcbnew/test_pad_naming.cpp
@@ -33,32 +33,32 @@ struct PAD_FIXTURE
     {
     }
 
-    D_PAD MakeNPTH()
+    PAD MakeNPTH()
     {
-        D_PAD pad( &m_module );
+        PAD pad( &m_module );
 
         pad.SetAttribute( PAD_ATTRIB_NPTH );
-        pad.SetLayerSet( D_PAD::UnplatedHoleMask() );
+        pad.SetLayerSet( PAD::UnplatedHoleMask() );
 
         return pad;
     }
 
-    D_PAD MakeAperture()
+    PAD MakeAperture()
     {
-        D_PAD pad( &m_module );
+        PAD pad( &m_module );
 
         pad.SetAttribute( PAD_ATTRIB_PTH );
-        pad.SetLayerSet( D_PAD::ApertureMask() );
+        pad.SetLayerSet( PAD::ApertureMask() );
 
         return pad;
     }
 
-    D_PAD MakeSmd()
+    PAD MakeSmd()
     {
-        D_PAD pad( &m_module );
+        PAD pad( &m_module );
 
         pad.SetAttribute( PAD_ATTRIB_SMD );
-        pad.SetLayerSet( D_PAD::SMDMask() );
+        pad.SetLayerSet( PAD::SMDMask() );
 
         return pad;
     }