KiCad PCB EDA Suite
pad_shapes.h File Reference
#include <string>

Go to the source code of this file.

Enumerations

enum  PAD_SHAPE : int {
  PAD_SHAPE::CIRCLE, PAD_SHAPE::RECT, PAD_SHAPE::OVAL, PAD_SHAPE::TRAPEZOID,
  PAD_SHAPE::ROUNDRECT, PAD_SHAPE::CHAMFERED_RECT, PAD_SHAPE::CUSTOM
}
 The set of pad shapes, used with PAD::{Set,Get}Shape() DO NOT REORDER, legacy_plugin is dependent on the integer values. More...
 
enum  PAD_DRILL_SHAPE_T { PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG }
 The set of pad drill shapes, used with PAD::{Set,Get}DrillShape() More...
 
enum  PAD_ATTRIB { PAD_ATTRIB::PTH, PAD_ATTRIB::SMD, PAD_ATTRIB::CONN, PAD_ATTRIB::NPTH }
 The set of pad shapes, used with PAD::{Set,Get}Attribute(). More...
 
enum  PAD_PROP {
  PAD_PROP::NONE, PAD_PROP::BGA, PAD_PROP::FIDUCIAL_GLBL, PAD_PROP::FIDUCIAL_LOCAL,
  PAD_PROP::TESTPOINT, PAD_PROP::HEATSINK, PAD_PROP::CASTELLATED
}
 Ghe set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties in fabrication or test files. More...
 

Functions

static std::string PAD_SHAPE_T_asString (PAD_SHAPE a)
 

Enumeration Type Documentation

◆ PAD_ATTRIB

enum PAD_ATTRIB
strong

The set of pad shapes, used with PAD::{Set,Get}Attribute().

The double name is for convenience of Python devs

Enumerator
PTH 

Plated through hole pad.

SMD 

Smd pad, appears on the solder paste layer (default)

CONN 

Like smd, does not appear on the solder paste layer (default)

note also has a special attribute in Gerber X files Used for edgecard connectors for instance

NPTH 

like PAD_PTH, but not plated

mechanical use only, no connection allowed

Definition at line 79 of file pad_shapes.h.

80 {
81  PTH,
82  SMD,
83  CONN,
84  NPTH,
87 };
Like smd, does not appear on the solder paste layer (default)
Smd pad, appears on the solder paste layer (default)
Plated through hole pad.
like PAD_PTH, but not plated

◆ PAD_DRILL_SHAPE_T

The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()

Enumerator
PAD_DRILL_SHAPE_CIRCLE 
PAD_DRILL_SHAPE_OBLONG 

Definition at line 67 of file pad_shapes.h.

◆ PAD_PROP

enum PAD_PROP
strong

Ghe set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties in fabrication or test files.

Enumerator
NONE 

no special fabrication property

BGA 

Smd pad, used in BGA footprints.

FIDUCIAL_GLBL 

a fiducial (usually a smd) for the full board

FIDUCIAL_LOCAL 

a fiducial (usually a smd) local to the parent footprint

TESTPOINT 

a test point pad

HEATSINK 

a pad used as heat sink, usually in SMD footprints

CASTELLATED 

a pad with a castellated through hole

Definition at line 95 of file pad_shapes.h.

96 {
97  NONE,
98  BGA,
101  TESTPOINT,
102  HEATSINK,
103  CASTELLATED
104 };
a test point pad
a pad used as heat sink, usually in SMD footprints
Smd pad, used in BGA footprints.
a fiducial (usually a smd) local to the parent footprint
No updates are required.
Definition: view_item.h:51
a fiducial (usually a smd) for the full board
a pad with a castellated through hole

◆ PAD_SHAPE

enum PAD_SHAPE : int
strong

The set of pad shapes, used with PAD::{Set,Get}Shape() DO NOT REORDER, legacy_plugin is dependent on the integer values.

Enumerator
CIRCLE 
RECT 
OVAL 
TRAPEZOID 
ROUNDRECT 
CHAMFERED_RECT 
CUSTOM 

Definition at line 33 of file pad_shapes.h.

33  : int
34 {
35  CIRCLE,
36  RECT,
37  OVAL,
38  TRAPEZOID,
39  ROUNDRECT,
40 
41  // Rectangle with a chamfered corner ( and with rounded other corners).
43  CUSTOM // A shape defined by user, using a set of basic shapes
44  // (thick segments, circles, arcs, polygons.
45 };
Represent basic circle geometry with utility geometry functions.
Definition: circle.h:32
segment with non rounded ends

Function Documentation

◆ PAD_SHAPE_T_asString()

static std::string PAD_SHAPE_T_asString ( PAD_SHAPE  a)
inlinestatic

Definition at line 47 of file pad_shapes.h.

48 {
49  switch( a )
50  {
51  case PAD_SHAPE::CIRCLE: return "PAD_SHAPE::CIRCLE";
52  case PAD_SHAPE::RECT: return "PAD_SHAPE::RECT";
53  case PAD_SHAPE::OVAL: return "PAD_SHAPE::OVAL";
54  case PAD_SHAPE::TRAPEZOID: return "PAD_SHAPE::TRAPEZOID";
55  case PAD_SHAPE::ROUNDRECT: return "PAD_SHAPE::ROUNDRECT";
56  case PAD_SHAPE::CHAMFERED_RECT: return "PAD_SHAPE::CHAMFERED_RECT";
57  case PAD_SHAPE::CUSTOM: return "PAD_SHAPE::CUSTOM";
58  }
59 
60  return ""; // Just to quiet GCC.
61 };

References CHAMFERED_RECT, CIRCLE, CUSTOM, OVAL, RECT, ROUNDRECT, and TRAPEZOID.

Referenced by PAD::BuildEffectiveShapes(), and PAD::TransformShapeWithClearanceToPolygon().