7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-14 15:59:36 +00:00

D_PAD -> PAD.

This commit is contained in:
Jeff Young 2020-11-12 22:30:02 +00:00
parent f0d0e17aab
commit f5443de7f9
129 changed files with 658 additions and 666 deletions
3d-viewer
common
include
pcbnew
array_creator.cpp
autorouter
board.cppboard.hboard_connected_item.hboard_items_to_polygon_shape_transform.cppcollectors.cppcollectors.h
connectivity
convert_drawsegment_list_to_polygon.cppcross-probing.cpp
dialogs
drc
edit.cpp
exporters
files.cppfootprint.cppfootprint.hfootprint_editor_utils.cppkicad_clipboard.cpp
microwave
netinfo.hnetinfo_item.cppnetinfo_list.cpp
netlist_reader
pad.cpppad.hpad_custom_shape_functions.cpppad_naming.cpppad_naming.hpcb_edit_frame.cpppcb_edit_frame.hpcb_expr_evaluator.cpppcb_painter.cpppcb_painter.hpcbnew_printout.cpppcbnew_printout.hpcbplot.hplot_board_layers.cppplot_brditems_plotter.cpp
plugins
router
specctra_import_export
swig
tools
track.htracks_cleaner.cppzone.cppzone.hzone_filler.cppzone_filler.h
qa/pcbnew

View File

@ -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;

View File

@ -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 )
{

View File

@ -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;

View File

@ -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
{

View File

@ -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 )
{

View File

@ -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;

View File

@ -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,

View File

@ -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 );

View File

@ -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.

View File

@ -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.
*/

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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[]

View File

@ -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 ) )
{

View File

@ -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() )
{

View File

@ -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;

View File

@ -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();

View File

@ -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

View File

@ -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 );
}

View File

@ -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.

View File

@ -32,7 +32,7 @@
class NETCLASS;
class TRACK;
class D_PAD;
class PAD;
/**
* BOARD_CONNECTED_ITEM

View File

@ -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();

View File

@ -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

View File

@ -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[];

Some files were not shown because too many files have changed in this diff Show More