diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 0dc0a2f027..d2e5f1178f 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -303,11 +303,12 @@ bool GERBVIEW_FRAME::OpenProjectFiles( const std::vector& aFileSet, in SetActiveLayer( layer ); // Try to guess the type of file by its ext - // if it is .drl (Kicad files), it is a drill file + // if it is .drl (Kicad files), .nc or .xnc it is a drill file wxFileName fn( aFileSet[i] ); wxString ext = fn.GetExt(); - if( ext == DrillFileExtension ) // In Excellon format + if( ext == DrillFileExtension || // our Excellon format + ext == "nc" || ext == "xnc" ) // alternate ext for Excellon format LoadExcellonFiles( aFileSet[i] ); else if( ext == GerberJobFileExtension ) LoadGerberJobFile( aFileSet[i] ); diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp index 3ac2cbb3b5..15b420a29f 100644 --- a/kicad/files-io.cpp +++ b/kicad/files-io.cpp @@ -41,7 +41,7 @@ #include "kicad.h" -#define ZipFileExtension wxT( "zip" ) +#define ZipFileExtension wxT( "zip" ) void KICAD_MANAGER_FRAME::OnFileHistory( wxCommandEvent& event ) @@ -148,7 +148,7 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event ) wxT( "*.gp1" ), wxT( "*.gp2" ), wxT( "*.gpb" ), wxT( "*.gpt" ), wxT( "*.gt?" ), - wxT( "*.pos" ), wxT( "*.drl" ), // Fab files + wxT( "*.pos" ), wxT( "*.drl" ), wxT( "*.nc" ), wxT( "*.xnc" ), // Fab files wxT( "*.d356" ), wxT( "*.rpt" ), wxT( "*.stp" ), wxT( "*.step" ), // 3d files wxT( "*.wrl" ), diff --git a/kicad/kicad.h b/kicad/kicad.h index 803dcc314d..79b47195f7 100644 --- a/kicad/kicad.h +++ b/kicad/kicad.h @@ -65,6 +65,8 @@ enum TreeFileType { TREE_REPORT, // report file (.rpt) TREE_FP_PLACE, // fooprints position (place) file (.pos) TREE_DRILL, // Excellon drill file (.drl) + TREE_DRILL_NC, // Similar Excellon drill file (.nc) + TREE_DRILL_XNC, // Similar Excellon drill file (.xnc) TREE_SVG, // SVG file (.svg) TREE_PAGE_LAYOUT_DESCR, // Page layout and title block descr file (.kicad_wks) TREE_FOOTPRINT_FILE, // footprint file (.kicad_mod) diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index b466640958..2bb7a03df1 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -88,6 +88,8 @@ static const wxChar* s_allowedExtensionsToList[] = wxT( "^.*\\.pos$" ), // Footprint position files wxT( "^.*\\.cmp$" ), // Cvpcb cmp/footprint link files wxT( "^.*\\.drl$" ), // Excellon drill files + wxT( "^.*\\.nc$" ), // Excellon NC drill files (alternate file ext) + wxT( "^.*\\.xnc$" ), // Excellon NC drill files (alternate file ext) wxT( "^.*\\.svg$" ), // SVG print/plot files NULL // end of list }; @@ -306,6 +308,14 @@ wxString TREE_PROJECT_FRAME::GetFileExt( TreeFileType type ) ext = DrillFileExtension; break; + case TREE_DRILL_NC: + ext = "nc"; + break; + + case TREE_DRILL_XNC: + ext = "xnc"; + break; + case TREE_SVG: ext = SVGFileExtension; break; @@ -385,6 +395,8 @@ wxString TREE_PROJECT_FRAME::GetFileWildcard( TreeFileType type ) break; case TREE_DRILL: + case TREE_DRILL_NC: + case TREE_DRILL_XNC: ext = DrillFileWildcard(); break; diff --git a/kicad/treeproject_item.cpp b/kicad/treeproject_item.cpp index 5bdc75646c..e7ed9c9132 100644 --- a/kicad/treeproject_item.cpp +++ b/kicad/treeproject_item.cpp @@ -224,6 +224,8 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* aTreePrjFrame ) case TREE_GERBER: case TREE_DRILL: + case TREE_DRILL_NC: + case TREE_DRILL_XNC: frame->Execute( m_parent, GERBVIEW_EXE, fullFileName ); break; diff --git a/kicad/treeprojectfiles.cpp b/kicad/treeprojectfiles.cpp index 57b07c5488..fc2d1ef47c 100644 --- a/kicad/treeprojectfiles.cpp +++ b/kicad/treeprojectfiles.cpp @@ -72,6 +72,8 @@ TREEPROJECTFILES::TREEPROJECTFILES( TREE_PROJECT_FRAME* parent ) : m_ImageList->Add( KiBitmap( tools_xpm ) ); // TREE_REPORT m_ImageList->Add( KiBitmap( post_compo_xpm ) ); // TREE_POS m_ImageList->Add( KiBitmap( post_drill_xpm ) ); // TREE_DRILL + m_ImageList->Add( KiBitmap( post_drill_xpm ) ); // TREE_DRILL_NC (similar TREE_DRILL) + m_ImageList->Add( KiBitmap( post_drill_xpm ) ); // TREE_DRILL_XNC (similar TREE_DRILL) m_ImageList->Add( KiBitmap( svg_file_xpm ) ); // TREE_SVG m_ImageList->Add( KiBitmap( pagelayout_load_xpm ) ); // TREE_PAGE_LAYOUT_DESCR m_ImageList->Add( KiBitmap( module_xpm ) ); // TREE_FOOTPRINT_FILE