LibrePCB Developers Documentation
BoardGerberExport Class Referencefinal

The BoardGerberExport class. More...

#include <boardgerberexport.h>

Inherits QObject.

+ Collaboration diagram for BoardGerberExport:

Public Types

enum class  BoardSide
 
typedef std::pair< const Layer *, const Layer * > LayerPair
 
typedef std::function< void(const FilePath &)> BeforeWriteCallback
 

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 setRemoveObsoleteFiles (bool remove)
 
void setBeforeWriteCallback (BeforeWriteCallback cb)
 
void exportPcbLayers (const BoardFabricationOutputSettings &settings) const
 
void exportComponentLayer (BoardSide side, const Uuid &assemblyVariant, const FilePath &filePath) const
 
BoardGerberExportoperator= (const BoardGerberExport &rhs)=delete
 

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
 
void drawPolygon (GerberGenerator &gen, const Layer &layer, const Path &outline, const UnsignedLength &lineWidth, bool fill, GerberGenerator::Function function, const tl::optional< QString > &net, const QString &component) const
 
QVector< PathgetComponentOutlines (const BI_Device &device, const Layer &layer) const
 
std::unique_ptr< ExcellonGeneratorcreateExcellonGenerator (const BoardFabricationOutputSettings &settings, ExcellonGenerator::Plating plating) const
 
FilePath getOutputFilePath (QString path) const noexcept
 
QString getAttributeValue (const QString &key) const noexcept
 
void trackFileBeforeWrite (const FilePath &fp) const
 

Static Private Member Functions

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

Private Attributes

const ProjectmProject
 
const BoardmBoard
 
bool mRemoveObsoleteFiles
 
BeforeWriteCallback mBeforeWriteCallback
 
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

◆ BeforeWriteCallback

typedef std::function<void(const FilePath&)> BeforeWriteCallback

Member Enumeration Documentation

◆ BoardSide

enum class 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 caller graph for this function:

◆ setRemoveObsoleteFiles()

void setRemoveObsoleteFiles ( bool  remove)
+ Here is the caller graph for this function:

◆ setBeforeWriteCallback()

void setBeforeWriteCallback ( BeforeWriteCallback  cb)
+ 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 Uuid assemblyVariant,
const FilePath filePath 
) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

BoardGerberExport & operator= ( const BoardGerberExport rhs)
delete

◆ 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:

◆ drawPolygon()

void drawPolygon ( GerberGenerator gen,
const Layer layer,
const Path outline,
const UnsignedLength lineWidth,
bool  fill,
GerberGenerator::Function  function,
const tl::optional< QString > &  net,
const QString &  component 
) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getComponentOutlines()

QVector< Path > getComponentOutlines ( 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:

◆ 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:

◆ getAttributeValue()

QString getAttributeValue ( const QString &  key) const
privatenoexcept

◆ trackFileBeforeWrite()

void trackFileBeforeWrite ( const FilePath fp) const
private
+ Here is the caller graph for this function:

◆ calcWidthOfLayer()

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

Member Data Documentation

◆ mProject

const Project& mProject
private

◆ mBoard

const Board& mBoard
private

◆ mRemoveObsoleteFiles

bool mRemoveObsoleteFiles
private

◆ mBeforeWriteCallback

BeforeWriteCallback mBeforeWriteCallback
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: