20#ifndef LIBREPCB_CORE_BOARDDESIGNRULECHECK_H
21#define LIBREPCB_CORE_BOARDDESIGNRULECHECK_H
26#include "../../../rulecheck/rulecheckmessage.h"
27#include "../../../utils/transform.h"
30#include <polyclipping/clipper.hpp>
137 std::function<
bool(const
Layer&)> layerFilter);
144 const
Data& data, const QSet<const
Layer*>& layers) noexcept;
154 void emitStatus(const QString& status) noexcept;
The BoardDesignRuleCheck class checks a librepcb::Board for design rule violations.
Definition: boarddesignrulecheck.h:47
int mProgressCounter
Definition: boarddesignrulecheck.h:166
QMutex mMutex
Definition: boarddesignrulecheck.h:164
RuleCheckMessageList checkVias(const Data &data)
Definition: boarddesignrulecheck.cpp:1641
RuleCheckMessageList checkCopperBoardClearances(const Data &data)
Definition: boarddesignrulecheck.cpp:658
RuleCheckMessageList checkBoardOutline(const Data &data)
Definition: boarddesignrulecheck.cpp:1802
RuleCheckMessageList checkMinimumSilkscreenWidth(const Data &data)
Definition: boarddesignrulecheck.cpp:1348
void cancel() noexcept
Cancel the current asynchronous job.
Definition: boarddesignrulecheck.cpp:111
BoardDesignRuleCheck(QObject *parent=nullptr) noexcept
Definition: boarddesignrulecheck.cpp:45
void emitProgress(int percent) noexcept
Definition: boarddesignrulecheck.cpp:2301
RuleCheckMessageList checkMinimumPthSlotWidth(const Data &data)
Definition: boarddesignrulecheck.cpp:1319
bool mAbort
Definition: boarddesignrulecheck.h:168
RuleCheckMessageList checkMinimumNpthDrillDiameter(const Data &data)
Definition: boarddesignrulecheck.cpp:1206
static ClipperLib::Paths getBoardClearanceArea(const Data &data, const UnsignedLength &clearance)
Definition: boarddesignrulecheck.cpp:2155
RuleCheckMessageList checkZones(const Data &data)
Definition: boarddesignrulecheck.cpp:1396
Result waitForFinished() const noexcept
Wait until the asynchronous operation is finished.
Definition: boarddesignrulecheck.cpp:99
void prepareCopperPaths(const Data &data, CalculatedJobData &calcData, const Layer &layer)
Definition: boarddesignrulecheck.cpp:338
RuleCheckMessageList checkCopperCopperClearances(const Data &data)
Definition: boarddesignrulecheck.cpp:348
static ClipperLib::Paths getDeviceOutlinePaths(const Data::Device &device, const Layer &layer)
Definition: boarddesignrulecheck.cpp:2202
RuleCheckMessageList checkMinimumPthDrillDiameter(const Data &data)
Definition: boarddesignrulecheck.cpp:1277
void emitStatus(const QString &status) noexcept
Definition: boarddesignrulecheck.cpp:2306
RuleCheckMessageList checkMinimumSilkscreenTextHeight(const Data &data)
Definition: boarddesignrulecheck.cpp:1366
void progressStatus(const QString &msg)
static PositiveLength maxArcTolerance() noexcept
Definition: boarddesignrulecheck.h:159
RuleCheckMessageList checkMinimumPthAnnularRing(const Data &data, const CalculatedJobData &calcData)
Definition: boarddesignrulecheck.cpp:1137
RuleCheckMessageList(BoardDesignRuleCheck::* Stage2Func)(const Data &, const CalculatedJobData &)
Definition: boarddesignrulecheck.h:98
static QVector< Path > getViaLocation(const Data::Via &via) noexcept
Definition: boarddesignrulecheck.cpp:2286
RuleCheckMessageList checkForMissingConnections(const Data &data)
Definition: boarddesignrulecheck.cpp:1952
std::function< void(const Data &, CalculatedJobData &)> Stage1Func
Definition: boarddesignrulecheck.h:97
RuleCheckMessageList checkDrillDrillClearances(const Data &data)
Definition: boarddesignrulecheck.cpp:864
void progressPercent(int percent)
RuleCheckMessageList checkUsedLayers(const Data &data)
Definition: boarddesignrulecheck.cpp:1879
RuleCheckMessageList(BoardDesignRuleCheck::* IndependentStageFunc)(const Data &)
Definition: boarddesignrulecheck.h:100
int mProgressTotal
Definition: boarddesignrulecheck.h:165
RuleCheckMessageList checkDrillBoardClearances(const Data &data)
Definition: boarddesignrulecheck.cpp:951
static QVector< Path > getDeviceLocation(const Data::Device &device)
Definition: boarddesignrulecheck.cpp:2232
RuleCheckMessageList checkForUnplacedComponents(const Data &data)
Definition: boarddesignrulecheck.cpp:1938
void finished(Result result)
static QVector< Path > getBoardOutlines(const Data &data, const QSet< const Layer * > &layers) noexcept
Definition: boarddesignrulecheck.cpp:2177
Result run(std::shared_ptr< const Data > data) noexcept
Definition: boarddesignrulecheck.cpp:143
QFuture< Result > mFuture
Definition: boarddesignrulecheck.h:167
RuleCheckMessageList checkMinimumCopperWidth(const Data &data)
Definition: boarddesignrulecheck.cpp:1121
std::function< RuleCheckMessageList()> JobFunc
Definition: boarddesignrulecheck.h:96
RuleCheckMessageList checkAllowedNpthSlots(const Data &data)
Definition: boarddesignrulecheck.cpp:1659
static QVector< Path > getTraceLocation(const Data::Trace &trace) noexcept
Definition: boarddesignrulecheck.cpp:2291
void start(Board &board, const BoardDesignRuleCheckSettings &settings, bool quick) noexcept
Definition: boarddesignrulecheck.cpp:57
RuleCheckMessageList checkDeviceClearances(const Data &data)
Definition: boarddesignrulecheck.cpp:1746
static void checkMinimumWidth(RuleCheckMessageList &messages, const Data &data, const UnsignedLength &minWidth, std::function< bool(const Layer &)> layerFilter)
Definition: boarddesignrulecheck.cpp:2015
RuleCheckMessageList checkSilkscreenStopmaskClearances(const Data &data)
Definition: boarddesignrulecheck.cpp:1028
RuleCheckMessageList checkForStaleObjects(const Data &data)
Definition: boarddesignrulecheck.cpp:1992
RuleCheckMessageList checkAllowedPthSlots(const Data &data)
Definition: boarddesignrulecheck.cpp:1692
static bool requiresHoleSlotWarning(const Data::Hole &hole, BoardDesignRuleCheckSettings::AllowedSlots allowed)
Definition: boarddesignrulecheck.cpp:2136
RuleCheckMessageList checkCopperHoleClearances(const Data &data, const CalculatedJobData &calcData)
Definition: boarddesignrulecheck.cpp:807
RuleCheckMessageList checkMinimumNpthSlotWidth(const Data &data)
Definition: boarddesignrulecheck.cpp:1242
RuleCheckMessageList checkInvalidPadConnections(const Data &data)
Definition: boarddesignrulecheck.cpp:1719
Result tryRunJob(JobFunc function, int weight) noexcept
Definition: boarddesignrulecheck.cpp:121
static QVector< Path > getHoleLocation(const Data::Hole &hole, const Transform &transform=Transform()) noexcept
Definition: boarddesignrulecheck.cpp:2296
The BoardDesignRuleCheckSettings class.
Definition: boarddesignrulechecksettings.h:44
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:73
The Device class represents an instance of a component (a "real" component)
Definition: device.h:55
The Hole class.
Definition: hole.h:45
The Layer class provides all supported geometry layers.
Definition: layer.h:42
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition: path.h:58
The Trace class represents a trace within a board.
Definition: trace.h:113
The Via class represents a via of a board.
Definition: via.h:52
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:812
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition: rulecheckmessage.h:104
Definition: boarddesignrulecheck.h:53
QHash< const Layer *, ClipperLib::Paths > copperPathsPerLayer
Definition: boarddesignrulecheck.h:61
QMutex mutex
Definition: boarddesignrulecheck.h:59
Definition: boarddesignrulecheck.h:64
RuleCheckMessageList messages
Definition: boarddesignrulecheck.h:65
QStringList errors
Definition: boarddesignrulecheck.h:66
Input data structure for librepcb::BoardDesignRuleCheck.
Definition: boarddesignrulecheckdata.h:48