LibrePCB Developers Documentation
BoardPlaneFragmentsBuilder Class Referencefinal

Plane fragments builder working on a librepcb::Board. More...

#include <boardplanefragmentsbuilder.h>

Inherits QObject.

+ Collaboration diagram for BoardPlaneFragmentsBuilder:

Classes

struct  JobData
 
struct  KeepoutZoneData
 
struct  LayerJobResult
 
struct  PadData
 
struct  PlaneData
 
struct  PolygonData
 
struct  Result
 
struct  TraceData
 
struct  ViaData
 

Signals

void started ()
 
void finished (Result result)
 

Public Member Functions

 BoardPlaneFragmentsBuilder (QObject *parent=nullptr) noexcept
 
 BoardPlaneFragmentsBuilder (const BoardPlaneFragmentsBuilder &other)=delete
 
 ~BoardPlaneFragmentsBuilder () noexcept
 
QHash< Uuid, QVector< Path > > runAndApply (Board &board, const QSet< const Layer * > *layers=nullptr)
 Build and apply plane fragments (blocking) More...
 
bool start (Board &board, const QSet< const Layer * > *layers=nullptr) noexcept
 Start building plane fragments asynchronously. More...
 
Result waitForFinished () const noexcept
 Wait until the asynchronous operation is finished. More...
 
bool isBusy () const noexcept
 Check if there is currently a build in progress. More...
 
void cancel () noexcept
 Cancel the current asynchronous job. More...
 
BoardPlaneFragmentsBuilderoperator= (const BoardPlaneFragmentsBuilder &rhs)=delete
 

Private Member Functions

std::shared_ptr< JobDatacreateJob (Board &board, const QSet< const Layer * > *filter) noexcept
 
Result run (QPointer< Board > board, std::shared_ptr< JobData > data) noexcept
 
LayerJobResult runLayer (std::shared_ptr< const JobData > data, const Layer *layer) noexcept
 

Static Private Member Functions

static QVector< std::pair< Point, Angle > > determineThermalSpokes (const PadGeometry &geometry) noexcept
 
static PositiveLength maxArcTolerance () noexcept
 

Private Attributes

QFuture< ResultmFuture
 
bool mAbort
 

Detailed Description

Plane fragments builder working on a librepcb::Board.

Constructor & Destructor Documentation

◆ BoardPlaneFragmentsBuilder() [1/2]

BoardPlaneFragmentsBuilder ( QObject *  parent = nullptr)
explicitnoexcept

◆ BoardPlaneFragmentsBuilder() [2/2]

◆ ~BoardPlaneFragmentsBuilder()

+ Here is the call graph for this function:

Member Function Documentation

◆ runAndApply()

QHash< Uuid, QVector< Path > > runAndApply ( Board board,
const QSet< const Layer * > *  layers = nullptr 
)

Build and apply plane fragments (blocking)

Parameters
boardThe board to rebuild the planes of.
layersIf not nullptr, rebuild only planes which are scheduled to rebuild and located on the given layers (quick rebuild). If nullptr (default), rebuild all planes (more reliable, but slower).
Returns
All calculated plane fragments
Exceptions
Exceptionif any error occurred.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ start()

bool start ( Board board,
const QSet< const Layer * > *  layers = nullptr 
)
noexcept

Start building plane fragments asynchronously.

The calculated fragments will automatically be applied to the board once the rebuild is finished.

Parameters
boardThe board to rebuild the planes of.
layersIf not nullptr, rebuild only planes which are scheduled to rebuild and located on the given layers (quick rebuild). If nullptr (default), rebuild all planes (more reliable, but slower).
Return values
trueIf the build started.
falseIf none of the planes need a rebuild, thus did not start a rebuild.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ waitForFinished()

BoardPlaneFragmentsBuilder::Result waitForFinished ( ) const
noexcept

Wait until the asynchronous operation is finished.

Returns
See librepcb::BoardPlaneFragmentsBuilder::Result
+ Here is the caller graph for this function:

◆ isBusy()

bool isBusy ( ) const
noexcept

Check if there is currently a build in progress.

Return values
trueif a build is in progress.
falseif idle.

◆ cancel()

void cancel ( )
noexcept

Cancel the current asynchronous job.

+ Here is the caller graph for this function:

◆ operator=()

BoardPlaneFragmentsBuilder & operator= ( const BoardPlaneFragmentsBuilder rhs)
delete

◆ started

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

◆ finished

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

◆ createJob()

std::shared_ptr< BoardPlaneFragmentsBuilder::JobData > createJob ( Board board,
const QSet< const Layer * > *  filter 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run()

BoardPlaneFragmentsBuilder::Result run ( QPointer< Board board,
std::shared_ptr< JobData data 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ runLayer()

BoardPlaneFragmentsBuilder::LayerJobResult runLayer ( std::shared_ptr< const JobData data,
const Layer layer 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineThermalSpokes()

QVector< std::pair< Point, Angle > > determineThermalSpokes ( const PadGeometry geometry)
staticprivatenoexcept
+ Here is the call graph for this function:

◆ 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 affects all planes in all existing boards)!

+ Here is the caller graph for this function:

Member Data Documentation

◆ mFuture

QFuture<Result> mFuture
private

◆ mAbort

bool mAbort
private

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