Loading change_log.txt +13 −2 Original line number Original line Diff line number Diff line Loading @@ -5,16 +5,27 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with email address. email address. 2008-Mar-3 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew Completed transision to BOARD::GetLayerName() and away from ReturnPcbLayerName(). LayerNames and LAYER_T are saved int the *.brd file and may be edited there with a text editor until the UI is in place to edit them in PCBNEW. To understand the strategy, see BOARD::GetLayerName() in class_board.cpp and see WinEDA_BasePcbFrame::ReadSetup(). I will be adding "Board" menu item to Preferences, but there is more to come before the UI gets done: net classes. 2008-mars-03 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-mars-03 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ ================================================================================ 3d display: 3d display: Added Jonas Diemer's patch (enhanced movings from mouse and tools) Added Jonas Diemer's patch (enhanced movings from mouse and tools) 2008-Mar-1 UPDATE Dick Hollenbeck <dick@softplc.com> 2008-Mar-1 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ================================================================================ +pcbnew +pcbnew Changed ioascii.cpp to save and load board specific layer names, for DEBUG Changed ioascii.cpp to save and load board specific layer names, for DEBUG build only. I want to add class LAYER, see below. Added build only. I want to add class LAYER, see below. Added BOARD::SetLayerName(), BOARD::SetLayerType(), and BOARD::GetLayerType(). BOARD::SetLayerName(), BOARD::SetLayerType(), and BOARD::GetLayerType(). Loading common/common.cpp +2 −63 Original line number Original line Diff line number Diff line Loading @@ -265,8 +265,6 @@ void MyFree( void* pt_mem ) } } /**************************************************************/ /**************************************************************/ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) /**************************************************************/ /**************************************************************/ Loading @@ -276,32 +274,11 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) * (not internatinalized, no space) * (not internatinalized, no space) */ */ { { #if 1 && defined(DEBUG) // Dick: this code is working fine, but we have no place to store the layer names yet. const unsigned LAYER_LIMIT = 29; const unsigned LAYER_LIMIT = 29; // @todo: these layer names should be configurable on a per project basis. // These are only default layer names. For PCBNEW, the copper names // In anticipation of that enhancement, here is a different strategy for // may be over-ridden in the BOARD file *.brd. // deriving the file names from the "configured" layer names. // The main idea is to use a single array of names, and then remove // spaces on the fly from the names when writing to disk. #if 1 // my specific layer names static const wxString layer_name_list[] = { _( "H2 Bottom" ), _( "Power" ), _( "V2 Signal" ), _( "H1 Signal" ), _( "Ground" ), _( "Inner L5" ), _( "Inner L6" ), _( "Inner L7" ), _( "Inner L8" ), _( "Inner L9" ), _( "Inner L10" ), _( "Inner L11" ), _( "Inner L12" ), _( "Inner L13" ), _( "Inner L14" ), _( "Component" ), _( "Adhes Cop" ), _( "Adhes Cmp" ), _( "SoldP Cop" ), _( "SoldP Cmp" ), _( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop" ), _( "Mask Cmp" ), _( "Drawings " ), _( "Comments" ), _( "Eco1" ), _( "Eco2" ), _( "Edges Pcb" ), _( "BAD INDEX" ), }; #else static const wxString layer_name_list[] = { static const wxString layer_name_list[] = { _( "Copper " ), _( "Inner L1 " ), _( "Inner L2 " ), _( "Inner L3 " ), _( "Copper " ), _( "Inner L1 " ), _( "Inner L2 " ), _( "Inner L3 " ), _( "Inner L4 " ), _( "Inner L5 " ), _( "Inner L6 " ), _( "Inner L7 " ), _( "Inner L4 " ), _( "Inner L5 " ), _( "Inner L6 " ), _( "Inner L7 " ), Loading @@ -313,8 +290,6 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) _( "Edges Pcb" ), _( "BAD INDEX" ), _( "Edges Pcb" ), _( "BAD INDEX" ), }; }; #endif if( (unsigned) layer_number > LAYER_LIMIT ) if( (unsigned) layer_number > LAYER_LIMIT ) layer_number = LAYER_LIMIT; layer_number = LAYER_LIMIT; Loading @@ -332,42 +307,6 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) } } else else return *p; return *p; #else // long standing established code: static const wxString layer_name_list[] = { _( "Copper " ), _( "Inner L1 " ), _( "Inner L2 " ), _( "Inner L3 " ), _( "Inner L4 " ), _( "Inner L5 " ), _( "Inner L6 " ), _( "Inner L7 " ), _( "Inner L8 " ), _( "Inner L9 " ), _( "Inner L10" ), _( "Inner L11" ), _( "Inner L12" ), _( "Inner L13" ), _( "Inner L14" ), _( "Component" ), _( "Adhes Cop" ), _( "Adhes Cmp" ), _( "SoldP Cop" ), _( "SoldP Cmp" ), _( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop " ), _( "Mask Cmp " ), _( "Drawings " ), _( "Comments " ), _( "Eco1 " ), _( "Eco2 " ), _( "Edges Pcb" ), _( "--- " ), _( "--- " ), _( "--- " ) }; // Same as layer_name_list, without space, not internationalized static const wxString layer_name_list_for_filename[] = { wxT( "Copper" ), wxT( "InnerL1" ), wxT( "InnerL2" ), wxT( "InnerL3" ), wxT( "InnerL4" ), wxT( "InnerL5" ), wxT( "InnerL6" ), wxT( "InnerL7" ), wxT( "InnerL8" ), wxT( "InnerL9" ), wxT( "InnerL10" ), wxT( "InnerL11" ), wxT( "InnerL12" ), wxT( "InnerL13" ), wxT( "InnerL14" ), wxT( "Component" ), wxT( "AdhesCop" ), wxT( "AdhesCmp" ), wxT( "SoldPCop" ), wxT( "SoldPCmp" ), wxT( "SilkSCop" ), wxT( "SilkSCmp" ), wxT( "MaskCop" ), wxT( "MaskCmp" ), wxT( "Drawings" ), wxT( "Comments" ), wxT( "Eco1" ), wxT( "Eco2" ), wxT( "EdgesPcb" ), wxT( "---" ), wxT( "---" ), wxT( "---" ) }; if( (unsigned) layer_number >= 31u ) layer_number = 31; return omitSpacePadding ? layer_name_list_for_filename[layer_number] : layer_name_list[layer_number]; #endif } } Loading common/projet_config.cpp +4 −3 Original line number Original line Diff line number Diff line Loading @@ -319,7 +319,8 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, { { #undef PTCFG #undef PTCFG #define PTCFG ( (PARAM_CFG_DOUBLE*) pt_cfg ) #define PTCFG ( (PARAM_CFG_DOUBLE*) pt_cfg ) double ftmp = 0; wxString msg; double ftmp = 0; wxString msg; if( pt_cfg->m_Setup ) if( pt_cfg->m_Setup ) msg = m_EDA_Config->Read( pt_cfg->m_Ident, wxT( "" ) ); msg = m_EDA_Config->Read( pt_cfg->m_Ident, wxT( "" ) ); else else Loading cvpcb/cfg.cpp +55 −47 Original line number Original line Diff line number Diff line Loading @@ -20,13 +20,14 @@ /**************************************************/ /**************************************************/ void Read_Config( const wxString& FileName ) void Read_Config( const wxString& FileName ) /**************************************************/ /**************************************************/ /* lit la configuration 1 - lit cvpcb.cnf 2 - si non trouve lit <chemin de cvpcb.exe>/cvpcb.cnf 3 - si non trouve: init des variables aux valeurs par defaut Remarque: /* lit la configuration le chemin de l'executable cvpcb.exe doit etre dans BinDir * 1 - lit cvpcb.cnf * 2 - si non trouve lit <chemin de cvpcb.exe>/cvpcb.cnf * 3 - si non trouve: init des variables aux valeurs par defaut * * Remarque: * le chemin de l'executable cvpcb.exe doit etre dans BinDir */ */ { { wxString FullFileName = FileName; wxString FullFileName = FileName; Loading @@ -38,8 +39,11 @@ wxString FullFileName = FileName ; g_EDA_Appl->ReadProjectConfig( FullFileName, g_EDA_Appl->ReadProjectConfig( FullFileName, GROUP, ParamCfgList, FALSE ); GROUP, ParamCfgList, FALSE ); if ( PkgInExtBuffer.IsEmpty() ) PkgInExtBuffer = wxT(".pkg"); if( PkgInExtBuffer.IsEmpty() ) if ( NetInExtBuffer.IsEmpty() ) NetInExtBuffer = wxT(".net"), PkgInExtBuffer = wxT( ".pkg" ); if( NetInExtBuffer.IsEmpty() ) NetInExtBuffer = wxT( ".net" ); /* Inits autres variables */ /* Inits autres variables */ SetRealLibraryPath( wxT( "modules" ) ); SetRealLibraryPath( wxT( "modules" ) ); Loading @@ -49,19 +53,22 @@ wxString FullFileName = FileName ; /************************************************************/ /************************************************************/ void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event ) void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event ) /************************************************************/ /************************************************************/ /* fonction relai d'appel a Save_Config, /* fonction relai d'appel a Save_Config, la vraie fonction de sauvegarde de la config * la vraie fonction de sauvegarde de la config */ */ { { Save_Config( this ); Save_Config( this ); } } /************************************/ /************************************/ void Save_Config( wxWindow* parent ) void Save_Config( wxWindow* parent ) /************************************/ /************************************/ /* enregistrement de la config */ /* enregistrement de la config */ { { wxString path, FullFileName; wxString path, FullFileName; wxString mask( wxT( "*" ) ); wxString mask( wxT( "*" ) ); FullFileName = FFileName; FullFileName = FFileName; Loading @@ -77,9 +84,10 @@ wxString mask( wxT("*")); wxFD_SAVE, wxFD_SAVE, TRUE TRUE ); ); if ( FullFileName.IsEmpty()) return; if( FullFileName.IsEmpty() ) return; /* ecriture de la configuration */ /* ecriture de la configuration */ g_EDA_Appl->WriteProjectConfig( FullFileName, GROUP, ParamCfgList ); g_EDA_Appl->WriteProjectConfig( FullFileName, GROUP, ParamCfgList ); } } gerbview/gerbview.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -55,8 +55,6 @@ bool WinEDA_App::OnInit() SetTopWindow( m_GerberFrame ); SetTopWindow( m_GerberFrame ); m_GerberFrame->Show( TRUE ); m_GerberFrame->Show( TRUE ); m_GerberFrame->m_Pcb = new BOARD( NULL, m_GerberFrame ); m_GerberFrame->Zoom_Automatique( TRUE ); m_GerberFrame->Zoom_Automatique( TRUE ); if( argc > 1 ) if( argc > 1 ) Loading Loading
change_log.txt +13 −2 Original line number Original line Diff line number Diff line Loading @@ -5,16 +5,27 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with email address. email address. 2008-Mar-3 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew Completed transision to BOARD::GetLayerName() and away from ReturnPcbLayerName(). LayerNames and LAYER_T are saved int the *.brd file and may be edited there with a text editor until the UI is in place to edit them in PCBNEW. To understand the strategy, see BOARD::GetLayerName() in class_board.cpp and see WinEDA_BasePcbFrame::ReadSetup(). I will be adding "Board" menu item to Preferences, but there is more to come before the UI gets done: net classes. 2008-mars-03 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-mars-03 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ ================================================================================ 3d display: 3d display: Added Jonas Diemer's patch (enhanced movings from mouse and tools) Added Jonas Diemer's patch (enhanced movings from mouse and tools) 2008-Mar-1 UPDATE Dick Hollenbeck <dick@softplc.com> 2008-Mar-1 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ================================================================================ +pcbnew +pcbnew Changed ioascii.cpp to save and load board specific layer names, for DEBUG Changed ioascii.cpp to save and load board specific layer names, for DEBUG build only. I want to add class LAYER, see below. Added build only. I want to add class LAYER, see below. Added BOARD::SetLayerName(), BOARD::SetLayerType(), and BOARD::GetLayerType(). BOARD::SetLayerName(), BOARD::SetLayerType(), and BOARD::GetLayerType(). Loading
common/common.cpp +2 −63 Original line number Original line Diff line number Diff line Loading @@ -265,8 +265,6 @@ void MyFree( void* pt_mem ) } } /**************************************************************/ /**************************************************************/ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) /**************************************************************/ /**************************************************************/ Loading @@ -276,32 +274,11 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) * (not internatinalized, no space) * (not internatinalized, no space) */ */ { { #if 1 && defined(DEBUG) // Dick: this code is working fine, but we have no place to store the layer names yet. const unsigned LAYER_LIMIT = 29; const unsigned LAYER_LIMIT = 29; // @todo: these layer names should be configurable on a per project basis. // These are only default layer names. For PCBNEW, the copper names // In anticipation of that enhancement, here is a different strategy for // may be over-ridden in the BOARD file *.brd. // deriving the file names from the "configured" layer names. // The main idea is to use a single array of names, and then remove // spaces on the fly from the names when writing to disk. #if 1 // my specific layer names static const wxString layer_name_list[] = { _( "H2 Bottom" ), _( "Power" ), _( "V2 Signal" ), _( "H1 Signal" ), _( "Ground" ), _( "Inner L5" ), _( "Inner L6" ), _( "Inner L7" ), _( "Inner L8" ), _( "Inner L9" ), _( "Inner L10" ), _( "Inner L11" ), _( "Inner L12" ), _( "Inner L13" ), _( "Inner L14" ), _( "Component" ), _( "Adhes Cop" ), _( "Adhes Cmp" ), _( "SoldP Cop" ), _( "SoldP Cmp" ), _( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop" ), _( "Mask Cmp" ), _( "Drawings " ), _( "Comments" ), _( "Eco1" ), _( "Eco2" ), _( "Edges Pcb" ), _( "BAD INDEX" ), }; #else static const wxString layer_name_list[] = { static const wxString layer_name_list[] = { _( "Copper " ), _( "Inner L1 " ), _( "Inner L2 " ), _( "Inner L3 " ), _( "Copper " ), _( "Inner L1 " ), _( "Inner L2 " ), _( "Inner L3 " ), _( "Inner L4 " ), _( "Inner L5 " ), _( "Inner L6 " ), _( "Inner L7 " ), _( "Inner L4 " ), _( "Inner L5 " ), _( "Inner L6 " ), _( "Inner L7 " ), Loading @@ -313,8 +290,6 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) _( "Edges Pcb" ), _( "BAD INDEX" ), _( "Edges Pcb" ), _( "BAD INDEX" ), }; }; #endif if( (unsigned) layer_number > LAYER_LIMIT ) if( (unsigned) layer_number > LAYER_LIMIT ) layer_number = LAYER_LIMIT; layer_number = LAYER_LIMIT; Loading @@ -332,42 +307,6 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) } } else else return *p; return *p; #else // long standing established code: static const wxString layer_name_list[] = { _( "Copper " ), _( "Inner L1 " ), _( "Inner L2 " ), _( "Inner L3 " ), _( "Inner L4 " ), _( "Inner L5 " ), _( "Inner L6 " ), _( "Inner L7 " ), _( "Inner L8 " ), _( "Inner L9 " ), _( "Inner L10" ), _( "Inner L11" ), _( "Inner L12" ), _( "Inner L13" ), _( "Inner L14" ), _( "Component" ), _( "Adhes Cop" ), _( "Adhes Cmp" ), _( "SoldP Cop" ), _( "SoldP Cmp" ), _( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop " ), _( "Mask Cmp " ), _( "Drawings " ), _( "Comments " ), _( "Eco1 " ), _( "Eco2 " ), _( "Edges Pcb" ), _( "--- " ), _( "--- " ), _( "--- " ) }; // Same as layer_name_list, without space, not internationalized static const wxString layer_name_list_for_filename[] = { wxT( "Copper" ), wxT( "InnerL1" ), wxT( "InnerL2" ), wxT( "InnerL3" ), wxT( "InnerL4" ), wxT( "InnerL5" ), wxT( "InnerL6" ), wxT( "InnerL7" ), wxT( "InnerL8" ), wxT( "InnerL9" ), wxT( "InnerL10" ), wxT( "InnerL11" ), wxT( "InnerL12" ), wxT( "InnerL13" ), wxT( "InnerL14" ), wxT( "Component" ), wxT( "AdhesCop" ), wxT( "AdhesCmp" ), wxT( "SoldPCop" ), wxT( "SoldPCmp" ), wxT( "SilkSCop" ), wxT( "SilkSCmp" ), wxT( "MaskCop" ), wxT( "MaskCmp" ), wxT( "Drawings" ), wxT( "Comments" ), wxT( "Eco1" ), wxT( "Eco2" ), wxT( "EdgesPcb" ), wxT( "---" ), wxT( "---" ), wxT( "---" ) }; if( (unsigned) layer_number >= 31u ) layer_number = 31; return omitSpacePadding ? layer_name_list_for_filename[layer_number] : layer_name_list[layer_number]; #endif } } Loading
common/projet_config.cpp +4 −3 Original line number Original line Diff line number Diff line Loading @@ -319,7 +319,8 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename, { { #undef PTCFG #undef PTCFG #define PTCFG ( (PARAM_CFG_DOUBLE*) pt_cfg ) #define PTCFG ( (PARAM_CFG_DOUBLE*) pt_cfg ) double ftmp = 0; wxString msg; double ftmp = 0; wxString msg; if( pt_cfg->m_Setup ) if( pt_cfg->m_Setup ) msg = m_EDA_Config->Read( pt_cfg->m_Ident, wxT( "" ) ); msg = m_EDA_Config->Read( pt_cfg->m_Ident, wxT( "" ) ); else else Loading
cvpcb/cfg.cpp +55 −47 Original line number Original line Diff line number Diff line Loading @@ -20,13 +20,14 @@ /**************************************************/ /**************************************************/ void Read_Config( const wxString& FileName ) void Read_Config( const wxString& FileName ) /**************************************************/ /**************************************************/ /* lit la configuration 1 - lit cvpcb.cnf 2 - si non trouve lit <chemin de cvpcb.exe>/cvpcb.cnf 3 - si non trouve: init des variables aux valeurs par defaut Remarque: /* lit la configuration le chemin de l'executable cvpcb.exe doit etre dans BinDir * 1 - lit cvpcb.cnf * 2 - si non trouve lit <chemin de cvpcb.exe>/cvpcb.cnf * 3 - si non trouve: init des variables aux valeurs par defaut * * Remarque: * le chemin de l'executable cvpcb.exe doit etre dans BinDir */ */ { { wxString FullFileName = FileName; wxString FullFileName = FileName; Loading @@ -38,8 +39,11 @@ wxString FullFileName = FileName ; g_EDA_Appl->ReadProjectConfig( FullFileName, g_EDA_Appl->ReadProjectConfig( FullFileName, GROUP, ParamCfgList, FALSE ); GROUP, ParamCfgList, FALSE ); if ( PkgInExtBuffer.IsEmpty() ) PkgInExtBuffer = wxT(".pkg"); if( PkgInExtBuffer.IsEmpty() ) if ( NetInExtBuffer.IsEmpty() ) NetInExtBuffer = wxT(".net"), PkgInExtBuffer = wxT( ".pkg" ); if( NetInExtBuffer.IsEmpty() ) NetInExtBuffer = wxT( ".net" ); /* Inits autres variables */ /* Inits autres variables */ SetRealLibraryPath( wxT( "modules" ) ); SetRealLibraryPath( wxT( "modules" ) ); Loading @@ -49,19 +53,22 @@ wxString FullFileName = FileName ; /************************************************************/ /************************************************************/ void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event ) void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event ) /************************************************************/ /************************************************************/ /* fonction relai d'appel a Save_Config, /* fonction relai d'appel a Save_Config, la vraie fonction de sauvegarde de la config * la vraie fonction de sauvegarde de la config */ */ { { Save_Config( this ); Save_Config( this ); } } /************************************/ /************************************/ void Save_Config( wxWindow* parent ) void Save_Config( wxWindow* parent ) /************************************/ /************************************/ /* enregistrement de la config */ /* enregistrement de la config */ { { wxString path, FullFileName; wxString path, FullFileName; wxString mask( wxT( "*" ) ); wxString mask( wxT( "*" ) ); FullFileName = FFileName; FullFileName = FFileName; Loading @@ -77,9 +84,10 @@ wxString mask( wxT("*")); wxFD_SAVE, wxFD_SAVE, TRUE TRUE ); ); if ( FullFileName.IsEmpty()) return; if( FullFileName.IsEmpty() ) return; /* ecriture de la configuration */ /* ecriture de la configuration */ g_EDA_Appl->WriteProjectConfig( FullFileName, GROUP, ParamCfgList ); g_EDA_Appl->WriteProjectConfig( FullFileName, GROUP, ParamCfgList ); } }
gerbview/gerbview.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -55,8 +55,6 @@ bool WinEDA_App::OnInit() SetTopWindow( m_GerberFrame ); SetTopWindow( m_GerberFrame ); m_GerberFrame->Show( TRUE ); m_GerberFrame->Show( TRUE ); m_GerberFrame->m_Pcb = new BOARD( NULL, m_GerberFrame ); m_GerberFrame->Zoom_Automatique( TRUE ); m_GerberFrame->Zoom_Automatique( TRUE ); if( argc > 1 ) if( argc > 1 ) Loading