20#ifndef LIBREPCB_CORE_PAD_H
21#define LIBREPCB_CORE_PAD_H
26#include "../exceptions.h"
27#include "../types/angle.h"
28#include "../types/length.h"
29#include "../types/maskconfig.h"
30#include "../types/point.h"
31#include "../types/ratio.h"
32#include "../types/uuid.h"
54 Q_DECLARE_TR_FUNCTIONS(
Pad)
84 Pad(
const Pad& other)
noexcept;
85 Pad(
const Uuid& uuid,
const Pad& other)
noexcept;
93 virtual ~Pad() noexcept;
120 bool isTht() const noexcept;
134 bool operator==(const
Pad& rhs) const noexcept;
135 bool operator!=(const
Pad& rhs) const noexcept {
return !(*
this == rhs); }
164 std::size_t seed = 0) noexcept {
165 return ::qHash(
static_cast<int>(key), seed);
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The Layer class provides all supported geometry layers.
Definition layer.h:42
The MaskConfig class defines how to add automatic stop mask or solder paste.
Definition maskconfig.h:45
The PadGeometry class describes the shape of a pad.
Definition padgeometry.h:46
Base class for pads, extended in derived classes.
Definition pad.h:53
Function mFunction
Definition pad.h:155
QHash< const Layer *, QList< PadGeometry > > buildPreviewGeometries() const noexcept
Definition pad.cpp:311
Shape mShape
Definition pad.h:146
PadGeometry getGeometry() const noexcept
Definition pad.cpp:285
const Angle & getRotation() const noexcept
Definition pad.h:98
PadHoleList mHoles
If not empty, it's a THT pad.
Definition pad.h:156
const MaskConfig & getSolderPasteConfig() const noexcept
Definition pad.h:109
const PositiveLength & getWidth() const noexcept
Definition pad.h:100
bool getFunctionIsFiducial() const noexcept
Definition pad.cpp:220
Path mCustomShapeOutline
Empty if not needed; Implicitly closed.
Definition pad.h:150
const MaskConfig & getStopMaskConfig() const noexcept
Definition pad.h:106
bool hasBottomCopper() const noexcept
Definition pad.cpp:261
UnsignedLimitedRatio mRadius
Definition pad.h:149
ComponentSide
Definition pad.h:64
const Path & getCustomShapeOutline() const noexcept
Definition pad.h:103
bool isTht() const noexcept
Definition pad.cpp:237
bool getFunctionNeedsSoldering() const noexcept
Definition pad.cpp:225
const UnsignedLength & getCopperClearance() const noexcept
Definition pad.h:112
Uuid mUuid
Definition pad.h:143
Function
Definition pad.h:69
const PadHoleList & getHoles() const noexcept
Definition pad.h:119
Function getFunction() const noexcept
Definition pad.h:116
const Layer & getSmtLayer() const noexcept
Definition pad.cpp:249
bool hasTopCopper() const noexcept
Definition pad.cpp:257
const PositiveLength & getHeight() const noexcept
Definition pad.h:101
static UnsignedLimitedRatio getRecommendedRadius(const PositiveLength &width, const PositiveLength &height) noexcept
Definition pad.cpp:373
static QString getFunctionDescriptionTr(Function function) noexcept
Definition pad.cpp:384
ComponentSide getComponentSide() const noexcept
Definition pad.h:115
bool hasAutoTopStopMask() const noexcept
Definition pad.cpp:265
bool hasAutoBottomStopMask() const noexcept
Definition pad.cpp:270
MaskConfig mSolderPasteConfig
Definition pad.h:152
bool hasAutoBottomSolderPaste() const noexcept
Definition pad.cpp:280
Angle mRotation
Definition pad.h:145
bool isOnLayer(const Layer &layer) const noexcept
Definition pad.cpp:241
const Point & getPosition() const noexcept
Definition pad.h:97
MaskConfig mStopMaskConfig
Definition pad.h:151
virtual ~Pad() noexcept
Definition pad.cpp:213
PositiveLength mHeight
Definition pad.h:148
const Uuid & getUuid() const noexcept
Definition pad.h:96
UnsignedLength mCopperClearance
Definition pad.h:153
Point mPosition
Definition pad.h:144
PositiveLength mWidth
Definition pad.h:147
const UnsignedLimitedRatio & getRadius() const noexcept
Definition pad.h:102
Shape getShape() const noexcept
Definition pad.h:99
ComponentSide mComponentSide
Definition pad.h:154
bool hasAutoTopSolderPaste() const noexcept
Definition pad.cpp:275
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition path.h:59
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The SExpression class.
Definition sexpression.h:69
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
Definition occmodel.cpp:77
std::size_t qHash(const AttributeKey &key, std::size_t seed=0) noexcept
Definition attributekey.h:113
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
type_safe::constrained_type< Ratio, UnsignedLimitedRatioConstraint, UnsignedLimitedRatioVerifier > UnsignedLimitedRatio
Definition ratio.h:376