Commit eda39ae8 authored by CHARRAS's avatar CHARRAS

pcbnew: drc control now generates a DRC report file

parent b9259f85
...@@ -4,6 +4,12 @@ Started 2007-June-11 ...@@ -4,6 +4,12 @@ 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.
2007-aug-02 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ pcbnew
Drc test now generates a DRC file report.
2007-Jul-31 UPDATE Geoff Harland <gharlandau@yahoo.com.au> 2007-Jul-31 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
================================================================================ ================================================================================
+ pcbnew + pcbnew
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -59,6 +59,8 @@ BEGIN_EVENT_TABLE( WinEDA_DrcFrame, wxDialog ) ...@@ -59,6 +59,8 @@ BEGIN_EVENT_TABLE( WinEDA_DrcFrame, wxDialog )
EVT_BUTTON( wxID_CLOSE, WinEDA_DrcFrame::OnCloseClick ) EVT_BUTTON( wxID_CLOSE, WinEDA_DrcFrame::OnCloseClick )
EVT_BUTTON( ID_BUTTON_BROWSE_RPT_FILE, WinEDA_DrcFrame::OnButtonBrowseRptFileClick )
////@end WinEDA_DrcFrame event table entries ////@end WinEDA_DrcFrame event table entries
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -98,6 +100,8 @@ bool WinEDA_DrcFrame::Create( wxWindow* parent, wxWindowID id, const wxString& c ...@@ -98,6 +100,8 @@ bool WinEDA_DrcFrame::Create( wxWindow* parent, wxWindowID id, const wxString& c
m_Pad2PadTestCtrl = NULL; m_Pad2PadTestCtrl = NULL;
m_UnconnectedTestCtrl = NULL; m_UnconnectedTestCtrl = NULL;
m_ZonesTestCtrl = NULL; m_ZonesTestCtrl = NULL;
m_CreateRptCtrl = NULL;
m_RptFilenameCtrl = NULL;
m_logWindow = NULL; m_logWindow = NULL;
////@end WinEDA_DrcFrame member initialisation ////@end WinEDA_DrcFrame member initialisation
...@@ -124,7 +128,7 @@ void WinEDA_DrcFrame::CreateControls() ...@@ -124,7 +128,7 @@ void WinEDA_DrcFrame::CreateControls()
SetFont(*g_DialogFont); SetFont(*g_DialogFont);
////@begin WinEDA_DrcFrame content construction ////@begin WinEDA_DrcFrame content construction
// Generated by DialogBlocks, 30/07/2007 12:44:15 (unregistered) // Generated by DialogBlocks, 02/08/2007 10:11:17 (unregistered)
WinEDA_DrcFrame* itemDialog1 = this; WinEDA_DrcFrame* itemDialog1 = this;
...@@ -162,39 +166,54 @@ void WinEDA_DrcFrame::CreateControls() ...@@ -162,39 +166,54 @@ void WinEDA_DrcFrame::CreateControls()
m_ZonesTestCtrl->SetValue(false); m_ZonesTestCtrl->SetValue(false);
itemStaticBoxSizer8->Add(m_ZonesTestCtrl, 0, wxGROW|wxALL, 5); itemStaticBoxSizer8->Add(m_ZonesTestCtrl, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL); m_CreateRptCtrl = new wxCheckBox( itemDialog1, ID_CHECKBOX_CREATE_FILE, _("Create Report file"), wxDefaultPosition, wxDefaultSize, 0 );
m_CommandSizer->Add(itemBoxSizer12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_CreateRptCtrl->SetValue(false);
itemStaticBoxSizer8->Add(m_CreateRptCtrl, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
m_CommandSizer->Add(itemBoxSizer13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBoxSizer* itemBoxSizer14 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer13->Add(itemBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer14->Add(itemBoxSizer15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxHORIZONTAL); wxButton* itemButton16 = new wxButton( itemDialog1, ID_DRC_RUN, _("Test Drc"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer12->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemButton16->SetForegroundColour(wxColour(202, 0, 0));
itemBoxSizer15->Add(itemButton16, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer14 = new wxBoxSizer(wxVERTICAL); wxButton* itemButton17 = new wxButton( itemDialog1, ID_STOP_CONTROL_DRC, _("Stop Drc"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer13->Add(itemBoxSizer14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemButton17->SetForegroundColour(wxColour(0, 128, 128));
itemBoxSizer15->Add(itemButton17, 0, wxGROW|wxALL, 5);
wxButton* itemButton15 = new wxButton( itemDialog1, ID_DRC_RUN, _("Test Drc"), wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxVERTICAL);
itemButton15->SetForegroundColour(wxColour(202, 0, 0)); itemBoxSizer14->Add(itemBoxSizer18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemBoxSizer14->Add(itemButton15, 0, wxGROW|wxALL, 5);
wxButton* itemButton16 = new wxButton( itemDialog1, ID_STOP_CONTROL_DRC, _("Stop Drc"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton19 = new wxButton( itemDialog1, ID_ERASE_DRC_MARKERS, _("Del Markers"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton16->SetForegroundColour(wxColour(0, 128, 128)); itemButton19->SetForegroundColour(wxColour(0, 128, 0));
itemBoxSizer14->Add(itemButton16, 0, wxGROW|wxALL, 5); itemBoxSizer18->Add(itemButton19, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxVERTICAL); wxButton* itemButton20 = new wxButton( itemDialog1, ID_LIST_UNCONNECTED_PADS, _("List Unconn"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer13->Add(itemBoxSizer17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemButton20->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer18->Add(itemButton20, 0, wxGROW|wxALL, 5);
wxButton* itemButton18 = new wxButton( itemDialog1, ID_ERASE_DRC_MARKERS, _("Del Markers"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton21 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton18->SetForegroundColour(wxColour(0, 128, 0)); itemBoxSizer13->Add(itemButton21, 0, wxGROW|wxALL, 5);
itemBoxSizer17->Add(itemButton18, 0, wxGROW|wxALL, 5);
wxButton* itemButton19 = new wxButton( itemDialog1, ID_LIST_UNCONNECTED_PADS, _("List Unconn"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticBox* itemStaticBoxSizer22Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Report File"));
itemButton19->SetForegroundColour(wxColour(0, 0, 255)); wxStaticBoxSizer* itemStaticBoxSizer22 = new wxStaticBoxSizer(itemStaticBoxSizer22Static, wxVERTICAL);
itemBoxSizer17->Add(itemButton19, 0, wxGROW|wxALL, 5); itemBoxSizer13->Add(itemStaticBoxSizer22, 0, wxGROW|wxALL, 5);
wxButton* itemButton20 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton23 = new wxButton( itemDialog1, ID_BUTTON_BROWSE_RPT_FILE, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer12->Add(itemButton20, 0, wxGROW|wxALL, 5); itemButton23->SetForegroundColour(wxColour(0, 128, 128));
itemStaticBoxSizer22->Add(itemButton23, 0, wxALIGN_LEFT|wxALL, 5);
wxStaticText* itemStaticText21 = new wxStaticText( itemDialog1, wxID_STATIC, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); m_RptFilenameCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_GET_RPT_FILENAME, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
m_MainSizer->Add(itemStaticText21, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemStaticBoxSizer22->Add(m_RptFilenameCtrl, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText25 = new wxStaticText( itemDialog1, wxID_STATIC, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MainSizer->Add(itemStaticText25, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_logWindow = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(-1, 200), wxTE_MULTILINE|wxTE_READONLY ); m_logWindow = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(-1, 200), wxTE_MULTILINE|wxTE_READONLY );
m_MainSizer->Add(m_logWindow, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); m_MainSizer->Add(m_logWindow, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
...@@ -203,9 +222,12 @@ void WinEDA_DrcFrame::CreateControls() ...@@ -203,9 +222,12 @@ void WinEDA_DrcFrame::CreateControls()
m_Pad2PadTestCtrl->SetValidator( wxGenericValidator(& s_Pad2PadTestOpt) ); m_Pad2PadTestCtrl->SetValidator( wxGenericValidator(& s_Pad2PadTestOpt) );
m_UnconnectedTestCtrl->SetValidator( wxGenericValidator(& s_UnconnectedTestOpt) ); m_UnconnectedTestCtrl->SetValidator( wxGenericValidator(& s_UnconnectedTestOpt) );
m_ZonesTestCtrl->SetValidator( wxGenericValidator(& s_ZonesTestOpt) ); m_ZonesTestCtrl->SetValidator( wxGenericValidator(& s_ZonesTestOpt) );
m_CreateRptCtrl->SetValidator( wxGenericValidator(& s_CreateRptFileOpt) );
////@end WinEDA_DrcFrame content construction ////@end WinEDA_DrcFrame content construction
AddUnitSymbol(*m_ClearenceTitle); AddUnitSymbol(*m_ClearenceTitle);
m_RptFilenameCtrl->SetValue(s_RptFilename);
} }
/*! /*!
...@@ -288,6 +310,7 @@ void WinEDA_DrcFrame::OnCloseClick( wxCommandEvent& event ) ...@@ -288,6 +310,7 @@ void WinEDA_DrcFrame::OnCloseClick( wxCommandEvent& event )
s_Pad2PadTestOpt = m_Pad2PadTestCtrl->IsChecked(); s_Pad2PadTestOpt = m_Pad2PadTestCtrl->IsChecked();
s_UnconnectedTestOpt = m_UnconnectedTestCtrl->IsChecked(); s_UnconnectedTestOpt = m_UnconnectedTestCtrl->IsChecked();
s_ZonesTestOpt = m_ZonesTestCtrl->IsChecked(); s_ZonesTestOpt = m_ZonesTestCtrl->IsChecked();
s_CreateRptFileOpt = m_CreateRptCtrl->IsChecked();
Close(); Close();
} }
...@@ -304,6 +327,35 @@ void WinEDA_DrcFrame::OnCloseWindow( wxCloseEvent& event ) ...@@ -304,6 +327,35 @@ void WinEDA_DrcFrame::OnCloseWindow( wxCloseEvent& event )
s_Pad2PadTestOpt = m_Pad2PadTestCtrl->IsChecked(); s_Pad2PadTestOpt = m_Pad2PadTestCtrl->IsChecked();
s_UnconnectedTestOpt = m_UnconnectedTestCtrl->IsChecked(); s_UnconnectedTestOpt = m_UnconnectedTestCtrl->IsChecked();
s_ZonesTestOpt = m_ZonesTestCtrl->IsChecked(); s_ZonesTestOpt = m_ZonesTestCtrl->IsChecked();
s_CreateRptFileOpt = m_CreateRptCtrl->IsChecked();
event.Skip(); event.Skip();
} }
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON_BROWSE_RPT_FILE
*/
void WinEDA_DrcFrame::OnButtonBrowseRptFileClick( wxCommandEvent& event )
{
wxString FileName, Mask(wxT("*")), Ext(wxT(".rpt"));
FileName = m_Parent->m_CurrentScreen->m_FileName;
ChangeFileNameExt(FileName, wxT("-drc") + Ext);
Mask += Ext;
FileName = EDA_FileSelector(_("Drill Report file"),
wxEmptyString, /* Chemin par defaut */
FileName, /* nom fichier par defaut */
Ext, /* extension par defaut */
Mask, /* Masque d'affichage */
this,
wxFD_SAVE,
TRUE
);
if ( FileName.IsEmpty()) return;
m_RptFilenameCtrl->SetValue(FileName);
s_RptFilename = FileName;
}
...@@ -44,10 +44,13 @@ class wxBoxSizer; ...@@ -44,10 +44,13 @@ class wxBoxSizer;
#define ID_CHECKBOX_PAD2PAD 10009 #define ID_CHECKBOX_PAD2PAD 10009
#define ID_CHECKBOX 10008 #define ID_CHECKBOX 10008
#define ID_CHECKBOX_TEST_ZONES 10007 #define ID_CHECKBOX_TEST_ZONES 10007
#define ID_CHECKBOX_CREATE_FILE 10012
#define ID_DRC_RUN 10003 #define ID_DRC_RUN 10003
#define ID_STOP_CONTROL_DRC 10004 #define ID_STOP_CONTROL_DRC 10004
#define ID_ERASE_DRC_MARKERS 10005 #define ID_ERASE_DRC_MARKERS 10005
#define ID_LIST_UNCONNECTED_PADS 10006 #define ID_LIST_UNCONNECTED_PADS 10006
#define ID_BUTTON_BROWSE_RPT_FILE 10011
#define ID_TEXTCTRL_GET_RPT_FILENAME 10010
#define ID_TEXTCTRL 10001 #define ID_TEXTCTRL 10001
#define SYMBOL_WINEDA_DRCFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX #define SYMBOL_WINEDA_DRCFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WINEDA_DRCFRAME_TITLE _("DRC Control") #define SYMBOL_WINEDA_DRCFRAME_TITLE _("DRC Control")
...@@ -105,6 +108,9 @@ public: ...@@ -105,6 +108,9 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
void OnCloseClick( wxCommandEvent& event ); void OnCloseClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON_BROWSE_RPT_FILE
void OnButtonBrowseRptFileClick( wxCommandEvent& event );
////@end WinEDA_DrcFrame event handler declarations ////@end WinEDA_DrcFrame event handler declarations
////@begin WinEDA_DrcFrame member function declarations ////@begin WinEDA_DrcFrame member function declarations
...@@ -131,6 +137,8 @@ public: ...@@ -131,6 +137,8 @@ public:
wxCheckBox* m_Pad2PadTestCtrl; wxCheckBox* m_Pad2PadTestCtrl;
wxCheckBox* m_UnconnectedTestCtrl; wxCheckBox* m_UnconnectedTestCtrl;
wxCheckBox* m_ZonesTestCtrl; wxCheckBox* m_ZonesTestCtrl;
wxCheckBox* m_CreateRptCtrl;
wxTextCtrl* m_RptFilenameCtrl;
wxTextCtrl* m_logWindow; wxTextCtrl* m_logWindow;
////@end WinEDA_DrcFrame member variables ////@end WinEDA_DrcFrame member variables
WinEDA_PcbFrame * m_Parent; WinEDA_PcbFrame * m_Parent;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment