kicad/include/pad_shapes.h

108 lines
3.8 KiB
C
Raw Normal View History

2016-01-12 16:33:33 +00:00
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
2016-04-06 18:15:49 +00:00
* Copyright (C) 1992-2016 KiCad Developers, see CHANGELOG.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_
#include <string>
2012-02-19 04:02:19 +00:00
/**
* Enum PAD_SHAPE_T
2020-11-12 22:30:02 +00:00
* is the set of pad shapes, used with PAD::{Set,Get}Shape()
2012-02-19 04:02:19 +00:00
*/
enum PAD_SHAPE_T
{
PAD_SHAPE_CIRCLE,
PAD_SHAPE_RECT,
PAD_SHAPE_OVAL,
PAD_SHAPE_TRAPEZOID,
2016-04-06 18:15:49 +00:00
PAD_SHAPE_ROUNDRECT,
PAD_SHAPE_CHAMFERED_RECT, // Rectangle with a champered corner ( and with rounded other corners)
PAD_SHAPE_CUSTOM // A shape defined by user, using a set of basic shapes
// (thick segments, circles, arcs, polygons
};
static inline std::string PAD_SHAPE_T_asString( PAD_SHAPE_T a )
{
switch( a )
{
case PAD_SHAPE_CIRCLE: return "PAD_SHAPE_CIRCLE";
case PAD_SHAPE_RECT: return "PAD_SHAPE_RECT";
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 18:15:11 +00:00
return ""; // Just to quiet GCC.
};
/**
* Enum PAD_DRILL_SHAPE_T
2020-11-12 22:30:02 +00:00
* is the set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
*/
enum PAD_DRILL_SHAPE_T
{
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
/**
* Enum PAD_ATTR_T
2020-11-12 22:30:02 +00:00
* is the set of pad shapes, used with PAD::{Set,Get}Attribute()
* The double name is for convenience of Python devs
2012-02-19 04:02:19 +00:00
*/
enum PAD_ATTR_T
{
2020-09-30 15:38:35 +00:00
PAD_ATTRIB_PTH, ///< Plated through hole pad
PAD_ATTRIB_SMD, ///< Smd pad, appears on the solder paste layer (default)
PAD_ATTRIB_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
PAD_ATTRIB_NPTH, ///< like PAD_PTH, but not plated
///< mechanical use only, no connection allowed
2012-02-19 04:02:19 +00:00
};
2008-01-05 17:20:13 +00:00
/**
* Enum PAD_PROP_T
* is the set of pad properties used in Gerber files (Draw files, and P&P files)
* to define some properties in fabrication or test files
*/
enum PAD_PROP_T
{
PAD_PROP_NONE, ///< no special fabrication property
PAD_PROP_BGA, ///< Smd pad, used in BGA footprints
PAD_PROP_FIDUCIAL_GLBL, ///< a fiducial (usually a smd) for the full board
PAD_PROP_FIDUCIAL_LOCAL, ///< a fiducial (usually a smd) local to the parent footprint
PAD_PROP_TESTPOINT, ///< a test point pad
PAD_PROP_HEATSINK, ///< a pad used as heat sink, usually in SMD footprints
PAD_PROP_CASTELLATED ///< a pad with a castellated through hole
};
2012-02-19 04:02:19 +00:00
#endif // PAD_SHAPES_H_