LibrePCB Developers Documentation
GerberGenerator Class Referencefinal

The GerberGenerator class. More...

#include <gerbergenerator.h>

+ Collaboration diagram for GerberGenerator:

Public Types

using Polarity = GerberAttribute::Polarity
 
using BoardSide = GerberAttribute::BoardSide
 
using CopperSide = GerberAttribute::CopperSide
 
using Function = GerberApertureList::Function
 
using MountType = GerberAttribute::MountType
 

Public Member Functions

 GerberGenerator ()=delete
 
 GerberGenerator (const GerberGenerator &other)=delete
 
 GerberGenerator (const QDateTime &creationDate, const QString &projName, const Uuid &projUuid, const QString &projRevision) noexcept
 
 ~GerberGenerator () noexcept
 
const QString & toStr () const noexcept
 
void setFileFunctionOutlines (bool plated) noexcept
 
void setFileFunctionCopper (int layer, CopperSide side, Polarity polarity) noexcept
 
void setFileFunctionSolderMask (BoardSide side, Polarity polarity) noexcept
 
void setFileFunctionLegend (BoardSide side, Polarity polarity) noexcept
 
void setFileFunctionPaste (BoardSide side, Polarity polarity) noexcept
 
void setFileFunctionComponent (int layer, BoardSide side) noexcept
 
void setLayerPolarity (Polarity p) noexcept
 
void drawLine (const Point &start, const Point &end, const UnsignedLength &width, Function function, const tl::optional< QString > &net, const QString &component) noexcept
 
void drawPathOutline (const Path &path, const UnsignedLength &lineWidth, Function function, const tl::optional< QString > &net, const QString &component) noexcept
 
void drawPathArea (const Path &path, Function function, const tl::optional< QString > &net, const QString &component) noexcept
 
void drawComponentOutline (const Path &path, const Angle &rot, const QString &designator, const QString &value, MountType mountType, const QString &manufacturer, const QString &mpn, const QString &footprintName, Function function) noexcept
 
void flashCircle (const Point &pos, const PositiveLength &dia, Function function, const tl::optional< QString > &net, const QString &component, const QString &pin, const QString &signal) noexcept
 
void flashRect (const Point &pos, const PositiveLength &w, const PositiveLength &h, const UnsignedLength &radius, const Angle &rot, Function function, const tl::optional< QString > &net, const QString &component, const QString &pin, const QString &signal) noexcept
 
void flashObround (const Point &pos, const PositiveLength &w, const PositiveLength &h, const Angle &rot, Function function, const tl::optional< QString > &net, const QString &component, const QString &pin, const QString &signal) noexcept
 
void flashOctagon (const Point &pos, const PositiveLength &w, const PositiveLength &h, const UnsignedLength &radius, const Angle &rot, Function function, const tl::optional< QString > &net, const QString &component, const QString &pin, const QString &signal) noexcept
 
void flashOutline (const Point &pos, const StraightAreaPath &path, const Angle &rot, Function function, const tl::optional< QString > &net, const QString &component, const QString &pin, const QString &signal) noexcept
 
void flashComponent (const Point &pos, const Angle &rot, const QString &designator, const QString &value, MountType mountType, const QString &manufacturer, const QString &mpn, const QString &footprintName) noexcept
 
void flashComponentPin (const Point &pos, const Angle &rot, const QString &designator, const QString &value, MountType mountType, const QString &manufacturer, const QString &mpn, const QString &footprintName, const QString &pin, const QString &signal, bool isPin1) noexcept
 
void generate ()
 
void saveToFile (const FilePath &filepath) const
 
GerberGeneratoroperator= (const GerberGenerator &rhs)=delete
 

Private Member Functions

void setCurrentAttributes (Function apertureFunction, const tl::optional< QString > &netName, const QString &componentDesignator, const QString &pinName, const QString &pinSignal, const QString &componentValue, const tl::optional< MountType > &componentMountType, const QString &componentManufacturer, const QString &componentMpn, const QString &componentFootprint, const tl::optional< Angle > &componentRotation) noexcept
 
void setCurrentAperture (int number) noexcept
 
void setRegionModeOn () noexcept
 
void setRegionModeOff () noexcept
 
void switchToLinearInterpolationModeG01 () noexcept
 
void switchToCircularCwInterpolationModeG02 () noexcept
 
void switchToCircularCcwInterpolationModeG03 () noexcept
 
void moveToPosition (const Point &pos) noexcept
 
void linearInterpolateToPosition (const Point &pos) noexcept
 
void circularInterpolateToPosition (const Point &start, const Point &center, const Point &end) noexcept
 
void interpolateBetween (const Vertex &from, const Vertex &to) noexcept
 
void flashAtPosition (const Point &pos) noexcept
 
void printHeader () noexcept
 
void printApertureList () noexcept
 
void printContent () noexcept
 
void printFooter () noexcept
 
QString calcOutputMd5Checksum () const noexcept
 

Private Attributes

QVector< GerberAttributemFileAttributes
 
QString mOutput
 
QString mContent
 
QScopedPointer< GerberAttributeWritermAttributeWriter
 
QScopedPointer< GerberApertureListmApertureList
 
int mCurrentApertureNumber
 

Detailed Description

The GerberGenerator class.

Member Typedef Documentation

◆ Polarity

◆ BoardSide

◆ CopperSide

◆ Function

◆ MountType

Constructor & Destructor Documentation

◆ GerberGenerator() [1/3]

GerberGenerator ( )
delete

◆ GerberGenerator() [2/3]

GerberGenerator ( const GerberGenerator other)
delete

◆ GerberGenerator() [3/3]

GerberGenerator ( const QDateTime &  creationDate,
const QString &  projName,
const Uuid projUuid,
const QString &  projRevision 
)
noexcept
+ Here is the call graph for this function:

◆ ~GerberGenerator()

~GerberGenerator ( )
noexcept

Member Function Documentation

◆ toStr()

const QString & toStr ( ) const
inlinenoexcept

◆ setFileFunctionOutlines()

void setFileFunctionOutlines ( bool  plated)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFileFunctionCopper()

void setFileFunctionCopper ( int  layer,
CopperSide  side,
Polarity  polarity 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFileFunctionSolderMask()

void setFileFunctionSolderMask ( BoardSide  side,
Polarity  polarity 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFileFunctionLegend()

void setFileFunctionLegend ( BoardSide  side,
Polarity  polarity 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFileFunctionPaste()

void setFileFunctionPaste ( BoardSide  side,
Polarity  polarity 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFileFunctionComponent()

void setFileFunctionComponent ( int  layer,
BoardSide  side 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLayerPolarity()

void setLayerPolarity ( Polarity  p)
noexcept
+ Here is the caller graph for this function:

◆ drawLine()

void drawLine ( const Point start,
const Point end,
const UnsignedLength width,
Function  function,
const tl::optional< QString > &  net,
const QString &  component 
)
noexcept
+ Here is the caller graph for this function:

◆ drawPathOutline()

void drawPathOutline ( const Path path,
const UnsignedLength lineWidth,
Function  function,
const tl::optional< QString > &  net,
const QString &  component 
)
noexcept
+ Here is the caller graph for this function:

◆ drawPathArea()

void drawPathArea ( const Path path,
Function  function,
const tl::optional< QString > &  net,
const QString &  component 
)
noexcept
+ Here is the caller graph for this function:

◆ drawComponentOutline()

void drawComponentOutline ( const Path path,
const Angle rot,
const QString &  designator,
const QString &  value,
MountType  mountType,
const QString &  manufacturer,
const QString &  mpn,
const QString &  footprintName,
Function  function 
)
noexcept
+ Here is the caller graph for this function:

◆ flashCircle()

void flashCircle ( const Point pos,
const PositiveLength dia,
Function  function,
const tl::optional< QString > &  net,
const QString &  component,
const QString &  pin,
const QString &  signal 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flashRect()

void flashRect ( const Point pos,
const PositiveLength w,
const PositiveLength h,
const UnsignedLength radius,
const Angle rot,
Function  function,
const tl::optional< QString > &  net,
const QString &  component,
const QString &  pin,
const QString &  signal 
)
noexcept
+ Here is the caller graph for this function:

◆ flashObround()

void flashObround ( const Point pos,
const PositiveLength w,
const PositiveLength h,
const Angle rot,
Function  function,
const tl::optional< QString > &  net,
const QString &  component,
const QString &  pin,
const QString &  signal 
)
noexcept
+ Here is the caller graph for this function:

◆ flashOctagon()

void flashOctagon ( const Point pos,
const PositiveLength w,
const PositiveLength h,
const UnsignedLength radius,
const Angle rot,
Function  function,
const tl::optional< QString > &  net,
const QString &  component,
const QString &  pin,
const QString &  signal 
)
noexcept
+ Here is the caller graph for this function:

◆ flashOutline()

void flashOutline ( const Point pos,
const StraightAreaPath path,
const Angle rot,
Function  function,
const tl::optional< QString > &  net,
const QString &  component,
const QString &  pin,
const QString &  signal 
)
noexcept
+ Here is the caller graph for this function:

◆ flashComponent()

void flashComponent ( const Point pos,
const Angle rot,
const QString &  designator,
const QString &  value,
MountType  mountType,
const QString &  manufacturer,
const QString &  mpn,
const QString &  footprintName 
)
noexcept
+ Here is the caller graph for this function:

◆ flashComponentPin()

void flashComponentPin ( const Point pos,
const Angle rot,
const QString &  designator,
const QString &  value,
MountType  mountType,
const QString &  manufacturer,
const QString &  mpn,
const QString &  footprintName,
const QString &  pin,
const QString &  signal,
bool  isPin1 
)
noexcept
+ Here is the caller graph for this function:

◆ generate()

void generate ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveToFile()

void saveToFile ( const FilePath filepath) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

GerberGenerator & operator= ( const GerberGenerator rhs)
delete

◆ setCurrentAttributes()

void setCurrentAttributes ( Function  apertureFunction,
const tl::optional< QString > &  netName,
const QString &  componentDesignator,
const QString &  pinName,
const QString &  pinSignal,
const QString &  componentValue,
const tl::optional< MountType > &  componentMountType,
const QString &  componentManufacturer,
const QString &  componentMpn,
const QString &  componentFootprint,
const tl::optional< Angle > &  componentRotation 
)
privatenoexcept
+ Here is the call graph for this function:

◆ setCurrentAperture()

void setCurrentAperture ( int  number)
privatenoexcept

◆ setRegionModeOn()

void setRegionModeOn ( )
privatenoexcept

◆ setRegionModeOff()

void setRegionModeOff ( )
privatenoexcept

◆ switchToLinearInterpolationModeG01()

void switchToLinearInterpolationModeG01 ( )
privatenoexcept

◆ switchToCircularCwInterpolationModeG02()

void switchToCircularCwInterpolationModeG02 ( )
privatenoexcept

◆ switchToCircularCcwInterpolationModeG03()

void switchToCircularCcwInterpolationModeG03 ( )
privatenoexcept

◆ moveToPosition()

void moveToPosition ( const Point pos)
privatenoexcept

◆ linearInterpolateToPosition()

void linearInterpolateToPosition ( const Point pos)
privatenoexcept

◆ circularInterpolateToPosition()

void circularInterpolateToPosition ( const Point start,
const Point center,
const Point end 
)
privatenoexcept
+ Here is the call graph for this function:

◆ interpolateBetween()

void interpolateBetween ( const Vertex from,
const Vertex to 
)
privatenoexcept
+ Here is the call graph for this function:

◆ flashAtPosition()

void flashAtPosition ( const Point pos)
privatenoexcept

◆ printHeader()

void printHeader ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printApertureList()

void printApertureList ( )
privatenoexcept
+ Here is the caller graph for this function:

◆ printContent()

void printContent ( )
privatenoexcept
+ Here is the caller graph for this function:

◆ printFooter()

void printFooter ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcOutputMd5Checksum()

QString calcOutputMd5Checksum ( ) const
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mFileAttributes

QVector<GerberAttribute> mFileAttributes
private

◆ mOutput

QString mOutput
private

◆ mContent

QString mContent
private

◆ mAttributeWriter

QScopedPointer<GerberAttributeWriter> mAttributeWriter
private

◆ mApertureList

QScopedPointer<GerberApertureList> mApertureList
private

◆ mCurrentApertureNumber

int mCurrentApertureNumber
private

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