KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pad_utils.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include "pad_utils.h"
21
22#include <algorithm>
23
24#include <wx/debug.h>
25#include <wx/intl.h>
26
28#include <footprint.h>
30#include <math/util.h>
31#include <pad.h>
32#include <padstack.h>
33#include <pcb_shape.h>
34#include <units_provider.h>
35
36
38{
39 const double defaultProportion = 0.25;
40 const double minimumSizeIU = pcbIUScale.mmToIU( 0.25 );
41
42 const VECTOR2I& size = aPad.GetSize( aLayer );
43 const int padMinSizeIU = std::min( size.x, size.y );
44 const double defaultRadiusIU = std::min( minimumSizeIU, padMinSizeIU * defaultProportion );
45
46 // Convert back to a ratio
47 return defaultRadiusIU / padMinSizeIU;
48}
49
50
52{
53 const PAD_SHAPE shape = aPad.GetShape( aLayer );
54 return shape == PAD_SHAPE::ROUNDRECT || shape == PAD_SHAPE::CHAMFERED_RECT;
55}
56
57
59{
60 aPadstack.Drill() = {};
61 aPadstack.SecondaryDrill() = {};
62 aPadstack.TertiaryDrill() = {};
63 aPadstack.FrontPostMachining() = {};
64 aPadstack.BackPostMachining() = {};
65}
66
67
69{
70 switch( aAttrib )
71 {
72 case PAD_ATTRIB::PTH: return _( "Through-hole" );
73 case PAD_ATTRIB::SMD: return _( "SMD" );
74 case PAD_ATTRIB::NPTH: return _( "NPTH" );
75 case PAD_ATTRIB::CONN: return _( "Connector" );
76 case PAD_ATTRIB::NON_COMPONENT: return _( "Non-component" );
77 }
78
79 wxFAIL_MSG( wxT( "Invalid pad attribute" ) );
80 return _( "Unknown" );
81}
82
83
84namespace
85{
86
87void checkPadLayer( const PAD& aPad, PCB_LAYER_ID aLayer, const UNITS_PROVIDER& aUnitsProvider, bool aForPadProperties,
88 const PAD_UTILS::PAD_CHECK_HANDLER& aErrorHandler )
89{
90 VECTOR2I pad_size = aPad.GetSize( aLayer );
91
92 if( aPad.GetShape( aLayer ) == PAD_SHAPE::CUSTOM )
93 pad_size = aPad.GetBoundingBox().GetSize();
94 else if( pad_size.x <= 0 || ( pad_size.y <= 0 && aPad.GetShape( aLayer ) != PAD_SHAPE::CIRCLE ) )
95 aErrorHandler( { PAD_UTILS::PAD_CHECK_CODE::PAD_SIZE_NOT_POSITIVE, _( "Pad must have a positive size" ) } );
96
97 // Test hole against pad shape
98 if( aPad.IsOnCopperLayer() && aPad.GetDrillSize().x > 0 )
99 {
100 // Ensure the drill size can be handled in next calculations.
101 // Use min size = 4 IU to be able to build a polygon from a hole shape
102 const int min_drill_size = 4;
103
104 if( aPad.GetDrillSize().x <= min_drill_size || aPad.GetDrillSize().y <= min_drill_size )
105 {
107 wxString::Format( _( "PTH pad hole size must be larger than %s" ),
108 aUnitsProvider.StringFromValue( min_drill_size, true ) ) } );
109 }
110
111 SHAPE_POLY_SET padOutline;
112
113 aPad.TransformShapeToPolygon( padOutline, aLayer, 0, aPad.GetMaxError(), ERROR_INSIDE );
114
115 if( aPad.GetAttribute() == PAD_ATTRIB::PTH )
116 {
117 // Test if there is copper area outside hole
118 std::shared_ptr<SHAPE_SEGMENT> hole = aPad.GetEffectiveHoleShape();
119 SHAPE_POLY_SET holeOutline;
120
121 TransformOvalToPolygon( holeOutline, hole->GetSeg().A, hole->GetSeg().B, hole->GetWidth(),
122 aPad.GetMaxError(), ERROR_OUTSIDE );
123
124 SHAPE_POLY_SET copper = padOutline;
125 copper.BooleanSubtract( holeOutline );
126
127 if( copper.IsEmpty() )
128 {
130 _( "PTH pad hole leaves no copper" ) } );
131 }
132 else if( aForPadProperties )
133 {
134 // Test if the pad hole is fully inside the copper area. Note that we only run
135 // this check for pad properties because we run the more complete annular ring
136 // checker on the board (which handles multiple pads with the same name).
137 holeOutline.BooleanSubtract( padOutline );
138
139 if( !holeOutline.IsEmpty() )
140 {
142 _( "PTH pad hole not fully inside copper" ) } );
143 }
144 }
145 }
146 else
147 {
148 // Test only if the pad hole's centre is inside the copper area
149 if( !padOutline.Collide( aPad.GetPosition() ) )
150 {
152 _( "pad hole not inside pad shape" ) } );
153 }
154 }
155 }
156
157 if( aPad.GetLocalClearance().value_or( 0 ) < 0 )
158 {
160 _( "negative local clearance values have no effect" ) } );
161 }
162
163 // Some pads need a negative solder mask clearance (mainly for BGA with small pads)
164 // However the negative solder mask clearance must not create negative mask size
165 // Therefore test for minimal acceptable negative value
166 std::optional<int> solderMaskMargin = aPad.GetLocalSolderMaskMargin();
167
168 if( solderMaskMargin.has_value() && solderMaskMargin.value() < 0 )
169 {
170 int absMargin = abs( solderMaskMargin.value() );
171
172 if( aPad.GetShape( aLayer ) == PAD_SHAPE::CUSTOM )
173 {
174 for( const std::shared_ptr<PCB_SHAPE>& shape : aPad.GetPrimitives( aLayer ) )
175 {
176 BOX2I shapeBBox = shape->GetBoundingBox();
177
178 if( absMargin > shapeBBox.GetWidth() || absMargin > shapeBBox.GetHeight() )
179 {
181 _( "negative solder mask clearance is larger than some shape primitives; "
182 "results may be surprising" ) } );
183
184 break;
185 }
186 }
187 }
188 else if( absMargin > pad_size.x || absMargin > pad_size.y )
189 {
191 _( "negative solder mask clearance is larger than pad; no solder mask will "
192 "be generated" ) } );
193 }
194 }
195
196 // Some pads need a positive solder paste clearance (mainly for BGA with small pads)
197 // However, a positive value can create issues if the resulting shape is too big.
198 // (like a solder paste creating a solder paste area on a neighbor pad or on the solder mask)
199 // So we could ask for user to confirm the choice
200 // For now we just check for disappearing paste
201 wxSize paste_size;
202 int paste_margin = aPad.GetLocalSolderPasteMargin().value_or( 0 );
203 auto mratio = aPad.GetLocalSolderPasteMarginRatio();
204
205 paste_size.x = pad_size.x + paste_margin + KiROUND( pad_size.x * mratio.value_or( 0 ) );
206 paste_size.y = pad_size.y + paste_margin + KiROUND( pad_size.y * mratio.value_or( 0 ) );
207
208 if( paste_size.x <= 0 || paste_size.y <= 0 )
209 {
211 _( "negative solder paste margin is larger than pad; no solder paste mask will "
212 "be generated" ) } );
213 }
214
215 if( aPad.GetShape( aLayer ) == PAD_SHAPE::ROUNDRECT )
216 {
217 if( aPad.GetRoundRectRadiusRatio( aLayer ) < 0.0 )
218 {
220 _( "negative corner radius is not allowed" ) } );
221 }
222 else if( aPad.GetRoundRectRadiusRatio( aLayer ) > 50.0 )
223 {
225 _( "corner size will make pad circular" ) } );
226 }
227 }
228 else if( aPad.GetShape( aLayer ) == PAD_SHAPE::CHAMFERED_RECT )
229 {
230 if( aPad.GetChamferRectRatio( aLayer ) < 0.0 )
231 {
233 _( "negative corner chamfer is not allowed" ) } );
234 }
235 else if( aPad.GetChamferRectRatio( aLayer ) > 50.0 )
236 {
238 _( "corner chamfer is too large" ) } );
239 }
240 }
241 else if( aPad.GetShape( aLayer ) == PAD_SHAPE::TRAPEZOID )
242 {
243 if( ( aPad.GetDelta( aLayer ).x < 0 && aPad.GetDelta( aLayer ).x < -aPad.GetSize( aLayer ).y )
244 || ( aPad.GetDelta( aLayer ).x > 0 && aPad.GetDelta( aLayer ).x > aPad.GetSize( aLayer ).y )
245 || ( aPad.GetDelta( aLayer ).y < 0 && aPad.GetDelta( aLayer ).y < -aPad.GetSize( aLayer ).x )
246 || ( aPad.GetDelta( aLayer ).y > 0 && aPad.GetDelta( aLayer ).y > aPad.GetSize( aLayer ).x ) )
247 {
249 _( "trapezoid delta is too large" ) } );
250 }
251 }
252
253 if( aPad.GetShape( aLayer ) == PAD_SHAPE::CUSTOM )
254 {
255 SHAPE_POLY_SET mergedPolygon;
256 aPad.MergePrimitivesAsPolygon( aLayer, &mergedPolygon );
257
258 if( mergedPolygon.OutlineCount() > 1 )
259 {
261 _( "custom pad shape must resolve to a single polygon" ) });
262 }
263 }
264}
265
266} // namespace
267
268
269void PAD_UTILS::CheckPad( const PAD& aPad, const UNITS_PROVIDER& aUnitsProvider, bool aForPadProperties,
270 const PAD_CHECK_HANDLER& aErrorHandler )
271{
272 const wxString padTypeString = PAD_UTILS::GetPadAttributeString( aPad.GetAttribute() );
273
278 const auto checkTechLayerSide = [&]()
279 {
280 if( ( aPad.IsOnLayer( F_Cu ) && aPad.IsOnLayer( B_Mask ) ) ||
281 ( aPad.IsOnLayer( B_Cu ) && aPad.IsOnLayer( F_Mask ) ) )
282 {
283 aErrorHandler( {
285 wxString::Format( _( "%s pad has copper and mask layers on different sides of the board" ),
286 padTypeString ),
287 } );
288 }
289
290 if( ( aPad.IsOnLayer( F_Cu ) && aPad.IsOnLayer( B_Paste ) ) ||
291 ( aPad.IsOnLayer( B_Cu ) && aPad.IsOnLayer( F_Paste ) ) )
292 {
293 aErrorHandler( {
295 wxString::Format( _( "%s pad has copper and paste layers on different sides of the board" ),
296 padTypeString ),
297 } );
298 }
299 };
300
302 [&]( PCB_LAYER_ID aLayer )
303 {
304 checkPadLayer( aPad, aLayer, aUnitsProvider, aForPadProperties, aErrorHandler );
305 } );
306
307 const LSET padlayers_mask = aPad.GetLayerSet();
308 const VECTOR2I drill_size = aPad.GetDrillSize();
309
310 if( !padlayers_mask[F_Cu] && !padlayers_mask[B_Cu] )
311 {
312 if( ( drill_size.x || drill_size.y ) && aPad.GetAttribute() != PAD_ATTRIB::NPTH )
313 {
315 _( "plated through holes normally have a copper pad on at least one outer layer" ) } );
316 }
317 }
318
320 && aPad.GetAttribute() == PAD_ATTRIB::NPTH )
321 {
322 aErrorHandler( { PAD_CHECK_CODE::FIDUCIAL_NOT_PLATED, _( "'fiducial' pads are normally plated" ) } );
323 }
324
326 {
327 aErrorHandler( { PAD_CHECK_CODE::TESTPOINT_NOT_PLATED, _( "'testpoint' pads are normally plated" ) } );
328 }
329
331 {
332 aErrorHandler( { PAD_CHECK_CODE::HEATSINK_NOT_PLATED, _( "'heatsink' pads are normally plated" ) } );
333 }
334
336 {
337 aErrorHandler( { PAD_CHECK_CODE::CASTELLATED_NOT_PTH, _( "'castellated' pads are normally PTH" ) } );
338 }
339
340 if( aPad.GetProperty() == PAD_PROP::BGA && aPad.GetAttribute() != PAD_ATTRIB::SMD )
341 {
342 aErrorHandler( { PAD_CHECK_CODE::BGA_NOT_SMD, _( "'BGA' property is for SMD pads" ) } );
343 }
344
346 {
347 aErrorHandler( { PAD_CHECK_CODE::MECHANICAL_NOT_PTH, _( "'mechanical' pads are normally PTH" ) } );
348 }
349
350 if( aPad.GetProperty() == PAD_PROP::PRESSFIT
351 && ( aPad.GetAttribute() != PAD_ATTRIB::PTH || !aPad.HasDrilledHole() ) )
352 {
353 aErrorHandler( { PAD_CHECK_CODE::PRESSFIT_NOT_PTH,
354 _( "'press-fit' pads are normally PTH with round holes" ) } );
355 }
356
357 switch( aPad.GetAttribute() )
358 {
359 case PAD_ATTRIB::NPTH: // Not plated, but through hole, a hole is expected
360 case PAD_ATTRIB::PTH: // Pad through hole, a hole is also expected
361 if( drill_size.x <= 0
362 || ( drill_size.y <= 0 && aPad.GetDrillShape() == PAD_DRILL_SHAPE::OBLONG ) )
363 {
364 aErrorHandler( { PAD_CHECK_CODE::TH_NO_HOLE, wxEmptyString } );
365 }
366 break;
367
368 case PAD_ATTRIB::CONN: // Connector pads are smd pads, just they do not have solder paste.
369 if( padlayers_mask[B_Paste] || padlayers_mask[F_Paste] )
370 {
371 aErrorHandler( { PAD_CHECK_CODE::CONN_HAS_PASTE,
372 _( "connector pads normally have no solder paste; use a SMD pad instead" ) } );
373 }
375
376 case PAD_ATTRIB::SMD: // SMD and Connector pads (One external copper layer only)
377 {
378 if( drill_size.x > 0 || drill_size.y > 0 )
379 {
380 aErrorHandler(
381 { PAD_CHECK_CODE::UNEXPECTED_HOLE, wxString::Format( _( "%s pad has a hole" ), padTypeString ) } );
382 }
383
384 const LSET copperLayers = padlayers_mask & LSET::AllCuMask();
385
386 if( copperLayers.count() > 1 )
387 {
389 wxString::Format( _( "%s pad has more than one copper layer" ), padTypeString ) } );
390 }
391
392 // SMD also includes aperture pads without copper on any layers
393 if( ( copperLayers.any() ) )
394 {
395 if( ( copperLayers & LSET{ F_Cu, B_Cu } ).none() )
396 {
398 wxString::Format( _( "%s pad has no outer layers" ), padTypeString ) } );
399 }
400
401 checkTechLayerSide();
402 }
403
404 break;
405 }
407 {
408 if( drill_size.x > 0 || drill_size.y > 0 )
409 {
410 aErrorHandler(
411 { PAD_CHECK_CODE::UNEXPECTED_HOLE, wxString::Format( _( "%s pad has a hole" ), padTypeString ) } );
412 }
413
414 const LSET copperLayers = padlayers_mask & LSET::AllCuMask();
415
416 if( copperLayers.none() )
417 {
419 wxString::Format( _( "%s pad has no copper layers" ), padTypeString ) } );
420 break;
421 }
422
423 if( copperLayers.count() > 1 )
424 {
426 wxString::Format( _( "%s pad has more than one copper layer" ), padTypeString ) } );
427 }
428
429 if( ( copperLayers & LSET::ExternalCuMask() ).none()
430 && ( padlayers_mask & LSET( { F_Mask, B_Mask, F_Paste, B_Paste } ) ).any() )
431 {
433 wxString::Format( _( "%s pad on an inner layer cannot have mask or paste layers" ),
434 padTypeString ) } );
435 }
436
437 checkTechLayerSide();
438
439 const FOOTPRINT* parentFp = aPad.GetParentFootprint();
440
441 if( parentFp && parentFp->GetStackupMode() == FOOTPRINT_STACKUP::EXPAND_INNER_LAYERS
442 && ( copperLayers & LSET::InternalCuMask() ).any() )
443 {
445 wxString::Format( _( "%s pad on inner layers requires a custom footprint stackup" ),
446 padTypeString ) } );
447 }
448
449 break;
450 }
451 }
452}
@ ERROR_OUTSIDE
@ ERROR_INSIDE
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:128
BOX2< VECTOR2I > BOX2I
Definition box2.h:917
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Definition box2.h:985
FOOTPRINT * GetParentFootprint() const
int GetMaxError() const
constexpr size_type GetWidth() const
Definition box2.h:217
constexpr size_type GetHeight() const
Definition box2.h:218
constexpr const SizeVec & GetSize() const
Definition box2.h:209
FOOTPRINT_STACKUP GetStackupMode() const
Definition footprint.h:500
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
static const LSET & AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
Definition lset.cpp:604
static const LSET & ExternalCuMask()
Return a mask holding the Front and Bottom layers.
Definition lset.cpp:630
static const LSET & InternalCuMask()
Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu.
Definition lset.cpp:573
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
Definition padstack.h:161
void ForEachUniqueLayer(const std::function< void(PCB_LAYER_ID)> &aMethod) const
Runs the given callable for each active unique copper layer in this padstack, meaning F_Cu for MODE::...
POST_MACHINING_PROPS & FrontPostMachining()
Definition padstack.h:372
DRILL_PROPS & TertiaryDrill()
Definition padstack.h:369
DRILL_PROPS & Drill()
Definition padstack.h:363
DRILL_PROPS & SecondaryDrill()
Definition padstack.h:366
POST_MACHINING_PROPS & BackPostMachining()
Definition padstack.h:375
Definition pad.h:61
PAD_PROP GetProperty() const
Definition pad.h:585
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition pad.h:579
const std::vector< std::shared_ptr< PCB_SHAPE > > & GetPrimitives(PCB_LAYER_ID aLayer) const
Accessor to the basic shape list for custom-shaped pads.
Definition pad.h:375
void MergePrimitivesAsPolygon(PCB_LAYER_ID aLayer, SHAPE_POLY_SET *aMergedPolygon, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Merge all basic shapes to a SHAPE_POLY_SET.
Definition pad.cpp:3480
std::shared_ptr< SHAPE_SEGMENT > GetEffectiveHoleShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, DRC_CONSTRAINT_T aUsage=NULL_CONSTRAINT) const override
Return a SHAPE_SEGMENT object representing the pad's hole.
Definition pad.cpp:1233
const BOX2I GetBoundingBox() const override
The bounding box is cached, so this will be efficient most of the time.
Definition pad.cpp:1545
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
Definition pad.h:950
std::optional< double > GetLocalSolderPasteMarginRatio() const
Definition pad.h:622
PAD_ATTRIB GetAttribute() const
Definition pad.h:582
const VECTOR2I & GetDelta(PCB_LAYER_ID aLayer) const
Definition pad.h:307
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc=ERROR_INSIDE, bool aIgnoreLineWidth=false) const override
Convert the pad shape to a closed polygon.
Definition pad.cpp:3036
VECTOR2I GetPosition() const override
Definition pad.cpp:255
VECTOR2I GetDrillSize() const
Definition pad.h:320
double GetRoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
Definition pad.h:837
PAD_SHAPE GetShape(PCB_LAYER_ID aLayer) const
Definition pad.h:205
VECTOR2I GetSize(PCB_LAYER_ID aLayer) const
Definition pad.cpp:297
std::optional< int > GetLocalClearance() const override
Return any local clearances set in the "classic" (ie: pre-rule) system.
Definition pad.h:605
bool IsOnCopperLayer() const override
Definition pad.cpp:1862
const PADSTACK & Padstack() const
Definition pad.h:331
PAD_DRILL_SHAPE GetDrillShape() const
Definition pad.h:438
std::optional< int > GetLocalSolderPasteMargin() const
Definition pad.h:615
std::optional< int > GetLocalSolderMaskMargin() const
Definition pad.h:608
double GetChamferRectRatio(PCB_LAYER_ID aLayer) const
Definition pad.h:860
bool HasDrilledHole() const override
Definition pad.h:118
Represent a set of closed polygons.
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
bool Collide(const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
int OutlineCount() const
Return the number of outlines in the set.
void BooleanSubtract(const SHAPE_POLY_SET &b)
Perform boolean polyset difference.
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aValue in internal units into a united string.
void TransformOvalToPolygon(SHAPE_POLY_SET &aBuffer, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, int aError, ERROR_LOC aErrorLoc, int aMinSegCount=0)
Convert a oblong shape to a polygon, using multiple segments.
#define _(s)
@ EXPAND_INNER_LAYERS
The 'normal' stackup handling, where there is a single inner layer (In1) and rule areas using it expa...
Definition footprint.h:111
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ F_Paste
Definition layer_ids.h:100
@ B_Mask
Definition layer_ids.h:94
@ B_Cu
Definition layer_ids.h:61
@ F_Mask
Definition layer_ids.h:93
@ B_Paste
Definition layer_ids.h:101
@ F_Cu
Definition layer_ids.h:60
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
Definition macros.h:79
wxString GetPadAttributeString(PAD_ATTRIB aAttrib)
Get the human-readable string for a pad attribute.
Definition pad_utils.cpp:68
bool PadHasMeaningfulRoundingRadius(const PAD &aPad, PCB_LAYER_ID aLayer)
Returns true if the pad's rounding ratio is valid (i.e.
Definition pad_utils.cpp:51
void RemoveAllDrillsFromPadstack(PADSTACK &aPadstack)
Remove the primary drill, the secondary and tertiary drills, and any post-machining operations from a...
Definition pad_utils.cpp:58
double GetDefaultIpcRoundingRatio(const PAD &aPad, PCB_LAYER_ID aLayer)
Get a sensible default for a rounded rectangle pad's rounding ratio.
Definition pad_utils.cpp:37
void CheckPad(const PAD &aPad, const UNITS_PROVIDER &aUnitsProvider, bool aForPadProperties, const PAD_CHECK_HANDLER &aErrorHandler)
Run non-board-specific checks on a pad.
std::function< void(const PAD_CHECK_RESULT &)> PAD_CHECK_HANDLER
Definition pad_utils.h:128
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
Definition eda_angle.h:461
PAD_ATTRIB
The set of pad shapes, used with PAD::{Set,Get}Attribute().
Definition padstack.h:98
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
Definition padstack.h:104
@ NON_COMPONENT
Pad with no hole that does not connect to a physical component, but rather provides a connection poin...
Definition padstack.h:106
@ SMD
Smd pad, appears on the solder paste layer (default)
Definition padstack.h:100
@ PTH
Plated through hole pad.
Definition padstack.h:99
@ CONN
Like smd, does not appear on the solder paste layer (default) Note: also has a special attribute in G...
Definition padstack.h:101
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
Definition padstack.h:53
@ CHAMFERED_RECT
Definition padstack.h:61
@ ROUNDRECT
Definition padstack.h:58
@ TRAPEZOID
Definition padstack.h:57
@ FIDUCIAL_LOCAL
a fiducial (usually a smd) local to the parent footprint
Definition padstack.h:122
@ FIDUCIAL_GLBL
a fiducial (usually a smd) for the full board
Definition padstack.h:121
@ MECHANICAL
a pad used for mechanical support
Definition padstack.h:126
@ PRESSFIT
a PTH with a hole diameter with tight tolerances for press fit pin
Definition padstack.h:127
@ HEATSINK
a pad used as heat sink, usually in SMD footprints
Definition padstack.h:124
@ TESTPOINT
a test point pad
Definition padstack.h:123
@ CASTELLATED
a pad with a castellated through hole
Definition padstack.h:125
@ BGA
Smd pad, used in BGA footprints.
Definition padstack.h:120
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708