LibrePCB Developers Documentation
BoardDesignRuleCheck Class Referencefinal

The BoardDesignRuleCheck class checks a librepcb::Board for design rule violations. More...

#include <boarddesignrulecheck.h>

Inherits QObject.

+ Collaboration diagram for BoardDesignRuleCheck:

Signals

void started ()
 
void progressPercent (int percent)
 
void progressStatus (const QString &msg)
 
void progressMessage (const QString &msg)
 
void finished ()
 

Public Member Functions

 BoardDesignRuleCheck (Board &board, const BoardDesignRuleCheckSettings &settings, QObject *parent=nullptr) noexcept
 
 ~BoardDesignRuleCheck () noexcept
 
const QStringList & getProgressStatus () const noexcept
 
const RuleCheckMessageListgetMessages () const noexcept
 
void execute (bool quick)
 

Private Member Functions

void rebuildPlanes (int progressEnd)
 
void checkCopperCopperClearances (int progressEnd)
 
void checkCopperBoardClearances (int progressEnd)
 
void checkCopperHoleClearances (int progressEnd)
 
void checkDrillDrillClearances (int progressEnd)
 
void checkDrillBoardClearances (int progressEnd)
 
void checkSilkscreenStopmaskClearances (int progressEnd)
 
void checkMinimumCopperWidth (int progressEnd)
 
void checkMinimumPthAnnularRing (int progressEnd)
 
void checkMinimumNpthDrillDiameter (int progressEnd)
 
void checkMinimumNpthSlotWidth (int progressEnd)
 
void checkMinimumPthDrillDiameter (int progressEnd)
 
void checkMinimumPthSlotWidth (int progressEnd)
 
void checkMinimumSilkscreenWidth (int progressEnd)
 
void checkMinimumSilkscreenTextHeight (int progressEnd)
 
void checkZones (int progressEnd)
 
void checkVias (int progressEnd)
 
void checkAllowedNpthSlots (int progressEnd)
 
void checkAllowedPthSlots (int progressEnd)
 
void checkInvalidPadConnections (int progressEnd)
 
void checkDeviceClearances (int progressEnd)
 
void checkBoardOutline (int progressEnd)
 
void checkUsedLayers (int progressEnd)
 
void checkForUnplacedComponents (int progressEnd)
 
void checkForMissingConnections (int progressEnd)
 
void checkForStaleObjects (int progressEnd)
 
void checkMinimumWidth (const UnsignedLength &minWidth, std::function< bool(const Layer &)> layerFilter)
 
template<typename THole >
bool requiresHoleSlotWarning (const THole &hole, BoardDesignRuleCheckSettings::AllowedSlots allowed)
 
ClipperLib::Paths getBoardClearanceArea (const UnsignedLength &clearance) const
 
QVector< PathgetBoardOutlines (const QSet< const Layer *> &layers) const noexcept
 
const ClipperLib::Paths & getCopperPaths (const Layer &layer, const QSet< const NetSignal *> &netsignals)
 
ClipperLib::Paths getDeviceOutlinePaths (const BI_Device &device, const Layer &layer)
 
QVector< PathgetDeviceLocation (const BI_Device &device) const
 
QVector< PathgetViaLocation (const BI_Via &via) const noexcept
 
template<typename THole >
QVector< PathgetHoleLocation (const THole &hole, const Transform &transform=Transform()) const noexcept
 
void emitProgress (int percent) noexcept
 
void emitStatus (const QString &status) noexcept
 
void emitMessage (const std::shared_ptr< const RuleCheckMessage > &msg) noexcept
 
QString formatLength (const Length &length) const noexcept
 

Static Private Member Functions

static PositiveLength maxArcTolerance () noexcept
 

Private Attributes

BoardmBoard
 
const BoardDesignRuleCheckSettingsmSettings
 
bool mIgnorePlanes
 
int mProgressPercent
 
QStringList mProgressStatus
 
RuleCheckMessageList mMessages
 
QHash< QPair< const Layer *, QSet< const NetSignal * > >, ClipperLib::Paths > mCachedPaths
 

Detailed Description

The BoardDesignRuleCheck class checks a librepcb::Board for design rule violations.

Constructor & Destructor Documentation

◆ BoardDesignRuleCheck()

BoardDesignRuleCheck ( Board board,
const BoardDesignRuleCheckSettings settings,
QObject *  parent = nullptr 
)
explicitnoexcept

◆ ~BoardDesignRuleCheck()

~BoardDesignRuleCheck ( )
noexcept

Member Function Documentation

◆ getProgressStatus()

const QStringList& getProgressStatus ( ) const
inlinenoexcept

◆ getMessages()

const RuleCheckMessageList& getMessages ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ execute()

void execute ( bool  quick)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ started

void started ( )
signal
+ Here is the caller graph for this function:

◆ progressPercent

void progressPercent ( int  percent)
signal
+ Here is the caller graph for this function:

◆ progressStatus

void progressStatus ( const QString &  msg)
signal
+ Here is the caller graph for this function:

◆ progressMessage

void progressMessage ( const QString &  msg)
signal
+ Here is the caller graph for this function:

◆ finished

void finished ( )
signal
+ Here is the caller graph for this function:

◆ rebuildPlanes()

void rebuildPlanes ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkCopperCopperClearances()

void checkCopperCopperClearances ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkCopperBoardClearances()

void checkCopperBoardClearances ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkCopperHoleClearances()

void checkCopperHoleClearances ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkDrillDrillClearances()

void checkDrillDrillClearances ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkDrillBoardClearances()

void checkDrillBoardClearances ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkSilkscreenStopmaskClearances()

void checkSilkscreenStopmaskClearances ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumCopperWidth()

void checkMinimumCopperWidth ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumPthAnnularRing()

void checkMinimumPthAnnularRing ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumNpthDrillDiameter()

void checkMinimumNpthDrillDiameter ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumNpthSlotWidth()

void checkMinimumNpthSlotWidth ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumPthDrillDiameter()

void checkMinimumPthDrillDiameter ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumPthSlotWidth()

void checkMinimumPthSlotWidth ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumSilkscreenWidth()

void checkMinimumSilkscreenWidth ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumSilkscreenTextHeight()

void checkMinimumSilkscreenTextHeight ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkZones()

void checkZones ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkVias()

void checkVias ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkAllowedNpthSlots()

void checkAllowedNpthSlots ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkAllowedPthSlots()

void checkAllowedPthSlots ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkInvalidPadConnections()

void checkInvalidPadConnections ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkDeviceClearances()

void checkDeviceClearances ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkBoardOutline()

void checkBoardOutline ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkUsedLayers()

void checkUsedLayers ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkForUnplacedComponents()

void checkForUnplacedComponents ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkForMissingConnections()

void checkForMissingConnections ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkForStaleObjects()

void checkForStaleObjects ( int  progressEnd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkMinimumWidth()

void checkMinimumWidth ( const UnsignedLength minWidth,
std::function< bool(const Layer &)>  layerFilter 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requiresHoleSlotWarning()

bool requiresHoleSlotWarning ( const THole &  hole,
BoardDesignRuleCheckSettings::AllowedSlots  allowed 
)
private
+ Here is the caller graph for this function:

◆ getBoardClearanceArea()

ClipperLib::Paths getBoardClearanceArea ( const UnsignedLength clearance) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBoardOutlines()

QVector< Path > getBoardOutlines ( const QSet< const Layer *> &  layers) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopperPaths()

const ClipperLib::Paths & getCopperPaths ( const Layer layer,
const QSet< const NetSignal *> &  netsignals 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDeviceOutlinePaths()

ClipperLib::Paths getDeviceOutlinePaths ( const BI_Device device,
const Layer layer 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDeviceLocation()

QVector< Path > getDeviceLocation ( const BI_Device device) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getViaLocation()

QVector< Path > getViaLocation ( const BI_Via via) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHoleLocation()

QVector< Path > getHoleLocation ( const THole &  hole,
const Transform transform = Transform() 
) const
privatenoexcept
+ Here is the caller graph for this function:

◆ emitProgress()

void emitProgress ( int  percent)
privatenoexcept
+ Here is the caller graph for this function:

◆ emitStatus()

void emitStatus ( const QString &  status)
privatenoexcept
+ Here is the caller graph for this function:

◆ emitMessage()

void emitMessage ( const std::shared_ptr< const RuleCheckMessage > &  msg)
privatenoexcept
+ Here is the caller graph for this function:

◆ formatLength()

QString formatLength ( const Length length) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maxArcTolerance()

static PositiveLength maxArcTolerance ( )
inlinestaticprivatenoexcept

Returns the maximum allowed arc tolerance when flattening arcs.

+ Here is the caller graph for this function:

Member Data Documentation

◆ mBoard

Board& mBoard
private

◆ mSettings

const BoardDesignRuleCheckSettings& mSettings
private

◆ mIgnorePlanes

bool mIgnorePlanes
private

◆ mProgressPercent

int mProgressPercent
private

◆ mProgressStatus

QStringList mProgressStatus
private

◆ mMessages

RuleCheckMessageList mMessages
private

◆ mCachedPaths

QHash<QPair<const Layer*, QSet<const NetSignal*> >, ClipperLib::Paths> mCachedPaths
private

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