KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EXCELLON_WRITER Class Reference

Create Excellon drill, drill map, and drill report files. More...

#include <gendrill_Excellon_writer.h>

Inheritance diagram for EXCELLON_WRITER:
GENDRILL_WRITER_BASE

Public Types

enum  ZEROS_FMT { DECIMAL_FORMAT , SUPPRESS_LEADING , SUPPRESS_TRAILING , KEEP_ZEROS }
 
enum  TYPE_FILE { PTH_FILE , NPTH_FILE , MIXED_FILE }
 

Public Member Functions

 EXCELLON_WRITER (BOARD *aPcb)
 
virtual ~EXCELLON_WRITER ()
 
VECTOR2I GetOffset ()
 Return the plot offset (usually the position of the auxiliary axis.
 
void SetRouteModeForOvalHoles (bool aUseRouteModeForOvalHoles)
 
void SetFormat (bool aMetric, ZEROS_FMT aZerosFmt=DECIMAL_FORMAT, int aLeftDigits=0, int aRightDigits=0)
 Initialize internal parameters to match the given format.
 
void SetOptions (bool aMirror, bool aMinimalHeader, const VECTOR2I &aOffset, bool aMerge_PTH_NPTH)
 Initialize internal parameters to match drill options.
 
bool CreateDrillandMapFilesSet (const wxString &aPlotDirectory, bool aGenDrill, bool aGenMap, REPORTER *aReporter=nullptr)
 Create the full set of Excellon drill file for the board.
 
void SetMergeOption (bool aMerge)
 Set the option to make separate drill files for PTH and NPTH.
 
void SetPageInfo (const PAGE_INFO *aPageInfo)
 Set the page info used to plot drill maps.
 
void SetMapFileFormat (PLOT_FORMAT aMapFmt)
 Initialize the format for the drill map file.
 
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 select the format).
 
bool GenDrillReportFile (const wxString &aFullFileName)
 Create a plain text report file giving a list of drill values and drill count for through holes, oblong holes, and for buried vias, drill values and drill count per layer pair there is only one report for all drill files even when buried or blinds vias exist.
 
wxString GetDrillFileExt () const
 Returns the file extension of the drill writer format.
 

Protected Member Functions

bool genDrillMapFile (const wxString &aFullFileName, PLOT_FORMAT aFormat)
 Plot a map of drill marks for holes.
 
void buildHolesList (DRILL_LAYER_PAIR aLayerPair, bool aGenerateNPTH_list)
 Create the list of holes and tools for a given board.
 
int getHolesCount () const
 
bool plotDrillMarks (PLOTTER *aPlotter)
 Write the drill marks in HPGL, POSTSCRIPT or other supported formats/.
 
std::vector< DRILL_LAYER_PAIRgetUniqueLayerPairs () const
 Get unique layer pairs by examining the micro and blind_buried vias.
 
unsigned printToolSummary (OUTPUTFORMATTER &aOut, bool aSummaryNPTH) const
 Print m_toolListBuffer[] tools to aOut and returns total hole count.
 
const std::string layerPairName (DRILL_LAYER_PAIR aPair) const
 
const std::string layerName (PCB_LAYER_ID aLayer) const
 
virtual const wxString getDrillFileName (DRILL_LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH) const
 
const wxString BuildFileFunctionAttributeString (DRILL_LAYER_PAIR aLayerPair, TYPE_FILE aHoleType, bool aCompatNCdrill=false) const
 

Protected Attributes

BOARDm_pcb
 
wxString m_drillFileExtension
 
bool m_unitsMetric
 
ZEROS_FMT m_zeroFormat
 
DRILL_PRECISION m_precision
 
double m_conversionUnits
 
VECTOR2I m_offset
 
bool m_merge_PTH_NPTH
 
std::vector< HOLE_INFOm_holeListBuffer
 
std::vector< DRILL_TOOLm_toolListBuffer
 
PLOT_FORMAT m_mapFileFmt
 
const PAGE_INFOm_pageInfo
 

Private Member Functions

int createDrillFile (FILE *aFile, DRILL_LAYER_PAIR aLayerPair, TYPE_FILE aHolesType)
 Create an Excellon drill file.
 
void writeEXCELLONHeader (DRILL_LAYER_PAIR aLayerPair, TYPE_FILE aHolesType)
 Print the DRILL file header.
 
void writeEXCELLONEndOfFile ()
 
void writeCoordinates (char *aLine, size_t aLineSize, double aCoordX, double aCoordY)
 Create a line like according to the selected format.
 
void writeHoleAttribute (HOLE_ATTRIBUTE aAttribute)
 Write a comment string giving the hole attribute.
 

Private Attributes

FILE * m_file
 
bool m_minimalHeader
 
bool m_mirror
 
bool m_useRouteModeForOval
 

Detailed Description

Create Excellon drill, drill map, and drill report files.

Definition at line 44 of file gendrill_Excellon_writer.h.

Member Enumeration Documentation

◆ TYPE_FILE

Enumerator
PTH_FILE 
NPTH_FILE 
MIXED_FILE 

Definition at line 162 of file gendrill_file_writer_base.h.

◆ ZEROS_FMT

Enumerator
DECIMAL_FORMAT 
SUPPRESS_LEADING 
SUPPRESS_TRAILING 
KEEP_ZEROS 

Definition at line 155 of file gendrill_file_writer_base.h.

Constructor & Destructor Documentation

◆ EXCELLON_WRITER()

◆ ~EXCELLON_WRITER()

virtual EXCELLON_WRITER::~EXCELLON_WRITER ( )
inlinevirtual

Definition at line 49 of file gendrill_Excellon_writer.h.

Member Function Documentation

◆ BuildFileFunctionAttributeString()

const wxString GENDRILL_WRITER_BASE::BuildFileFunctionAttributeString ( DRILL_LAYER_PAIR  aLayerPair,
TYPE_FILE  aHoleType,
bool  aCompatNCdrill = false 
) const
protectedinherited
Parameters
aLayerPairis the layer pair (Drill from rom first layer to second layer)
aHoleTypeis type of drill file (PTH, NPTH, mixed)
aCompatNCdrillis true when generating NC (Excellon) compatible drill file
Returns
a wxString containing the .FileFunction attribute. the standard X2 FileFunction for drill files is TF.FileFunction,Plated[NonPlated],layer1num,layer2num,PTH[NPTH][Blind][Buried], Drill[Route][Mixed]*% There is no X1 version, as the Gerber drill files uses only X2 format There is a compatible NC drill version.

Definition at line 361 of file gendrill_file_writer_base.cpp.

References B_Cu, BOARD::GetCopperLayerCount(), HOLE_INFO::m_Hole_Shape, GENDRILL_WRITER_BASE::m_holeListBuffer, GENDRILL_WRITER_BASE::m_pcb, GENDRILL_WRITER_BASE::MIXED_FILE, GENDRILL_WRITER_BASE::NPTH_FILE, and text.

Referenced by GERBER_WRITER::createDrillFile(), and writeEXCELLONHeader().

◆ buildHolesList()

void GENDRILL_WRITER_BASE::buildHolesList ( DRILL_LAYER_PAIR  aLayerPair,
bool  aGenerateNPTH_list 
)
protectedinherited

◆ CreateDrillandMapFilesSet()

bool EXCELLON_WRITER::CreateDrillandMapFilesSet ( const wxString &  aPlotDirectory,
bool  aGenDrill,
bool  aGenMap,
REPORTER aReporter = nullptr 
)

Create the full set of Excellon drill file for the board.

File names are computed from the board name and layer ID.

Parameters
aPlotDirectoryis the output folder.
aGenDrillset to true to generate the EXCELLON drill file.
aGenMapset to true to generate a drill map file.
aReporteris a REPORTER to return activity or any message (can be NULL)

Definition at line 76 of file gendrill_Excellon_writer.cpp.

References _, B_Cu, GENDRILL_WRITER_BASE::buildHolesList(), createDrillFile(), GENDRILL_WRITER_BASE::CreateMapFilesSet(), F_Cu, GENDRILL_WRITER_BASE::getDrillFileName(), GENDRILL_WRITER_BASE::getHolesCount(), GENDRILL_WRITER_BASE::getUniqueLayerPairs(), GENDRILL_WRITER_BASE::m_merge_PTH_NPTH, GENDRILL_WRITER_BASE::MIXED_FILE, GENDRILL_WRITER_BASE::NPTH_FILE, GENDRILL_WRITER_BASE::PTH_FILE, REPORTER::Report(), REPORTER::ReportTail(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, and RPT_SEVERITY_INFO.

Referenced by DIALOG_GENDRILL::GenDrillAndMapFiles(), and PCBNEW_JOBS_HANDLER::JobExportDrill().

◆ createDrillFile()

int EXCELLON_WRITER::createDrillFile ( FILE *  aFile,
DRILL_LAYER_PAIR  aLayerPair,
TYPE_FILE  aHolesType 
)
private

◆ CreateMapFilesSet()

bool GENDRILL_WRITER_BASE::CreateMapFilesSet ( const wxString &  aPlotDirectory,
REPORTER aReporter = nullptr 
)
inherited

Create the full set of map files for the board, in PS, PDF ... format (use SetMapFileFormat() to select the format).

File names are computed from the board name and layer ID.

Parameters
aPlotDirectoryis the output folder.
aReporteris a REPORTER to return activity or any message (can be NULL)

Definition at line 300 of file gendrill_file_writer_base.cpp.

References _, B_Cu, GENDRILL_WRITER_BASE::buildHolesList(), F_Cu, GENDRILL_WRITER_BASE::genDrillMapFile(), GetDefaultPlotExtension(), GENDRILL_WRITER_BASE::getDrillFileName(), GENDRILL_WRITER_BASE::getHolesCount(), GENDRILL_WRITER_BASE::getUniqueLayerPairs(), GENDRILL_WRITER_BASE::m_mapFileFmt, GENDRILL_WRITER_BASE::m_merge_PTH_NPTH, REPORTER::Report(), RPT_SEVERITY_ACTION, and RPT_SEVERITY_ERROR.

Referenced by CreateDrillandMapFilesSet(), and GERBER_WRITER::CreateDrillandMapFilesSet().

◆ genDrillMapFile()

bool GENDRILL_WRITER_BASE::genDrillMapFile ( const wxString &  aFullFileName,
PLOT_FORMAT  aFormat 
)
protectedinherited

Plot a map of drill marks for holes.

Hole list must be created before calling this function, by buildHolesList() for the right holes set (PTH, NPTH, buried/blind vias ...) the paper sheet to use to plot the map is set in m_pageInfo ( calls SetPageInfo() to set it ). If NULL, A4 format will be used.

Parameters
aFullFileNameis the full filename of the map file to create.
aFormatis one of the supported plot formats (see enum PlotFormat ).

Definition at line 87 of file gen_drill_report_files.cpp.

References PAGE_INFO::A4, AddGerberX2Header(), PLOTTER::AddLineToHeader(), ANGLE_HORIZONTAL, BOX2< Vec >::Centre(), PLOTTER::ClearHeaderLinesList(), KIFONT::METRICS::Default(), diameter_in_inches(), diameter_in_mm(), GERBER_PLOTTER::DisableApertMacros(), BOARD::Drawings(), dummy, Dwgs_User, Edge_Cuts, PLOTTER::EndPlot(), BOARD::Footprints(), From_UTF8(), BOARD::GetBoardEdgesBoundingBox(), BOX2< Vec >::GetBottom(), getDefaultPenSize(), BOX2< Vec >::GetHeight(), getMarkerBestPenSize(), GENDRILL_WRITER_BASE::GetOffset(), PLOTTER::GetPlotterType(), PAGE_INFO::GetSizeIU(), BOARD::GetVisibleLayers(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_CENTER, EDA_IU_SCALE::IU_PER_MILS, EDA_IU_SCALE::IU_PER_MM, KI_FALLTHROUGH, KiROUND(), TEXT_ATTRIBUTES::m_Angle, DRILL_TOOL::m_Diameter, TEXT_ATTRIBUTES::m_Halign, DRILL_TOOL::m_Hole_NotPlated, TEXT_ATTRIBUTES::m_Multiline, DRILL_TOOL::m_OvalCount, GENDRILL_WRITER_BASE::m_pageInfo, GENDRILL_WRITER_BASE::m_pcb, TEXT_ATTRIBUTES::m_Size, TEXT_ATTRIBUTES::m_StrokeWidth, GENDRILL_WRITER_BASE::m_toolListBuffer, DRILL_TOOL::m_TotalCount, GENDRILL_WRITER_BASE::m_unitsMetric, TEXT_ATTRIBUTES::m_Valign, PLOTTER::Marker(), EDA_IU_SCALE::mmToIU(), PLOTTER::OpenFile(), PCB_SHAPE_T, pcbIUScale, GENDRILL_WRITER_BASE::plotDrillMarks(), BRDITEMS_PLOTTER::PlotShape(), PLOTTER::PlotText(), scale, PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetCurrentLineWidth(), KIGFX::RENDER_SETTINGS::SetDefaultPenWidth(), PLOTTER::SetGerberCoordinatesFormat(), PCB_SHAPE::SetLayer(), BRDITEMS_PLOTTER::SetLayerSet(), PLOTTER::SetPageSettings(), BOARD_ITEM::SetParentGroup(), PLOTTER::SetRenderSettings(), DXF_PLOTTER::SetUnits(), PLOTTER::SetViewport(), BOARD::SetVisibleLayers(), PLOTTER::StartPlot(), text, GERBER_PLOTTER::UseX2format(), GERBER_PLOTTER::UseX2NetAttributes(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by GENDRILL_WRITER_BASE::CreateMapFilesSet().

◆ GenDrillReportFile()

bool GENDRILL_WRITER_BASE::GenDrillReportFile ( const wxString &  aFullFileName)
inherited

Create a plain text report file giving a list of drill values and drill count for through holes, oblong holes, and for buried vias, drill values and drill count per layer pair there is only one report for all drill files even when buried or blinds vias exist.

Here is a sample created by this function: Drill report for F:/tmp/interf_u/interf_u.brd Created on 04/10/2012 20:48:38 Selected Drill Unit: Imperial (inches)

Drill report for plated through holes : T1 0,025" 0,64mm (88 holes) T2 0,031" 0,79mm (120 holes) T3 0,032" 0,81mm (151 holes) (with 1 slot) T4 0,040" 1,02mm (43 holes) T5 0,079" 2,00mm (1 hole) (with 1 slot) T6 0,120" 3,05mm (1 hole) (with 1 slot)

Total plated holes count 404

Drill report for buried and blind vias :

Drill report for holes from layer Soudure to layer Interne1 :

Total plated holes count 0

Drill report for holes from layer Interne1 to layer Interne2 : T1 0,025" 0,64mm (3 holes) Total plated holes count 3 Drill report for holes from layer Interne2 to layer Composant : T1 0,025" 0,64mm (1 hole)

Total plated holes count 1

Drill report for unplated through holes : T1 0,120" 3,05mm (1 hole) (with 1 slot)

Total unplated holes count 1

Parameters
aFullFileNameis the name of the file to create.
Returns
true if the file is created.

Definition at line 408 of file gen_drill_report_files.cpp.

References LSET::AllCuMask(), B_Cu, GENDRILL_WRITER_BASE::buildHolesList(), F_Cu, GENDRILL_WRITER_BASE::getDrillFileName(), BOARD::GetEnabledLayers(), BOARD::GetFileName(), GetISO8601CurrentDateTime(), BOARD::GetLayerName(), GENDRILL_WRITER_BASE::getUniqueLayerPairs(), GENDRILL_WRITER_BASE::layerName(), GENDRILL_WRITER_BASE::m_merge_PTH_NPTH, GENDRILL_WRITER_BASE::m_pcb, OUTPUTFORMATTER::Print(), GENDRILL_WRITER_BASE::printToolSummary(), LSET::Seq(), TO_UTF8, and ToLAYER_ID().

Referenced by DIALOG_GENDRILL::OnGenReportFile().

◆ GetDrillFileExt()

wxString GENDRILL_WRITER_BASE::GetDrillFileExt ( ) const
inlineinherited

Returns the file extension of the drill writer format.

Definition at line 270 of file gendrill_file_writer_base.h.

References GENDRILL_WRITER_BASE::m_drillFileExtension.

◆ getDrillFileName()

const wxString GENDRILL_WRITER_BASE::getDrillFileName ( DRILL_LAYER_PAIR  aPair,
bool  aNPTH,
bool  aMerge_PTH_NPTH 
) const
protectedvirtualinherited
Parameters
aPairis the layer pair.
aNPTHuse true to generate the filename of NPTH holes.
aMerge_PTH_NPTHuse true to generate the filename of a file which containd both NPH and NPTH holes.
Returns
a filename which identify the drill file function. it is the board name with the layer pair names added, and for separate (PTH and NPTH) files, "-NPH" or "-NPTH" added

Reimplemented in GERBER_WRITER.

Definition at line 269 of file gendrill_file_writer_base.cpp.

References B_Cu, F_Cu, BOARD::GetFileName(), GENDRILL_WRITER_BASE::layerPairName(), GENDRILL_WRITER_BASE::m_drillFileExtension, and GENDRILL_WRITER_BASE::m_pcb.

Referenced by CreateDrillandMapFilesSet(), GENDRILL_WRITER_BASE::CreateMapFilesSet(), GENDRILL_WRITER_BASE::GenDrillReportFile(), and GERBER_WRITER::getDrillFileName().

◆ getHolesCount()

int GENDRILL_WRITER_BASE::getHolesCount ( ) const
inlineprotectedinherited

◆ GetOffset()

VECTOR2I EXCELLON_WRITER::GetOffset ( )
inline

Return the plot offset (usually the position of the auxiliary axis.

Definition at line 56 of file gendrill_Excellon_writer.h.

References GENDRILL_WRITER_BASE::m_offset.

◆ getUniqueLayerPairs()

std::vector< DRILL_LAYER_PAIR > GENDRILL_WRITER_BASE::getUniqueLayerPairs ( ) const
protectedinherited

◆ layerName()

const std::string GENDRILL_WRITER_BASE::layerName ( PCB_LAYER_ID  aLayer) const
protectedinherited
Returns
a string from aLayer to identify the layer. string are "front" "back" or "in<aLayer>"

Definition at line 244 of file gendrill_file_writer_base.cpp.

References B_Cu, F_Cu, and StrPrintf().

Referenced by GENDRILL_WRITER_BASE::GenDrillReportFile(), and GENDRILL_WRITER_BASE::layerPairName().

◆ layerPairName()

const std::string GENDRILL_WRITER_BASE::layerPairName ( DRILL_LAYER_PAIR  aPair) const
protectedinherited
Returns
a string from aPair to identify the layer layer pair. string is "<layer1Name>"-"<layer2Name>" used to generate a filename for drill files and drill maps

Definition at line 259 of file gendrill_file_writer_base.cpp.

References GENDRILL_WRITER_BASE::layerName().

Referenced by GENDRILL_WRITER_BASE::getDrillFileName().

◆ plotDrillMarks()

bool GENDRILL_WRITER_BASE::plotDrillMarks ( PLOTTER aPlotter)
protectedinherited

Write the drill marks in HPGL, POSTSCRIPT or other supported formats/.

Each hole size has a symbol (circle, cross X, cross + ...) up to PLOTTER::MARKER_COUNT different values. If more than PLOTTER::MARKER_COUNT different values, these other values share the same mark shape.

Parameters
aPlotteris a PLOTTER instance (HPGL, POSTSCRIPT ... plotter).

Definition at line 510 of file gen_drill_report_files.cpp.

References PLOTTER::FlashPadOval(), KIGFX::RENDER_SETTINGS::GetDefaultPenWidth(), getMarkerBestPenSize(), getSketchOvalBestPenSize(), HOLE_INFO::m_Hole_Diameter, HOLE_INFO::m_Hole_Orient, HOLE_INFO::m_Hole_Pos, HOLE_INFO::m_Hole_Shape, HOLE_INFO::m_Hole_Size, GENDRILL_WRITER_BASE::m_holeListBuffer, HOLE_INFO::m_Tool_Reference, PLOTTER::Marker(), PLOTTER::RenderSettings(), PLOTTER::SetCurrentLineWidth(), KIGFX::RENDER_SETTINGS::SetDefaultPenWidth(), and SKETCH.

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile().

◆ printToolSummary()

unsigned GENDRILL_WRITER_BASE::printToolSummary ( OUTPUTFORMATTER aOut,
bool  aSummaryNPTH 
) const
protectedinherited

Print m_toolListBuffer[] tools to aOut and returns total hole count.

Parameters
aOutis the current OUTPUTFORMATTER to print summary.
aSummaryNPTHis true to print summary for NPTH, false for PTH.

Definition at line 545 of file gen_drill_report_files.cpp.

References diameter_in_inches(), diameter_in_mm(), DRILL_TOOL::m_Diameter, DRILL_TOOL::m_Hole_NotPlated, DRILL_TOOL::m_OvalCount, GENDRILL_WRITER_BASE::m_toolListBuffer, DRILL_TOOL::m_TotalCount, and OUTPUTFORMATTER::Print().

Referenced by GENDRILL_WRITER_BASE::GenDrillReportFile().

◆ SetFormat()

void EXCELLON_WRITER::SetFormat ( bool  aMetric,
ZEROS_FMT  aZerosFmt = DECIMAL_FORMAT,
int  aLeftDigits = 0,
int  aRightDigits = 0 
)

Initialize internal parameters to match the given format.

Parameters
aMetricset to true for metric coordinates, false for imperial units.
aZerosFmtis the zero format DECIMAL_FORMAT, SUPPRESS_LEADING, SUPPRESS_TRAILING, or KEEP_ZEROS.
aLeftDigitsis the number of digits for integer part of coordinates if <= 0 (default), a suitable value will be used, depending on units.
aRightDigitsis number of digits for mantissa part of coordinates if <= 0 (default), a suitable value will be used, depending on units.

Definition at line 358 of file gendrill_Excellon_writer.cpp.

References EDA_IU_SCALE::IU_PER_MILS, EDA_IU_SCALE::IU_PER_MM, GENDRILL_WRITER_BASE::m_conversionUnits, DRILL_PRECISION::m_Lhs, GENDRILL_WRITER_BASE::m_precision, DRILL_PRECISION::m_Rhs, GENDRILL_WRITER_BASE::m_unitsMetric, GENDRILL_WRITER_BASE::m_zeroFormat, and pcbIUScale.

Referenced by DIALOG_GENDRILL::GenDrillAndMapFiles(), and PCBNEW_JOBS_HANDLER::JobExportDrill().

◆ SetMapFileFormat()

void GENDRILL_WRITER_BASE::SetMapFileFormat ( PLOT_FORMAT  aMapFmt)
inlineinherited

Initialize the format for the drill map file.

Parameters
aMapFmta PlotFormat value (one of PLOT_FORMAT_HPGL, PLOT_FORMAT_POST, PLOT_FORMAT_GERBER, PLOT_FORMAT_DXF, PLOT_FORMAT_SVG, PLOT_FORMAT_PDF the most useful are PLOT_FORMAT_PDF and PLOT_FORMAT_POST.

Definition at line 201 of file gendrill_file_writer_base.h.

References GENDRILL_WRITER_BASE::m_mapFileFmt.

Referenced by DIALOG_GENDRILL::GenDrillAndMapFiles(), and PCBNEW_JOBS_HANDLER::JobExportDrill().

◆ SetMergeOption()

void GENDRILL_WRITER_BASE::SetMergeOption ( bool  aMerge)
inlineinherited

Set the option to make separate drill files for PTH and NPTH.

Parameters
aMergeset to true to make only one file containing PTH and NPTH or false to create 2 separate files.

Definition at line 178 of file gendrill_file_writer_base.h.

References GENDRILL_WRITER_BASE::m_merge_PTH_NPTH.

Referenced by DIALOG_GENDRILL::OnGenReportFile().

◆ SetOptions()

void EXCELLON_WRITER::SetOptions ( bool  aMirror,
bool  aMinimalHeader,
const VECTOR2I aOffset,
bool  aMerge_PTH_NPTH 
)
inline

Initialize internal parameters to match drill options.

Parameters
aMirrorset to true to create mirrored coordinates (Y coordinates negated).
aMinimalHeaderset to true to use a minimal header (no comments, no info).
aOffsetis the drill coordinates offset.
aMerge_PTH_NPTHset to true to create only one file containing PTH and NPTH false to create 2 separate files : one for PTH and one for NPTH.

Definition at line 89 of file gendrill_Excellon_writer.h.

References GENDRILL_WRITER_BASE::m_merge_PTH_NPTH, m_minimalHeader, m_mirror, and GENDRILL_WRITER_BASE::m_offset.

Referenced by DIALOG_GENDRILL::GenDrillAndMapFiles(), and PCBNEW_JOBS_HANDLER::JobExportDrill().

◆ SetPageInfo()

void GENDRILL_WRITER_BASE::SetPageInfo ( const PAGE_INFO aPageInfo)
inlineinherited

Set the page info used to plot drill maps.

If NULL, a A4 page format will be used.

Parameters
aPageInfois a reference to the page info, usually used to plot/display the board.

Definition at line 192 of file gendrill_file_writer_base.h.

References GENDRILL_WRITER_BASE::m_pageInfo.

◆ SetRouteModeForOvalHoles()

void EXCELLON_WRITER::SetRouteModeForOvalHoles ( bool  aUseRouteModeForOvalHoles)
inline

◆ writeCoordinates()

void EXCELLON_WRITER::writeCoordinates ( char *  aLine,
size_t  aLineSize,
double  aCoordX,
double  aCoordY 
)
private

◆ writeEXCELLONEndOfFile()

void EXCELLON_WRITER::writeEXCELLONEndOfFile ( )
private

Definition at line 576 of file gendrill_Excellon_writer.cpp.

References m_file.

Referenced by createDrillFile().

◆ writeEXCELLONHeader()

void EXCELLON_WRITER::writeEXCELLONHeader ( DRILL_LAYER_PAIR  aLayerPair,
TYPE_FILE  aHolesType 
)
private

Print the DRILL file header.

The full header is something like: M48 ;DRILL file {PCBNEW (2007-11-29-b)} date 17/1/2008-21:02:35 ;FORMAT={ <precision> / absolute / <units> / <numbers format>} ; #@! TF.FileFunction,Plated,1,4,PTH ; #@! TF.CreationDate,2018-11-23T15:59:51+01:00 ; #@! TF.GenerationSoftware,Kicad,Pcbnew,2017.04 FMAT,2 INCH,TZ

Parameters
aLayerPairis the layer pair for the current holes.
aHolesTypeis the holes type in file (PTH, NPTH, mixed).

Definition at line 490 of file gendrill_Excellon_writer.cpp.

References GENDRILL_WRITER_BASE::BuildFileFunctionAttributeString(), GENDRILL_WRITER_BASE::DECIMAL_FORMAT, GBR_NC_STRING_FORMAT_NCDRILL, GbrMakeCreationDateAttributeString(), GetBuildVersion(), GetISO8601CurrentDateTime(), DRILL_PRECISION::GetPrecisionString(), GENDRILL_WRITER_BASE::KEEP_ZEROS, m_file, m_minimalHeader, GENDRILL_WRITER_BASE::m_precision, GENDRILL_WRITER_BASE::m_unitsMetric, GENDRILL_WRITER_BASE::m_zeroFormat, GENDRILL_WRITER_BASE::SUPPRESS_LEADING, GENDRILL_WRITER_BASE::SUPPRESS_TRAILING, and TO_UTF8.

Referenced by createDrillFile().

◆ writeHoleAttribute()

void EXCELLON_WRITER::writeHoleAttribute ( HOLE_ATTRIBUTE  aAttribute)
private

Write a comment string giving the hole attribute.

Parameters
aAttributeis the hole attribute.

Definition at line 161 of file gendrill_Excellon_writer.cpp.

References m_file, and m_minimalHeader.

Referenced by createDrillFile().

Member Data Documentation

◆ m_conversionUnits

double GENDRILL_WRITER_BASE::m_conversionUnits
protectedinherited

◆ m_drillFileExtension

wxString GENDRILL_WRITER_BASE::m_drillFileExtension
protectedinherited

◆ m_file

FILE* EXCELLON_WRITER::m_file
private

◆ m_holeListBuffer

◆ m_mapFileFmt

◆ m_merge_PTH_NPTH

◆ m_minimalHeader

bool EXCELLON_WRITER::m_minimalHeader
private

◆ m_mirror

bool EXCELLON_WRITER::m_mirror
private

Definition at line 157 of file gendrill_Excellon_writer.h.

Referenced by createDrillFile(), EXCELLON_WRITER(), and SetOptions().

◆ m_offset

◆ m_pageInfo

const PAGE_INFO* GENDRILL_WRITER_BASE::m_pageInfo
protectedinherited

◆ m_pcb

◆ m_precision

DRILL_PRECISION GENDRILL_WRITER_BASE::m_precision
protectedinherited

◆ m_toolListBuffer

std::vector<DRILL_TOOL> GENDRILL_WRITER_BASE::m_toolListBuffer
protectedinherited

◆ m_unitsMetric

◆ m_useRouteModeForOval

bool EXCELLON_WRITER::m_useRouteModeForOval
private

◆ m_zeroFormat


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