58 bool aGenerateNPTH_list )
65 wxASSERT( aLayerPair.first < aLayerPair.second );
68 if( ! aGenerateNPTH_list )
75 auto via = static_cast<VIA*>( track );
76 int hole_sz = via->GetDrillValue();
109 for(
PAD* pad : footprint->Pads() )
120 if( pad->GetDrillSize().x == 0 )
128 new_hole.
m_Hole_Diameter = std::min( pad->GetDrillSize().x, pad->GetDrillSize().y );
149 bool last_notplated_opt =
false;
185 static const KICAD_T interesting_stuff_to_collect[] = {
194 std::set< DRILL_LAYER_PAIR > unique;
198 for(
int i = 0; i < vias.
GetCount(); ++i )
202 v->
LayerPair( &layer_pair.first, &layer_pair.second );
208 unique.insert( layer_pair );
212 std::vector<DRILL_LAYER_PAIR> ret;
216 for( std::set< DRILL_LAYER_PAIR >::const_iterator it = unique.begin(); it != unique.end(); ++it )
217 ret.push_back( *it );
240 std::string ret =
layerName( aPair.first );
249 bool aMerge_PTH_NPTH )
const 259 if( !aMerge_PTH_NPTH )
271 fn.SetName( fn.GetName() + extend );
274 wxString ret = fn.GetFullName();
289 hole_sets.emplace_back(
F_Cu,
B_Cu );
291 for( std::vector<DRILL_LAYER_PAIR>::const_iterator it = hole_sets.begin();
292 it != hole_sets.end(); ++it )
307 fn.SetPath( aPlotDirectory );
309 fn.SetExt( wxEmptyString );
310 wxString fullfilename = fn.GetFullPath() + wxT(
"-drl_map" );
319 msg.Printf(
_(
"** Unable to create %s **\n" ), fullfilename );
329 msg.Printf(
_(
"Create file %s\n" ), fullfilename );
350 text <<
"TF.FileFunction,";
353 text <<
"NonPlated,";
357 int layer1 = aLayerPair.first;
358 int layer2 = aLayerPair.second;
369 text << layer1 <<
",";
370 text << layer2 <<
",";
378 else if( layer1 == toplayer && layer2 == bottomlayer )
380 else if( layer1 == toplayer || layer2 == bottomlayer )
394 bool hasOblong =
false;
395 bool hasDrill =
false;
407 if( hasOblong && hasDrill )
void LayerPair(PCB_LAYER_ID *top_layer, PCB_LAYER_ID *bottom_layer) const
Function LayerPair Return the 2 layers used by the via (the via actually uses all layers between thes...
BOARD_ITEM * m_ItemParent
virtual const wxString getDrillFileName(DRILL_LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH) const
static bool CmpHoleSorting(const HOLE_INFO &a, const HOLE_INFO &b)
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
std::vector< DRILL_LAYER_PAIR > getUniqueLayerPairs() const
Get unique layer pairs by examining the micro and blind_buried vias.
like PAD_PTH, but not plated mechanical use only, no connection allowed
A pure virtual class used to derive REPORTER objects from.
const wxString & GetFileName() const
void CreateMapFilesSet(const wxString &aPlotDirectory, REPORTER *aReporter=NULL)
Function CreateMapFilesSet Creates the full set of map files for the board, in PS,...
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
int getHolesCount() const
int StrPrintf(std::string *result, const char *format,...)
This is like sprintf() but the output is appended to a std::string instead of to a character array.
std::vector< DRILL_TOOL > m_toolListBuffer
int GetCount() const
Return the number of objects in the list.
PCB_LAYER_ID
A quick note on layer IDs:
const std::string layerPairName(DRILL_LAYER_PAIR aPair) const
minor helper function.
FOOTPRINTS & Footprints()
helper classes to handle hole info for drill files generators.
std::pair< PCB_LAYER_ID, PCB_LAYER_ID > DRILL_LAYER_PAIR
const wxString BuildFileFunctionAttributeString(DRILL_LAYER_PAIR aLayerPair, bool aIsNpth, bool aCompatNCdrill=false) const
void Collect(BOARD_ITEM *aBoard, const KICAD_T aScanList[])
Collect BOARD_ITEM objects using this class's Inspector method, which does the collection.
void buildHolesList(DRILL_LAYER_PAIR aLayerPair, bool aGenerateNPTH_list)
Function BuildHolesList Create the list of holes and tools for a given board The list is sorted by in...
PCB_LAYER_ID m_Hole_Bottom_Layer
PCB_LAYER_ID m_Hole_Top_Layer
const std::string layerName(PCB_LAYER_ID aLayer) const
minor helper function.
int GetCopperLayerCount() const
bool genDrillMapFile(const wxString &aFullFileName, PLOT_FORMAT aFormat)
Function GenDrillMapFile Plot a map of drill marks for holes.
class VIA, a via (like a track segment on a copper layer)
Collect all BOARD_ITEM objects of a given set of KICAD_T type(s).
wxString m_drillFileExtension
std::vector< HOLE_INFO > m_holeListBuffer