Minor change for drill files names: when separate PTH and NPTH drill files are generated, PTH drill file has its name finishing by "-PTH" (similar to the NPTH drill file name)

This commit is contained in:
jean-pierre charras 2016-08-01 16:29:15 +02:00
parent 3ca757b653
commit 84cfef1de9
3 changed files with 18 additions and 7 deletions

View File

@ -338,7 +338,7 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
if( pair == LAYER_PAIR( F_Cu, B_Cu ) )
{
out.Print( 0, "Drill file '%s' contains\n",
TO_UTF8( drillFileName( pair, false ) ) );
TO_UTF8( drillFileName( pair, false, m_merge_PTH_NPTH ) ) );
out.Print( 0, " plated through holes:\n" );
out.Print( 0, separator );
@ -348,7 +348,7 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
else // blind/buried
{
out.Print( 0, "Drill file '%s' contains\n",
TO_UTF8( drillFileName( pair, false ) ) );
TO_UTF8( drillFileName( pair, false, m_merge_PTH_NPTH ) ) );
out.Print( 0, " holes connecting layer pair: '%s and %s' (%s vias):\n",
TO_UTF8( m_pcb->GetLayerName( ToLAYER_ID( pair.first ) ) ),
@ -376,7 +376,7 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
out.Print( 0, "Not plated through holes are merged with plated holes\n" );
else
out.Print( 0, "Drill file '%s' contains\n",
TO_UTF8( drillFileName( LAYER_PAIR( F_Cu, B_Cu ), true ) ) );
TO_UTF8( drillFileName( LAYER_PAIR( F_Cu, B_Cu ), true, m_merge_PTH_NPTH ) ) );
out.Print( 0, " unplated through holes:\n" );
out.Print( 0, separator );

View File

@ -105,7 +105,7 @@ void EXCELLON_WRITER::CreateDrillandMapFilesSet( const wxString& aPlotDirectory,
// to be sure the NPTH file is up to date in separate files mode.
if( GetHolesCount() > 0 || doing_npth )
{
fn = drillFileName( pair, doing_npth );
fn = drillFileName( pair, doing_npth, m_merge_PTH_NPTH );
fn.SetPath( aPlotDirectory );
if( aGenDrill )
@ -754,7 +754,7 @@ const std::string EXCELLON_WRITER::layerPairName( LAYER_PAIR aPair ) const
}
const wxString EXCELLON_WRITER::drillFileName( LAYER_PAIR aPair, bool aNPTH ) const
const wxString EXCELLON_WRITER::drillFileName( LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH ) const
{
wxASSERT( m_pcb );
@ -764,7 +764,9 @@ const wxString EXCELLON_WRITER::drillFileName( LAYER_PAIR aPair, bool aNPTH ) co
extend = "-NPTH";
else if( aPair == LAYER_PAIR( F_Cu, B_Cu ) )
{
// extend with nothing
if( !aMerge_PTH_NPTH )
extend = "-PTH";
// if merged, extend with nothing
}
else
{

View File

@ -362,7 +362,16 @@ private:
const std::string layerName( LAYER_ID aLayer ) const;
const wxString drillFileName( LAYER_PAIR aPair, bool aNPTH ) const;
/**
* @return 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
* @param aPair = the layer pair
* @param aNPTH = true to generate the filename of NPTH holes
* @param aMerge_PTH_NPTH = true to generate the filename of a file which containd both
* NPH and NPTH holes
*/
const wxString drillFileName( LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH ) const;
};
#endif // #ifndef _GENDRILL_EXCELLON_WRITER_