KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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-2022 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, 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
34enum class PAD_SHAPE : int
35{
36 CIRCLE,
37 RECTANGLE, // do not use just RECT: it collides in a header on MSYS2
38 OVAL,
41
42 // Rectangle with a chamfered corner ( and with rounded other corners).
44 CUSTOM // A shape defined by user, using a set of basic shapes
45 // (thick segments, circles, arcs, polygons).
46};
47
48static inline std::string PAD_SHAPE_T_asString( PAD_SHAPE a )
49{
50 switch( a )
51 {
52 case PAD_SHAPE::CIRCLE: return "PAD_SHAPE::CIRCLE";
53 case PAD_SHAPE::RECTANGLE: return "PAD_SHAPE::RECT";
54 case PAD_SHAPE::OVAL: return "PAD_SHAPE::OVAL";
55 case PAD_SHAPE::TRAPEZOID: return "PAD_SHAPE::TRAPEZOID";
56 case PAD_SHAPE::ROUNDRECT: return "PAD_SHAPE::ROUNDRECT";
57 case PAD_SHAPE::CHAMFERED_RECT: return "PAD_SHAPE::CHAMFERED_RECT";
58 case PAD_SHAPE::CUSTOM: return "PAD_SHAPE::CUSTOM";
59 }
60
61 return ""; // Just to quiet GCC.
62};
63
64
69{
72};
73
74
80enum class PAD_ATTRIB
81{
82 PTH,
83 SMD,
84 CONN,
87 NPTH,
89};
90
91
96enum class PAD_PROP
97{
98 NONE,
99 BGA,
102 TESTPOINT,
103 HEATSINK,
105};
106
107
108#endif // PAD_SHAPES_H_
PAD_ATTRIB
The set of pad shapes, used with PAD::{Set,Get}Attribute().
Definition: pad_shapes.h:81
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ SMD
Smd pad, appears on the solder paste layer (default)
@ PTH
Plated through hole pad.
@ CONN
Like smd, does not appear on the solder paste layer (default) Note: also has a special attribute in G...
static std::string PAD_SHAPE_T_asString(PAD_SHAPE a)
Definition: pad_shapes.h:48
PAD_DRILL_SHAPE_T
The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
Definition: pad_shapes.h:69
@ PAD_DRILL_SHAPE_CIRCLE
Definition: pad_shapes.h:70
@ PAD_DRILL_SHAPE_OBLONG
Definition: pad_shapes.h:71
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
Definition: pad_shapes.h:35
PAD_PROP
The set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties ...
Definition: pad_shapes.h:97
@ FIDUCIAL_LOCAL
a fiducial (usually a smd) local to the parent footprint
@ FIDUCIAL_GLBL
a fiducial (usually a smd) for the full board
@ HEATSINK
a pad used as heat sink, usually in SMD footprints
@ NONE
no special fabrication property
@ TESTPOINT
a test point pad
@ CASTELLATED
a pad with a castellated through hole
@ BGA
Smd pad, used in BGA footprints.