46#define FLASH_OVAL_HOLE 0 
   61                                               bool aGenMap, 
bool aGenTenting, 
REPORTER* aReporter )
 
   74    hole_sets.emplace_back( 
F_Cu, 
B_Cu );
 
   76    for( std::vector<DRILL_LAYER_PAIR>::const_iterator it = hole_sets.begin();
 
   77         it != hole_sets.end();  ++it )
 
   81        bool doing_npth = ( it == hole_sets.end() - 1 );
 
   93            fn.SetPath( aPlotDirectory );
 
   97                wxString fullFilename = fn.GetFullPath();
 
  105                        msg.Printf( 
_( 
"Failed to create file '%s'." ), fullFilename );
 
  116                        msg.Printf( 
_( 
"Created file '%s'." ), fullFilename );
 
  144                fn.SetPath( aPlotDirectory );
 
  146                wxString fullFilename = fn.GetFullPath();
 
  152                        msg.Printf( 
_( 
"Failed to create file '%s'." ), fullFilename );
 
  161                        msg.Printf( 
_( 
"Created file '%s'." ), fullFilename );
 
 
  204    wxString 
text = 
"%TF,FileFunction,Other,";
 
  210        text << wxT( 
"Capping" );
 
  214        text << wxT( 
"Filling" );
 
  218        text << wxT( 
"Covering-Back" );
 
  222        text << wxT( 
"Covering-Front" );
 
  226        text << wxT( 
"Plugging-Back" );
 
  230        text << wxT( 
"Plugging-Front" );
 
  234        text << wxT( 
"Tenting-Back" );
 
  238        text << wxT( 
"Tenting-Front" );
 
  247    text = wxT( 
"%TF.FilePolarity,Positive*%" );
 
  251    if( !plotter.
OpenFile( aFullFilename ) )
 
  268        int  diameter = hole_descr.m_Hole_Diameter;
 
  273            cont = ! hole_descr.m_Hole_Filled;
 
  276            cont = ! hole_descr.m_Hole_Capped;
 
  279            cont = !hole_descr.m_Hole_Bot_Covered;
 
  280            diameter = 
via->GetWidth( 
via->BottomLayer() );
 
  283            cont = ! hole_descr.m_Hole_Top_Covered;
 
  284            diameter = 
via->GetWidth( 
via->TopLayer() );
 
  287            cont = !hole_descr.m_Hole_Bot_Plugged;
 
  290            cont = ! hole_descr.m_Hole_Top_Plugged;
 
  293            cont = ! hole_descr.m_Hole_Bot_Tented;
 
  294            diameter = 
via->GetWidth( 
via->BottomLayer() );
 
  297            cont = ! hole_descr.m_Hole_Top_Tented;
 
  298            diameter = 
via->GetWidth( 
via->TopLayer() );
 
  310        plotter.
FlashPadCircle( hole_descr.m_Hole_Pos, diameter, &gbr_metadata );
 
 
  350    text = wxT( 
"%TF.FilePolarity,Positive*%" );
 
  353    if( !plotter.
OpenFile( aFullFilename ) )
 
  361    bool last_item_is_via = 
true;   
 
  378            if( !last_item_is_via )
 
  384            last_item_is_via = 
true;
 
  388            last_item_is_via = 
false;
 
  418            wxString ref = 
pad->GetParentFootprint()->GetReference();
 
  439            plotter.
ThickSegment( start+hole_pos, 
end+hole_pos, width, &gbr_metadata );
 
 
  467    if( size.
x > size.
y )
 
  469        std::swap( size.
x, size.
y );
 
  473    int deltaxy = size.
y - size.
x;     
 
  474    aStart = 
VECTOR2I( 0, deltaxy / 2 );
 
 
  495                                                bool aMerge_PTH_NPTH )
 const 
  500    fname.SetName( fname.GetName() + wxT( 
"-drl" ) );
 
  502    return fname.GetFullPath();
 
 
  518            if( hole_descr.m_Hole_Filled )
 
  523            if( hole_descr.m_Hole_Capped )
 
  528            if( hole_descr.m_Hole_Bot_Covered )
 
  533            if( hole_descr.m_Hole_Top_Covered )
 
  538            if( hole_descr.m_Hole_Bot_Plugged )
 
  543            if( hole_descr.m_Hole_Top_Plugged )
 
  548            if( hole_descr.m_Hole_Bot_Tented )
 
  553            if( hole_descr.m_Hole_Top_Tented )
 
 
constexpr EDA_IU_SCALE pcbIUScale
 
Information pertinent to a Pcbnew printed circuit board.
 
std::vector< DRILL_LAYER_PAIR > getUniqueLayerPairs() const
Get unique layer pairs by examining the micro and blind_buried vias.
 
virtual const wxString getDrillFileName(DRILL_LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH) const
 
void buildHolesList(DRILL_LAYER_PAIR aLayerPair, bool aGenerateNPTH_list)
Create the list of holes and tools for a given board.
 
const wxString BuildFileFunctionAttributeString(DRILL_LAYER_PAIR aLayerPair, TYPE_FILE aHoleType, bool aCompatNCdrill=false) const
 
wxString m_drillFileExtension
 
virtual const wxString getProtectionFileName(DRILL_LAYER_PAIR aPair, IPC4761_FEATURES aFeature) const
 
std::vector< HOLE_INFO > m_holeListBuffer
 
DRILL_PRECISION m_precision
 
GENDRILL_WRITER_BASE(BOARD *aPcb)
 
bool CreateMapFilesSet(const wxString &aPlotDirectory, REPORTER *aReporter=nullptr)
Create the full set of map files for the board, in PS, PDF ... format (use SetMapFileFormat() to sele...
 
int getHolesCount() const
 
virtual void ThickSegment(const VECTOR2I &start, const VECTOR2I &end, int width, void *aData) override
 
virtual void SetGerberCoordinatesFormat(int aResolution, bool aUseInches=false) override
Selection of Gerber units and resolution (number of digits in mantissa).
 
virtual void FlashPadCircle(const VECTOR2I &pos, int diametre, void *aData) override
Filled circular flashes are stored as apertures.
 
virtual void FlashPadOval(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, void *aData) override
 
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
 
virtual bool EndPlot() override
 
void UseX2format(bool aEnable)
 
void UseX2NetAttributes(bool aEnable)
 
virtual void EndBlock(void *aData) override
Define the end of a group of drawing items the group is started by StartBlock().
 
virtual bool StartPlot(const wxString &pageNumber) override
Write GERBER header to file initialize global variable g_Plot_PlotOutputFile.
 
void DisableApertMacros(bool aDisable)
Disable Aperture Macro (AM) command, only for broken Gerber Readers.
 
bool CreateDrillandMapFilesSet(const wxString &aPlotDirectory, bool aGenDrill, bool aGenMap, bool aGenTenting, REPORTER *aReporter=nullptr)
Create the full set of Excellon drill file for the board filenames are computed from the board name,...
 
virtual const wxString getDrillFileName(DRILL_LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH) const override
 
int createDrillFile(wxString &aFullFilename, bool aIsNpth, DRILL_LAYER_PAIR aLayerPair)
Create an Excellon drill file.
 
void SetFormat(int aRightDigits=6)
Initialize internal parameters to match the given format.
 
GERBER_WRITER(BOARD *aPcb)
 
int createProtectionFile(const wxString &aFullFilename, IPC4761_FEATURES aFeature, DRILL_LAYER_PAIR aLayerPair)
Create a Gerber X2 file for via protection features.
 
bool hasViaType(IPC4761_FEATURES aFeature)
test for an existing via having the given feature IPC4761_FEATURES
 
Handle hole which must be drilled (diameter, position and layers).
 
BOARD_ITEM * m_ItemParent
 
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
 
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
 
virtual void SetCreator(const wxString &aCreator)
 
void AddLineToHeader(const wxString &aExtraString)
Add a line to the list of free lines to print at the beginning of the file.
 
A pure virtual class used to derive REPORTER objects from.
 
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
 
virtual REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the end of the list, for objects that support report ordering.
 
static constexpr EDA_ANGLE ANGLE_90
 
std::pair< PCB_LAYER_ID, PCB_LAYER_ID > DRILL_LAYER_PAIR
 
static void convertOblong2Segment(const VECTOR2I &aSize, const EDA_ANGLE &aOrient, VECTOR2I &aStart, VECTOR2I &aEnd)
 
Classes used in drill files, map files and report files generation.
 
@ PRESSFIT
a PTH with a hole diameter with tight tolerances for press fit pin
 
@ CASTELLATED
a pad with a castellated through hole
 
void AddGerberX2Header(PLOTTER *aPlotter, const BOARD *aBoard, bool aUseX1CompatibilityMode)
Calculate some X2 attributes as defined in the Gerber file format specification J4 (chapter 5) and ad...
 
std::vector< FAB_LAYER_COLOR > dummy
 
wxString result
Test unit parsing edge cases and error handling.
 
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
 
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
 
VECTOR2< int32_t > VECTOR2I