KiCad PCB EDA Suite
pad_shapes.h
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 (C) 1992-2020 KiCad Developers, see CHANGELOG.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, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
24 #ifndef PAD_SHAPES_H_
25 #define PAD_SHAPES_H_
26 
27 #include <string>
28 
33 enum class PAD_SHAPE : 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 };
46 
47 static inline std::string PAD_SHAPE_T_asString( PAD_SHAPE a )
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 };
62 
63 
68 {
71 };
72 
73 
79 enum class PAD_ATTRIB
80 {
81  PTH,
82  SMD,
83  CONN,
84  NPTH,
87 };
89 
90 
95 enum class PAD_PROP
96 {
97  NONE,
98  BGA,
101  TESTPOINT,
102  HEATSINK,
103  CASTELLATED
104 };
105 
106 
107 #endif // PAD_SHAPES_H_
Like smd, does not appear on the solder paste layer (default)
Smd pad, appears on the solder paste layer (default)
a test point pad
PAD_DRILL_SHAPE_T
The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
Definition: pad_shapes.h:67
Plated through hole pad.
a pad used as heat sink, usually in SMD footprints
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape() DO NOT REORDER, legacy_plugin is dependent on ...
Definition: pad_shapes.h:33
like PAD_PTH, but not plated
Smd pad, used in BGA footprints.
a fiducial (usually a smd) local to the parent footprint
PAD_ATTRIB
The set of pad shapes, used with PAD::{Set,Get}Attribute().
Definition: pad_shapes.h:79
a fiducial (usually a smd) for the full board
PAD_PROP
Ghe set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties ...
Definition: pad_shapes.h:95
no special fabrication property
static std::string PAD_SHAPE_T_asString(PAD_SHAPE a)
Definition: pad_shapes.h:47
a pad with a castellated through hole
segment with non rounded ends