LibrePCB Developers Documentation
BoardGerberExport Class Referencefinal

The BoardGerberExport class. More...

#include <boardgerberexport.h>

+ Inheritance diagram for BoardGerberExport:
+ Collaboration diagram for BoardGerberExport:

Public Types

enum  BoardSide
 
typedef std::pair< const Layer *, const Layer * > LayerPair
 

Signals

void attributesChanged () override
 
- Signals inherited from AttributeProvider
virtual void attributesChanged ()=0
 This signal is emitted when the value of attributes has changed. More...
 

Public Member Functions

 BoardGerberExport ()=delete
 
 BoardGerberExport (const BoardGerberExport &other)=delete
 
 BoardGerberExport (const Board &board) noexcept
 
 ~BoardGerberExport () noexcept
 
FilePath getOutputDirectory (const BoardFabricationOutputSettings &settings) const noexcept
 
const QVector< FilePath > & getWrittenFiles () const noexcept
 
void exportPcbLayers (const BoardFabricationOutputSettings &settings) const
 
void exportComponentLayer (BoardSide side, const FilePath &filePath) const
 
QString getBuiltInAttributeValue (const QString &key) const noexcept override
 Get the value of a built-in attribute (if available) More...
 
QVector< const AttributeProvider * > getAttributeProviderParents () const noexcept override
 Get all parent attribute providers (fallback if attribute not found) More...
 
BoardGerberExportoperator= (const BoardGerberExport &rhs)=delete
 
- Public Member Functions inherited from AttributeProvider
 AttributeProvider () noexcept
 
 AttributeProvider (const AttributeProvider &other)=delete
 
AttributeProvideroperator= (const AttributeProvider &rhs)=delete
 
virtual ~AttributeProvider () noexcept
 
QString getAttributeValue (const QString &key) const noexcept
 Get the value of an attribute which can be used in texts (like "{{NAME}}") More...
 
virtual QString getUserDefinedAttributeValue (const QString &key) const noexcept
 Get the value of a user defined attribute (if available) More...
 

Private Member Functions

void exportDrillsMerged (const BoardFabricationOutputSettings &settings) const
 
void exportDrillsNpth (const BoardFabricationOutputSettings &settings) const
 
void exportDrillsPth (const BoardFabricationOutputSettings &settings) const
 
void exportDrillsBlindBuried (const BoardFabricationOutputSettings &settings) const
 
void exportLayerBoardOutlines (const BoardFabricationOutputSettings &settings) const
 
void exportLayerTopCopper (const BoardFabricationOutputSettings &settings) const
 
void exportLayerInnerCopper (const BoardFabricationOutputSettings &settings) const
 
void exportLayerBottomCopper (const BoardFabricationOutputSettings &settings) const
 
void exportLayerTopSolderMask (const BoardFabricationOutputSettings &settings) const
 
void exportLayerBottomSolderMask (const BoardFabricationOutputSettings &settings) const
 
void exportLayerTopSilkscreen (const BoardFabricationOutputSettings &settings) const
 
void exportLayerBottomSilkscreen (const BoardFabricationOutputSettings &settings) const
 
void exportLayerTopSolderPaste (const BoardFabricationOutputSettings &settings) const
 
void exportLayerBottomSolderPaste (const BoardFabricationOutputSettings &settings) const
 
int drawNpthDrills (ExcellonGenerator &gen) const
 
int drawPthDrills (ExcellonGenerator &gen) const
 
QMap< LayerPair, QList< const BI_Via * > > getBlindBuriedVias () const
 
void drawLayer (GerberGenerator &gen, const Layer &layer) const
 
void drawVia (GerberGenerator &gen, const BI_Via &via, const Layer &layer, const QString &netName) const
 
void drawDevice (GerberGenerator &gen, const BI_Device &device, const Layer &layer) const
 
void drawFootprintPad (GerberGenerator &gen, const BI_FootprintPad &pad, const Layer &layer) const
 
std::unique_ptr< ExcellonGeneratorcreateExcellonGenerator (const BoardFabricationOutputSettings &settings, ExcellonGenerator::Plating plating) const
 
FilePath getOutputFilePath (QString path) const noexcept
 

Static Private Member Functions

static UnsignedLength calcWidthOfLayer (const UnsignedLength &width, const Layer &layer) noexcept
 

Private Attributes

const ProjectmProject
 
const BoardmBoard
 
QDateTime mCreationDateTime
 
QString mProjectName
 
int mCurrentInnerCopperLayer
 
const LayermCurrentStartLayer
 
const LayermCurrentEndLayer
 
QVector< FilePathmWrittenFiles
 

Detailed Description

The BoardGerberExport class.

Member Typedef Documentation

◆ LayerPair

typedef std::pair<const Layer*, const Layer*> LayerPair

Member Enumeration Documentation

◆ BoardSide

enum BoardSide
strong
Enumerator
Top 
Bottom 

Constructor & Destructor Documentation

◆ BoardGerberExport() [1/3]

BoardGerberExport ( )
delete

◆ BoardGerberExport() [2/3]

BoardGerberExport ( const BoardGerberExport other)
delete

◆ BoardGerberExport() [3/3]

BoardGerberExport ( const Board board)
explicitnoexcept

◆ ~BoardGerberExport()

~BoardGerberExport ( )
noexcept

Member Function Documentation

◆ getOutputDirectory()

FilePath getOutputDirectory ( const BoardFabricationOutputSettings settings) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWrittenFiles()

const QVector<FilePath>& getWrittenFiles ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportPcbLayers()

void exportPcbLayers ( const BoardFabricationOutputSettings settings) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportComponentLayer()

void exportComponentLayer ( BoardSide  side,
const FilePath filePath 
) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBuiltInAttributeValue()

QString getBuiltInAttributeValue ( const QString &  key) const
overridevirtualnoexcept

Get the value of a built-in attribute (if available)

Parameters
keyThe attribute name (e.g. "NAME" for "{{NAME}}")
Returns
The value of the attribute (empty string if not found)

Reimplemented from AttributeProvider.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAttributeProviderParents()

QVector< const AttributeProvider * > getAttributeProviderParents ( ) const
overridevirtualnoexcept

Get all parent attribute providers (fallback if attribute not found)

Returns
All parent attribute provider objects (empty and nullptr are allowed)

Reimplemented from AttributeProvider.

+ Here is the caller graph for this function:

◆ operator=()

BoardGerberExport& operator= ( const BoardGerberExport rhs)
delete
+ Here is the caller graph for this function:

◆ attributesChanged

void attributesChanged ( )
overridesignal
+ Here is the caller graph for this function:

◆ exportDrillsMerged()

void exportDrillsMerged ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportDrillsNpth()

void exportDrillsNpth ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportDrillsPth()

void exportDrillsPth ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportDrillsBlindBuried()

void exportDrillsBlindBuried ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerBoardOutlines()

void exportLayerBoardOutlines ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerTopCopper()

void exportLayerTopCopper ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerInnerCopper()

void exportLayerInnerCopper ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerBottomCopper()

void exportLayerBottomCopper ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerTopSolderMask()

void exportLayerTopSolderMask ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerBottomSolderMask()

void exportLayerBottomSolderMask ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerTopSilkscreen()

void exportLayerTopSilkscreen ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerBottomSilkscreen()

void exportLayerBottomSilkscreen ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerTopSolderPaste()

void exportLayerTopSolderPaste ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportLayerBottomSolderPaste()

void exportLayerBottomSolderPaste ( const BoardFabricationOutputSettings settings) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawNpthDrills()

int drawNpthDrills ( ExcellonGenerator gen) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawPthDrills()

int drawPthDrills ( ExcellonGenerator gen) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBlindBuriedVias()

QMap< BoardGerberExport::LayerPair, QList< const BI_Via * > > getBlindBuriedVias ( ) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawLayer()

void drawLayer ( GerberGenerator gen,
const Layer layer 
) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawVia()

void drawVia ( GerberGenerator gen,
const BI_Via via,
const Layer layer,
const QString &  netName 
) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawDevice()

void drawDevice ( GerberGenerator gen,
const BI_Device device,
const Layer layer 
) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawFootprintPad()

void drawFootprintPad ( GerberGenerator gen,
const BI_FootprintPad pad,
const Layer layer 
) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createExcellonGenerator()

std::unique_ptr< ExcellonGenerator > createExcellonGenerator ( const BoardFabricationOutputSettings settings,
ExcellonGenerator::Plating  plating 
) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOutputFilePath()

FilePath getOutputFilePath ( QString  path) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcWidthOfLayer()

UnsignedLength calcWidthOfLayer ( const UnsignedLength width,
const Layer layer 
)
staticprivatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mProject

const Project& mProject
private

◆ mBoard

const Board& mBoard
private

◆ mCreationDateTime

QDateTime mCreationDateTime
private

◆ mProjectName

QString mProjectName
private

◆ mCurrentInnerCopperLayer

int mCurrentInnerCopperLayer
mutableprivate

◆ mCurrentStartLayer

const Layer* mCurrentStartLayer
mutableprivate

◆ mCurrentEndLayer

const Layer* mCurrentEndLayer
mutableprivate

◆ mWrittenFiles

QVector<FilePath> mWrittenFiles
mutableprivate

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