20#ifndef LIBREPCB_CORE_BOARDPLANEFRAGMENTSBUILDER_H
21#define LIBREPCB_CORE_BOARDPLANEFRAGMENTSBUILDER_H
26#include "../../geometry/path.h"
27#include "../../geometry/zone.h"
28#include "../../types/uuid.h"
29#include "../../utils/transform.h"
32#include <polyclipping/clipper.hpp>
130 bool isBusy() const noexcept;
213 QList<std::tuple<Transform, PositiveLength, NonEmptyPath>>
holes;
224 const QSet<const Layer*>* filter)
noexcept;
225 Result run(QPointer<Board>
board, std::shared_ptr<JobData> data)
noexcept;
227 const Layer* layer)
noexcept;
ConnectStyle
Definition: bi_plane.h:68
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:73
Plane fragments builder working on a librepcb::Board.
Definition: boardplanefragmentsbuilder.h:55
std::shared_ptr< JobData > createJob(Board &board, const QSet< const Layer * > *filter) noexcept
Definition: boardplanefragmentsbuilder.cpp:152
void cancel() noexcept
Cancel the current asynchronous job.
Definition: boardplanefragmentsbuilder.cpp:141
bool isBusy() const noexcept
Check if there is currently a build in progress.
Definition: boardplanefragmentsbuilder.cpp:136
bool mAbort
Definition: boardplanefragmentsbuilder.h:242
static PositiveLength maxArcTolerance() noexcept
Definition: boardplanefragmentsbuilder.h:236
Result waitForFinished() const noexcept
Wait until the asynchronous operation is finished.
Definition: boardplanefragmentsbuilder.cpp:131
LayerJobResult runLayer(std::shared_ptr< const JobData > data, const Layer *layer) noexcept
Definition: boardplanefragmentsbuilder.cpp:426
QFuture< Result > mFuture
Definition: boardplanefragmentsbuilder.h:241
bool start(Board &board, const QSet< const Layer * > *layers=nullptr) noexcept
Start building plane fragments asynchronously.
Definition: boardplanefragmentsbuilder.cpp:114
Result run(QPointer< Board > board, std::shared_ptr< JobData > data) noexcept
Definition: boardplanefragmentsbuilder.cpp:286
static QVector< std::pair< Point, Angle > > determineThermalSpokes(const PadGeometry &geometry) noexcept
Definition: boardplanefragmentsbuilder.cpp:812
QHash< Uuid, QVector< Path > > runAndApply(Board &board, const QSet< const Layer * > *layers=nullptr)
Build and apply plane fragments (blocking)
Definition: boardplanefragmentsbuilder.cpp:103
The Layer class provides all supported geometry layers.
Definition: layer.h:42
The PadGeometry class describes the shape of a pad.
Definition: padgeometry.h:46
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition: path.h:58
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
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
Definition: boardplanefragmentsbuilder.h:199
std::shared_ptr< ClipperLib::Paths > boardArea
Definition: boardplanefragmentsbuilder.h:215
QList< std::tuple< Transform, PositiveLength, NonEmptyPath > > holes
Definition: boardplanefragmentsbuilder.h:213
QList< const Layer * > layers
Definition: boardplanefragmentsbuilder.h:207
QList< PolygonData > polygons
Definition: boardplanefragmentsbuilder.h:210
QList< TraceData > traces
Definition: boardplanefragmentsbuilder.h:214
QList< KeepoutZoneData > keepoutZones
Definition: boardplanefragmentsbuilder.h:209
QList< PlaneData > planes
Definition: boardplanefragmentsbuilder.h:208
QList< ViaData > vias
Definition: boardplanefragmentsbuilder.h:211
QList< PadData > pads
Definition: boardplanefragmentsbuilder.h:212
Definition: boardplanefragmentsbuilder.h:160
QSet< const Layer * > boardLayers
Definition: boardplanefragmentsbuilder.h:163
Transform transform
Definition: boardplanefragmentsbuilder.h:161
Zone::Layers layers
Definition: boardplanefragmentsbuilder.h:162
Path outline
Definition: boardplanefragmentsbuilder.h:164
Definition: boardplanefragmentsbuilder.h:218
QHash< Uuid, QVector< Path > > planes
Definition: boardplanefragmentsbuilder.h:219
QStringList errors
Definition: boardplanefragmentsbuilder.h:220
Definition: boardplanefragmentsbuilder.h:184
Transform transform
Definition: boardplanefragmentsbuilder.h:185
tl::optional< Uuid > netSignal
Definition: boardplanefragmentsbuilder.h:186
QHash< const Layer *, QList< PadGeometry > > geometries
Definition: boardplanefragmentsbuilder.h:188
UnsignedLength clearance
Definition: boardplanefragmentsbuilder.h:187
Definition: boardplanefragmentsbuilder.h:146
Uuid uuid
Definition: boardplanefragmentsbuilder.h:147
tl::optional< Uuid > netSignal
Definition: boardplanefragmentsbuilder.h:149
bool keepIslands
Definition: boardplanefragmentsbuilder.h:153
Path outline
Definition: boardplanefragmentsbuilder.h:150
UnsignedLength minClearance
Definition: boardplanefragmentsbuilder.h:152
UnsignedLength minWidth
Definition: boardplanefragmentsbuilder.h:151
PositiveLength thermalSpokeWidth
Definition: boardplanefragmentsbuilder.h:157
BI_Plane::ConnectStyle connectStyle
Definition: boardplanefragmentsbuilder.h:155
int priority
Definition: boardplanefragmentsbuilder.h:154
const Layer * layer
Definition: boardplanefragmentsbuilder.h:148
PositiveLength thermalGap
Definition: boardplanefragmentsbuilder.h:156
Definition: boardplanefragmentsbuilder.h:167
UnsignedLength width
Definition: boardplanefragmentsbuilder.h:172
bool filled
Definition: boardplanefragmentsbuilder.h:173
Transform transform
Definition: boardplanefragmentsbuilder.h:168
tl::optional< Uuid > netSignal
Definition: boardplanefragmentsbuilder.h:170
Path path
Definition: boardplanefragmentsbuilder.h:171
const Layer * layer
Definition: boardplanefragmentsbuilder.h:169
Definition: boardplanefragmentsbuilder.h:60
bool applyToBoard() noexcept
Definition: boardplanefragmentsbuilder.cpp:68
void throwOnError() const
Convenience error handling.
Definition: boardplanefragmentsbuilder.cpp:58
QHash< Uuid, QVector< Path > > planes
The calculated plane fragments.
Definition: boardplanefragmentsbuilder.h:63
bool finished
Whether the run completed or was aborted.
Definition: boardplanefragmentsbuilder.h:65
QStringList errors
Any occurred errors (empty on success)
Definition: boardplanefragmentsbuilder.h:64
QPointer< Board > board
The board of the calculated planes.
Definition: boardplanefragmentsbuilder.h:61
QSet< const Layer * > layers
All processed layers.
Definition: boardplanefragmentsbuilder.h:62
Definition: boardplanefragmentsbuilder.h:191
Point startPos
Definition: boardplanefragmentsbuilder.h:194
tl::optional< Uuid > netSignal
Definition: boardplanefragmentsbuilder.h:193
Point endPos
Definition: boardplanefragmentsbuilder.h:195
const Layer * layer
Definition: boardplanefragmentsbuilder.h:192
PositiveLength width
Definition: boardplanefragmentsbuilder.h:196
Definition: boardplanefragmentsbuilder.h:176
tl::optional< Uuid > netSignal
Definition: boardplanefragmentsbuilder.h:177
const Layer * endLayer
Definition: boardplanefragmentsbuilder.h:181
PositiveLength diameter
Definition: boardplanefragmentsbuilder.h:179
const Layer * startLayer
Definition: boardplanefragmentsbuilder.h:180
Point position
Definition: boardplanefragmentsbuilder.h:178