Kicad and Gerbview: add .nc and .xnc file ext to files seen as drill files.
.nc is an other usual Excellon drill file ext, and .xnc will be soon also in use.
This commit is contained in:
parent
3536840f52
commit
e1d3df54eb
|
@ -303,11 +303,12 @@ bool GERBVIEW_FRAME::OpenProjectFiles( const std::vector<wxString>& 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] );
|
||||
|
|
|
@ -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" ),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue