Drill files export: ensure the Top to Bottom PTH drill file is always created,

even if there are no hole.
NPTH file is already always created.

Fixes #5566
https://gitlab.com/kicad/code/kicad/issues/5566
This commit is contained in:
jean-pierre charras 2020-09-10 16:42:04 +02:00
parent 6ab6c00f61
commit 6009414e22
3 changed files with 9 additions and 3 deletions

View File

@ -101,7 +101,9 @@ void EXCELLON_WRITER::CreateDrillandMapFilesSet( const wxString& aPlotDirectory,
// The file is created if it has holes, or if it is the non plated drill file // The file is created if it has holes, or if it is the non plated drill file
// to be sure the NPTH file is up to date in separate files mode. // to be sure the NPTH file is up to date in separate files mode.
if( getHolesCount() > 0 || doing_npth ) // Also a PTH drill/map file is always created, to be sure at least one plated hole drill file
// is created (do not create any PTH drill file can be seen as not working drill generator).
if( getHolesCount() > 0 || doing_npth || pair == DRILL_LAYER_PAIR( F_Cu, B_Cu ) )
{ {
fn = getDrillFileName( pair, doing_npth, m_merge_PTH_NPTH ); fn = getDrillFileName( pair, doing_npth, m_merge_PTH_NPTH );
fn.SetPath( aPlotDirectory ); fn.SetPath( aPlotDirectory );

View File

@ -315,7 +315,9 @@ void GENDRILL_WRITER_BASE::CreateMapFilesSet( const wxString& aPlotDirectory,
// The file is created if it has holes, or if it is the non plated drill file // The file is created if it has holes, or if it is the non plated drill file
// to be sure the NPTH file is up to date in separate files mode. // to be sure the NPTH file is up to date in separate files mode.
if( getHolesCount() > 0 || doing_npth ) // Also a PTH drill file is always created, to be sure at least one plated hole drill file
// is created (do not create any PTH drill file can be seen as not working drill generator).
if( getHolesCount() > 0 || doing_npth || pair == DRILL_LAYER_PAIR( F_Cu, B_Cu ) )
{ {
fn = getDrillFileName( pair, doing_npth, m_merge_PTH_NPTH ); fn = getDrillFileName( pair, doing_npth, m_merge_PTH_NPTH );
fn.SetPath( aPlotDirectory ); fn.SetPath( aPlotDirectory );

View File

@ -87,7 +87,9 @@ void GERBER_WRITER::CreateDrillandMapFilesSet( const wxString& aPlotDirectory,
// The file is created if it has holes, or if it is the non plated drill file // The file is created if it has holes, or if it is the non plated drill file
// to be sure the NPTH file is up to date in separate files mode. // to be sure the NPTH file is up to date in separate files mode.
if( getHolesCount() > 0 || doing_npth ) // Also a PTH drill/map file is always created, to be sure at least one plated hole drill file
// is created (do not create any PTH drill file can be seen as not working drill generator).
if( getHolesCount() > 0 || doing_npth || pair == DRILL_LAYER_PAIR( F_Cu, B_Cu ) )
{ {
fn = getDrillFileName( pair, doing_npth, false ); fn = getDrillFileName( pair, doing_npth, false );
fn.SetPath( aPlotDirectory ); fn.SetPath( aPlotDirectory );