KiCad PCB EDA Suite
PAD_NAMING Namespace Reference

The PAD_NAMING namespace contains helper functions for common operations to do with naming of D_PAD objects. More...

Functions

bool PadCanHaveName (const D_PAD &aPad)
 Check if a pad should be named. More...
 

Detailed Description

The PAD_NAMING namespace contains helper functions for common operations to do with naming of D_PAD objects.

Function Documentation

bool PAD_NAMING::PadCanHaveName ( const D_PAD aPad)

Check if a pad should be named.

For example, NPTH or paste apertures normally do not have names, as they cannot be assigned to a netlist.

Parameters
aPadthe pad to check
Returns
true if the pad gets a name

Definition at line 26 of file pad_naming.cpp.

References D_PAD::GetAttribute(), D_PAD::IsAperturePad(), and PAD_ATTRIB_HOLE_NOT_PLATED.

Referenced by ARRAY_CREATOR::Invoke().

27 {
28  // Aperture pads don't get a number
29  if( aPad.IsAperturePad() )
30  return false;
31 
32  // NPTH pads don't get numbers
34  return false;
35 
36  return true;
37 }
bool IsAperturePad() const
Definition: class_pad.h:409
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:405
like PAD_STANDARD, but not plated mechanical use only, no connection allowed
Definition: pad_shapes.h:65