LibrePCB Developers Documentation
Loading...
Searching...
No Matches
PadGeometry Class Referencefinal

The PadGeometry class describes the shape of a pad. More...

#include <padgeometry.h>

+ Collaboration diagram for PadGeometry:

Public Types

enum class  Shape
 

Public Member Functions

 PadGeometry ()=delete
 
 PadGeometry (const PadGeometry &other) noexcept
 
 ~PadGeometry () noexcept
 
Shape getShape () const noexcept
 
Length getWidth () const noexcept
 
Length getHeight () const noexcept
 
UnsignedLength getCornerRadius () const noexcept
 
const PathgetPath () const noexcept
 
const PadHoleListgetHoles () const noexcept
 
QVector< PathtoOutlines () const
 
QPainterPath toQPainterPathPx () const noexcept
 
QPainterPath toFilledQPainterPathPx () const noexcept
 
QPainterPath toHolesQPainterPathPx () const noexcept
 
PadGeometry withOffset (const Length &offset) const noexcept
 
PadGeometry withoutHoles () const noexcept
 
bool operator== (const PadGeometry &rhs) const noexcept
 
bool operator!= (const PadGeometry &rhs) const noexcept
 
PadGeometryoperator= (const PadGeometry &rhs) noexcept
 

Static Public Member Functions

static PadGeometry roundedRect (const PositiveLength &width, const PositiveLength &height, const UnsignedLimitedRatio &radius, const PadHoleList &holes) noexcept
 
static PadGeometry roundedOctagon (const PositiveLength &width, const PositiveLength &height, const UnsignedLimitedRatio &radius, const PadHoleList &holes) noexcept
 
static PadGeometry stroke (const PositiveLength &diameter, const NonEmptyPath &path, const PadHoleList &holes) noexcept
 
static PadGeometry custom (const Path &outline, const PadHoleList &holes)
 
static bool isValidCustomOutline (const Path &path) noexcept
 

Private Member Functions

 PadGeometry (Shape shape, const Length &width, const Length &height, const UnsignedLimitedRatio &radius, const Path &path, const Length &offset, const PadHoleList &holes) noexcept
 

Static Private Member Functions

static PositiveLength maxArcTolerance () noexcept
 

Private Attributes

Shape mShape
 
Length mBaseWidth
 
Length mBaseHeight
 
UnsignedLimitedRatio mRadius
 
Path mPath
 
Length mOffset
 
PadHoleList mHoles
 

Detailed Description

The PadGeometry class describes the shape of a pad.

Member Enumeration Documentation

◆ Shape

enum class Shape
strong
Enumerator
RoundedRect 
RoundedOctagon 
Stroke 
Custom 

Constructor & Destructor Documentation

◆ PadGeometry() [1/3]

PadGeometry ( )
delete
+ Here is the caller graph for this function:

◆ PadGeometry() [2/3]

PadGeometry ( const PadGeometry other)
noexcept

◆ ~PadGeometry()

~PadGeometry ( )
noexcept

◆ PadGeometry() [3/3]

PadGeometry ( Shape  shape,
const Length width,
const Length height,
const UnsignedLimitedRatio radius,
const Path path,
const Length offset,
const PadHoleList holes 
)
privatenoexcept

Member Function Documentation

◆ getShape()

Shape getShape ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getWidth()

Length getWidth ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getHeight()

Length getHeight ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getCornerRadius()

UnsignedLength getCornerRadius ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPath()

const Path & getPath ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getHoles()

const PadHoleList & getHoles ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ toOutlines()

QVector< Path > toOutlines ( ) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toQPainterPathPx()

QPainterPath toQPainterPathPx ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toFilledQPainterPathPx()

QPainterPath toFilledQPainterPathPx ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toHolesQPainterPathPx()

QPainterPath toHolesQPainterPathPx ( ) const
noexcept
+ Here is the caller graph for this function:

◆ withOffset()

PadGeometry withOffset ( const Length offset) const
noexcept
+ Here is the caller graph for this function:

◆ withoutHoles()

PadGeometry withoutHoles ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ roundedRect()

PadGeometry roundedRect ( const PositiveLength width,
const PositiveLength height,
const UnsignedLimitedRatio radius,
const PadHoleList holes 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ roundedOctagon()

PadGeometry roundedOctagon ( const PositiveLength width,
const PositiveLength height,
const UnsignedLimitedRatio radius,
const PadHoleList holes 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ stroke()

PadGeometry stroke ( const PositiveLength diameter,
const NonEmptyPath path,
const PadHoleList holes 
)
staticnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ custom()

PadGeometry custom ( const Path outline,
const PadHoleList holes 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValidCustomOutline()

bool isValidCustomOutline ( const Path path)
staticnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const PadGeometry rhs) const
noexcept

◆ operator!=()

bool operator!= ( const PadGeometry rhs) const
inlinenoexcept

◆ operator=()

PadGeometry & operator= ( const PadGeometry rhs)
noexcept

◆ maxArcTolerance()

static PositiveLength maxArcTolerance ( )
inlinestaticprivatenoexcept

Returns the maximum allowed arc tolerance when flattening arcs. Do not change this if you don't know exactly what you're doing (it might affect planes in existing boards)!

+ Here is the caller graph for this function:

Member Data Documentation

◆ mShape

Shape mShape
private

◆ mBaseWidth

Length mBaseWidth
private

◆ mBaseHeight

Length mBaseHeight
private

◆ mRadius

UnsignedLimitedRatio mRadius
private

◆ mPath

Path mPath
private

◆ mOffset

Length mOffset
private

◆ mHoles

PadHoleList mHoles
private

The documentation for this class was generated from the following files: