2016-01-12 16:33:33 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2022-04-24 22:54:01 +00:00
|
|
|
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.TXT for contributors.
|
2016-01-12 16:33:33 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
2008-01-05 17:20:13 +00:00
|
|
|
|
|
|
|
#ifndef PAD_SHAPES_H_
|
|
|
|
#define PAD_SHAPES_H_
|
|
|
|
|
2020-07-01 22:40:15 +00:00
|
|
|
#include <string>
|
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
/**
|
2020-12-19 23:29:10 +00:00
|
|
|
* The set of pad shapes, used with PAD::{Set,Get}Shape()
|
2022-04-24 22:54:01 +00:00
|
|
|
*
|
2023-12-24 01:21:58 +00:00
|
|
|
* --> DO NOT REORDER, PCB_IO_KICAD_LEGACY is dependent on the integer values <--
|
2012-02-19 04:02:19 +00:00
|
|
|
*/
|
2021-05-01 12:22:35 +00:00
|
|
|
enum class PAD_SHAPE : int
|
2012-02-19 04:02:19 +00:00
|
|
|
{
|
2021-05-01 12:22:35 +00:00
|
|
|
CIRCLE,
|
2023-06-02 09:10:48 +00:00
|
|
|
RECTANGLE, // do not use just RECT: it collides in a header on MSYS2
|
2021-05-01 12:22:35 +00:00
|
|
|
OVAL,
|
|
|
|
TRAPEZOID,
|
|
|
|
ROUNDRECT,
|
2020-12-19 23:29:10 +00:00
|
|
|
|
|
|
|
// Rectangle with a chamfered corner ( and with rounded other corners).
|
2021-05-01 12:22:35 +00:00
|
|
|
CHAMFERED_RECT,
|
|
|
|
CUSTOM // A shape defined by user, using a set of basic shapes
|
2022-04-24 22:54:01 +00:00
|
|
|
// (thick segments, circles, arcs, polygons).
|
2014-01-26 14:20:58 +00:00
|
|
|
};
|
|
|
|
|
2021-05-01 12:22:35 +00:00
|
|
|
static inline std::string PAD_SHAPE_T_asString( PAD_SHAPE a )
|
2020-06-30 12:41:59 +00:00
|
|
|
{
|
|
|
|
switch( a )
|
|
|
|
{
|
2021-05-01 12:22:35 +00:00
|
|
|
case PAD_SHAPE::CIRCLE: return "PAD_SHAPE::CIRCLE";
|
2023-06-02 09:10:48 +00:00
|
|
|
case PAD_SHAPE::RECTANGLE: return "PAD_SHAPE::RECT";
|
2021-05-01 12:22:35 +00:00
|
|
|
case PAD_SHAPE::OVAL: return "PAD_SHAPE::OVAL";
|
|
|
|
case PAD_SHAPE::TRAPEZOID: return "PAD_SHAPE::TRAPEZOID";
|
|
|
|
case PAD_SHAPE::ROUNDRECT: return "PAD_SHAPE::ROUNDRECT";
|
|
|
|
case PAD_SHAPE::CHAMFERED_RECT: return "PAD_SHAPE::CHAMFERED_RECT";
|
|
|
|
case PAD_SHAPE::CUSTOM: return "PAD_SHAPE::CUSTOM";
|
2020-06-30 12:41:59 +00:00
|
|
|
}
|
2020-06-30 18:15:11 +00:00
|
|
|
|
2020-07-01 22:40:15 +00:00
|
|
|
return ""; // Just to quiet GCC.
|
2020-06-30 12:41:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-01-26 14:20:58 +00:00
|
|
|
/**
|
2020-12-19 23:29:10 +00:00
|
|
|
* The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
|
2014-01-26 14:20:58 +00:00
|
|
|
*/
|
|
|
|
enum PAD_DRILL_SHAPE_T
|
|
|
|
{
|
2015-08-23 19:40:33 +00:00
|
|
|
PAD_DRILL_SHAPE_CIRCLE,
|
|
|
|
PAD_DRILL_SHAPE_OBLONG,
|
2012-02-19 04:02:19 +00:00
|
|
|
};
|
2008-01-05 17:20:13 +00:00
|
|
|
|
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
/**
|
2020-12-19 23:29:10 +00:00
|
|
|
* The set of pad shapes, used with PAD::{Set,Get}Attribute().
|
|
|
|
*
|
2015-07-28 13:05:47 +00:00
|
|
|
* The double name is for convenience of Python devs
|
2012-02-19 04:02:19 +00:00
|
|
|
*/
|
2021-05-01 14:46:50 +00:00
|
|
|
enum class PAD_ATTRIB
|
2012-02-19 04:02:19 +00:00
|
|
|
{
|
2021-05-01 14:46:50 +00:00
|
|
|
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)
|
2020-09-30 15:38:35 +00:00
|
|
|
///< note also has a special attribute in Gerber X files
|
|
|
|
///< Used for edgecard connectors for instance
|
2021-05-01 14:46:50 +00:00
|
|
|
NPTH, ///< like PAD_PTH, but not plated
|
2020-09-30 15:38:35 +00:00
|
|
|
///< mechanical use only, no connection allowed
|
2012-02-19 04:02:19 +00:00
|
|
|
};
|
2008-01-05 17:20:13 +00:00
|
|
|
|
|
|
|
|
2019-12-11 10:36:45 +00:00
|
|
|
/**
|
2022-04-24 22:54:01 +00:00
|
|
|
* The set of pad properties used in Gerber files (Draw files, and P&P files)
|
2020-12-19 23:29:10 +00:00
|
|
|
* to define some properties in fabrication or test files.
|
2019-12-11 10:36:45 +00:00
|
|
|
*/
|
2021-05-01 14:58:30 +00:00
|
|
|
enum class PAD_PROP
|
2019-12-11 10:36:45 +00:00
|
|
|
{
|
2021-05-01 14:58:30 +00:00
|
|
|
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
|
2019-12-11 10:36:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
#endif // PAD_SHAPES_H_
|