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:1637
RuleCheckMessageList checkCopperBoardClearances(const Data &data)
Definition boarddesignrulecheck.cpp:654
RuleCheckMessageList checkBoardOutline(const Data &data)
Definition boarddesignrulecheck.cpp:1798
RuleCheckMessageList checkMinimumSilkscreenWidth(const Data &data)
Definition boarddesignrulecheck.cpp:1344
void cancel() noexcept
Cancel the current asynchronous job.
Definition boarddesignrulecheck.cpp:107
void emitProgress(int percent) noexcept
Definition boarddesignrulecheck.cpp:2297
RuleCheckMessageList checkMinimumPthSlotWidth(const Data &data)
Definition boarddesignrulecheck.cpp:1315
bool mAbort
Definition boarddesignrulecheck.h:168
RuleCheckMessageList checkMinimumNpthDrillDiameter(const Data &data)
Definition boarddesignrulecheck.cpp:1202
static ClipperLib::Paths getBoardClearanceArea(const Data &data, const UnsignedLength &clearance)
Definition boarddesignrulecheck.cpp:2151
RuleCheckMessageList checkZones(const Data &data)
Definition boarddesignrulecheck.cpp:1392
Result waitForFinished() const noexcept
Wait until the asynchronous operation is finished.
Definition boarddesignrulecheck.cpp:95
void prepareCopperPaths(const Data &data, CalculatedJobData &calcData, const Layer &layer)
Definition boarddesignrulecheck.cpp:334
RuleCheckMessageList checkCopperCopperClearances(const Data &data)
Definition boarddesignrulecheck.cpp:344
static ClipperLib::Paths getDeviceOutlinePaths(const Data::Device &device, const Layer &layer)
Definition boarddesignrulecheck.cpp:2198
RuleCheckMessageList checkMinimumPthDrillDiameter(const Data &data)
Definition boarddesignrulecheck.cpp:1273
void emitStatus(const QString &status) noexcept
Definition boarddesignrulecheck.cpp:2302
RuleCheckMessageList checkMinimumSilkscreenTextHeight(const Data &data)
Definition boarddesignrulecheck.cpp:1362
void progressStatus(const QString &msg)
static PositiveLength maxArcTolerance() noexcept
Definition boarddesignrulecheck.h:159
RuleCheckMessageList checkMinimumPthAnnularRing(const Data &data, const CalculatedJobData &calcData)
Definition boarddesignrulecheck.cpp:1133
RuleCheckMessageList(BoardDesignRuleCheck::* Stage2Func)(const Data &, const CalculatedJobData &)
Definition boarddesignrulecheck.h:98
static QVector< Path > getViaLocation(const Data::Via &via) noexcept
Definition boarddesignrulecheck.cpp:2282
RuleCheckMessageList checkForMissingConnections(const Data &data)
Definition boarddesignrulecheck.cpp:1948
std::function< void(const Data &, CalculatedJobData &)> Stage1Func
Definition boarddesignrulecheck.h:97
RuleCheckMessageList checkDrillDrillClearances(const Data &data)
Definition boarddesignrulecheck.cpp:860
void progressPercent(int percent)
RuleCheckMessageList checkUsedLayers(const Data &data)
Definition boarddesignrulecheck.cpp:1875
RuleCheckMessageList(BoardDesignRuleCheck::* IndependentStageFunc)(const Data &)
Definition boarddesignrulecheck.h:100
int mProgressTotal
Definition boarddesignrulecheck.h:165
RuleCheckMessageList checkDrillBoardClearances(const Data &data)
Definition boarddesignrulecheck.cpp:947
static QVector< Path > getDeviceLocation(const Data::Device &device)
Definition boarddesignrulecheck.cpp:2228
RuleCheckMessageList checkForUnplacedComponents(const Data &data)
Definition boarddesignrulecheck.cpp:1934
void finished(Result result)
static QVector< Path > getBoardOutlines(const Data &data, const QSet< const Layer * > &layers) noexcept
Definition boarddesignrulecheck.cpp:2173
Result run(std::shared_ptr< const Data > data) noexcept
Definition boarddesignrulecheck.cpp:139
QFuture< Result > mFuture
Definition boarddesignrulecheck.h:167
RuleCheckMessageList checkMinimumCopperWidth(const Data &data)
Definition boarddesignrulecheck.cpp:1117
std::function< RuleCheckMessageList()> JobFunc
Definition boarddesignrulecheck.h:96
RuleCheckMessageList checkAllowedNpthSlots(const Data &data)
Definition boarddesignrulecheck.cpp:1655
static QVector< Path > getTraceLocation(const Data::Trace &trace) noexcept
Definition boarddesignrulecheck.cpp:2287
void start(Board &board, const BoardDesignRuleCheckSettings &settings, bool quick) noexcept
Definition boarddesignrulecheck.cpp:57
RuleCheckMessageList checkDeviceClearances(const Data &data)
Definition boarddesignrulecheck.cpp:1742
static void checkMinimumWidth(RuleCheckMessageList &messages, const Data &data, const UnsignedLength &minWidth, std::function< bool(const Layer &)> layerFilter)
Definition boarddesignrulecheck.cpp:2011
RuleCheckMessageList checkSilkscreenStopmaskClearances(const Data &data)
Definition boarddesignrulecheck.cpp:1024
RuleCheckMessageList checkForStaleObjects(const Data &data)
Definition boarddesignrulecheck.cpp:1988
RuleCheckMessageList checkAllowedPthSlots(const Data &data)
Definition boarddesignrulecheck.cpp:1688
static bool requiresHoleSlotWarning(const Data::Hole &hole, BoardDesignRuleCheckSettings::AllowedSlots allowed)
Definition boarddesignrulecheck.cpp:2132
RuleCheckMessageList checkCopperHoleClearances(const Data &data, const CalculatedJobData &calcData)
Definition boarddesignrulecheck.cpp:803
RuleCheckMessageList checkMinimumNpthSlotWidth(const Data &data)
Definition boarddesignrulecheck.cpp:1238
RuleCheckMessageList checkInvalidPadConnections(const Data &data)
Definition boarddesignrulecheck.cpp:1715
Result tryRunJob(JobFunc function, int weight) noexcept
Definition boarddesignrulecheck.cpp:117
static QVector< Path > getHoleLocation(const Data::Hole &hole, const Transform &transform=Transform()) noexcept
Definition boarddesignrulecheck.cpp:2292
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:57
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:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
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