20#ifndef LIBREPCB_CORE_PADGEOMETRY_H
21#define LIBREPCB_CORE_PADGEOMETRY_H
26#include "../types/ratio.h"
95 bool operator==(const
PadGeometry& rhs) const noexcept;
97 return !(*
this == rhs);
The Length class is used to represent a length (for example 12.75 millimeters)
Definition length.h:82
The PadGeometry class describes the shape of a pad.
Definition padgeometry.h:46
Length getWidth() const noexcept
Definition padgeometry.h:65
Shape mShape
Definition padgeometry.h:116
~PadGeometry() noexcept
Definition padgeometry.cpp:61
static PadGeometry stroke(const PositiveLength &diameter, const NonEmptyPath &path, const PadHoleList &holes) noexcept
Definition padgeometry.cpp:213
PadHoleList mHoles
Definition padgeometry.h:122
static bool isValidCustomOutline(const Path &path) noexcept
Definition padgeometry.cpp:227
PadGeometry withoutHoles() const noexcept
Definition padgeometry.cpp:188
QPainterPath toHolesQPainterPathPx() const noexcept
Definition padgeometry.cpp:171
UnsignedLimitedRatio mRadius
Definition padgeometry.h:119
Length getHeight() const noexcept
Definition padgeometry.h:66
UnsignedLength getCornerRadius() const noexcept
Definition padgeometry.cpp:68
static PadGeometry roundedOctagon(const PositiveLength &width, const PositiveLength &height, const UnsignedLimitedRatio &radius, const PadHoleList &holes) noexcept
Definition padgeometry.cpp:205
const Path & getPath() const noexcept
Definition padgeometry.h:68
PadGeometry & operator=(const PadGeometry &rhs) noexcept
Definition padgeometry.cpp:247
const PadHoleList & getHoles() const noexcept
Definition padgeometry.h:69
Shape
Definition padgeometry.h:51
static PositiveLength maxArcTolerance() noexcept
Definition padgeometry.h:111
Length mBaseWidth
Definition padgeometry.h:117
QPainterPath toQPainterPathPx() const noexcept
Definition padgeometry.cpp:146
QVector< Path > toOutlines() const
Definition padgeometry.cpp:79
static PadGeometry custom(const Path &outline, const PadHoleList &holes)
Definition padgeometry.cpp:221
Path mPath
Definition padgeometry.h:120
static PadGeometry roundedRect(const PositiveLength &width, const PositiveLength &height, const UnsignedLimitedRatio &radius, const PadHoleList &holes) noexcept
Definition padgeometry.cpp:197
Length mOffset
Definition padgeometry.h:121
QPainterPath toFilledQPainterPathPx() const noexcept
Definition padgeometry.cpp:159
PadGeometry withOffset(const Length &offset) const noexcept
Definition padgeometry.cpp:183
Length mBaseHeight
Definition padgeometry.h:118
Shape getShape() const noexcept
Definition padgeometry.h:64
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition path.h:57
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< Path, NonEmptyPathConstraint, NonEmptyPathVerifier > NonEmptyPath
Definition path.h:231
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
type_safe::constrained_type< Ratio, UnsignedLimitedRatioConstraint, UnsignedLimitedRatioVerifier > UnsignedLimitedRatio
Definition ratio.h:376