Commit dfffee82 authored by charras's avatar charras

Pcbnew: in DRC dialog: removed options, that are no more useful with the new zone handling.

(all test are now always performed)
parent 17bf2435
No preview for this file type
This diff is collapsed.
This diff is collapsed.
...@@ -84,7 +84,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -84,7 +84,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
m_RptFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_RptFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_RptFilenameCtrl->SetToolTip( _("Enter the report filename") ); m_RptFilenameCtrl->SetToolTip( _("Enter the report filename") );
m_RptFilenameCtrl->SetMinSize( wxSize( 200,-1 ) ); m_RptFilenameCtrl->SetMinSize( wxSize( 250,-1 ) );
ReportFileSizer->Add( m_RptFilenameCtrl, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); ReportFileSizer->Add( m_RptFilenameCtrl, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
...@@ -95,33 +95,21 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -95,33 +95,21 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
sbSizerOptions->Add( bSizer7, 1, wxEXPAND, 5 ); sbSizerOptions->Add( bSizer7, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizer3; m_CommandSizer->Add( sbSizerOptions, 0, 0, 5 );
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Include Tests For:") ), wxVERTICAL );
m_Pad2PadTestCtrl = new wxCheckBox( this, wxID_ANY, _("Pad to pad"), wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* bSizerMessages;
m_Pad2PadTestCtrl->SetValue(true); bSizerMessages = new wxBoxSizer( wxVERTICAL );
m_Pad2PadTestCtrl->SetToolTip( _("Include tests for clearances between pad to pads") ); m_staticText6 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_Pad2PadTestCtrl->SetHelpText( _("Include tests for clearances between pad to pads") ); m_staticText6->Wrap( -1 );
bSizerMessages->Add( m_staticText6, 0, wxRIGHT|wxLEFT, 5 );
sbSizer3->Add( m_Pad2PadTestCtrl, 0, wxALL, 5 ); m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY );
m_Messages->SetMinSize( wxSize( 160,-1 ) );
m_ZonesTestCtrl = new wxCheckBox( this, wxID_ANY, _("Zones"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerMessages->Add( m_Messages, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_ZonesTestCtrl->SetToolTip( _("Include zones in clearance or unconnected tests") ); m_CommandSizer->Add( bSizerMessages, 1, wxEXPAND, 5 );
sbSizer3->Add( m_ZonesTestCtrl, 0, wxALL, 5 );
m_UnconnectedTestCtrl = new wxCheckBox( this, wxID_ANY, _("Unconnected pads"), wxDefaultPosition, wxDefaultSize, 0 );
m_UnconnectedTestCtrl->SetValue(true);
m_UnconnectedTestCtrl->SetToolTip( _("Find unconnected pads") );
sbSizer3->Add( m_UnconnectedTestCtrl, 0, wxALL, 5 );
sbSizerOptions->Add( sbSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_CommandSizer->Add( sbSizerOptions, 1, 0, 5 );
wxBoxSizer* bSizer11; wxBoxSizer* bSizer11;
bSizer11 = new wxBoxSizer( wxVERTICAL ); bSizer11 = new wxBoxSizer( wxVERTICAL );
......
This diff is collapsed.
...@@ -56,6 +56,8 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog ...@@ -56,6 +56,8 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
; ;
wxStaticText* m_MicroViaMinTitle; wxStaticText* m_MicroViaMinTitle;
wxButton* m_BrowseButton; wxButton* m_BrowseButton;
wxStaticText* m_staticText6;
wxTextCtrl* m_Messages;
wxButton* m_buttonRunDRC; wxButton* m_buttonRunDRC;
wxButton* m_buttonListUnconnected; wxButton* m_buttonListUnconnected;
wxButton* m_DeleteAllButton; wxButton* m_DeleteAllButton;
...@@ -90,12 +92,9 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog ...@@ -90,12 +92,9 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
wxTextCtrl* m_SetMicroViakMinSizeCtrl; wxTextCtrl* m_SetMicroViakMinSizeCtrl;
wxCheckBox* m_CreateRptCtrl; wxCheckBox* m_CreateRptCtrl;
wxTextCtrl* m_RptFilenameCtrl; wxTextCtrl* m_RptFilenameCtrl;
wxCheckBox* m_Pad2PadTestCtrl;
wxCheckBox* m_ZonesTestCtrl;
wxCheckBox* m_UnconnectedTestCtrl;
DRCLISTBOX* m_ClearanceListBox; DRCLISTBOX* m_ClearanceListBox;
DRCLISTBOX* m_UnconnectedListBox; DRCLISTBOX* m_UnconnectedListBox;
DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DRC Control"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 678,508 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DRC Control"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 683,508 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DRC_CONTROL_BASE(); ~DIALOG_DRC_CONTROL_BASE();
}; };
......
...@@ -70,10 +70,6 @@ void DRC::ShowDialog() ...@@ -70,10 +70,6 @@ void DRC::ShowDialog()
PutValueInLocalUnits( *m_ui->m_SetMicroViakMinSizeCtrl, g_DesignSettings.m_MicroViasMinSize, PutValueInLocalUnits( *m_ui->m_SetMicroViakMinSizeCtrl, g_DesignSettings.m_MicroViasMinSize,
m_mainWindow->m_InternalUnits );; m_mainWindow->m_InternalUnits );;
m_ui->m_Pad2PadTestCtrl->SetValue( m_doPad2PadTest );
m_ui->m_ZonesTestCtrl->SetValue( m_doZonesTest );
m_ui->m_UnconnectedTestCtrl->SetValue( m_doUnconnectedTest );
m_ui->m_CreateRptCtrl->SetValue( m_doCreateRptFile ); m_ui->m_CreateRptCtrl->SetValue( m_doCreateRptFile );
m_ui->m_RptFilenameCtrl->SetValue( m_rptFilename ); m_ui->m_RptFilenameCtrl->SetValue( m_rptFilename );
} }
...@@ -92,9 +88,6 @@ void DRC::DestroyDialog( int aReason ) ...@@ -92,9 +88,6 @@ void DRC::DestroyDialog( int aReason )
{ {
// if user clicked OK, save his choices in this DRC object. // if user clicked OK, save his choices in this DRC object.
m_doCreateRptFile = m_ui->m_CreateRptCtrl->GetValue(); m_doCreateRptFile = m_ui->m_CreateRptCtrl->GetValue();
m_doPad2PadTest = m_ui->m_Pad2PadTestCtrl->GetValue();
m_doZonesTest = m_ui->m_ZonesTestCtrl->GetValue();
m_doUnconnectedTest = m_ui->m_UnconnectedTestCtrl->GetValue();
m_rptFilename = m_ui->m_RptFilenameCtrl->GetValue(); m_rptFilename = m_ui->m_RptFilenameCtrl->GetValue();
} }
...@@ -112,9 +105,9 @@ DRC::DRC( WinEDA_PcbFrame* aPcbWindow ) ...@@ -112,9 +105,9 @@ DRC::DRC( WinEDA_PcbFrame* aPcbWindow )
m_ui = 0; m_ui = 0;
// establish initial values for everything: // establish initial values for everything:
m_doPad2PadTest = true; m_doPad2PadTest = true; // enable pad to pad clearance tests
m_doUnconnectedTest = true; m_doUnconnectedTest = true; // enable unconnected tests
m_doZonesTest = false; m_doZonesTest = true; // enable zone to items clearance tests
m_doCreateRptFile = false; m_doCreateRptFile = false;
...@@ -198,34 +191,62 @@ int DRC::Drc( ZONE_CONTAINER* aArea, int CornerIndex ) ...@@ -198,34 +191,62 @@ int DRC::Drc( ZONE_CONTAINER* aArea, int CornerIndex )
* will actually run all the tests specified with a previous call to * will actually run all the tests specified with a previous call to
* SetSettings() * SetSettings()
*/ */
void DRC::RunTests() void DRC::RunTests(wxTextCtrl * aMessages)
{ {
// Ensure ratsnest is up to date: // Ensure ratsnest is up to date:
if( (m_pcb->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) if( (m_pcb->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 )
{
if ( aMessages )
aMessages->AppendText( _("Compile Ratsnest") );
m_mainWindow->Compile_Ratsnest( NULL, true ); m_mainWindow->Compile_Ratsnest( NULL, true );
if ( aMessages )
aMessages->AppendText( _(" Ok\n"));
}
// someone should have cleared the two lists before calling this. // someone should have cleared the two lists before calling this.
// test pad to pad clearances, nothing to do with tracks, vias or zones. // test pad to pad clearances, nothing to do with tracks, vias or zones.
if( m_doPad2PadTest ) if( m_doPad2PadTest )
{
if ( aMessages )
aMessages->AppendText( _("Test pads to pads clearance") );
testPad2Pad(); testPad2Pad();
if ( aMessages )
aMessages->AppendText( _("\n"));
}
// test track and via clearances to other tracks, pads, and vias // test track and via clearances to other tracks, pads, and vias
testTracks(); testTracks();
// Before testing segments and unconnected, refill all zones: // Before testing segments and unconnected, refill all zones:
// this is a good caution, because filled areas can be outdated. // this is a good caution, because filled areas can be outdated.
if ( aMessages )
aMessages->AppendText( _("Fill zones") );
m_mainWindow->Fill_All_Zones( false ); m_mainWindow->Fill_All_Zones( false );
if ( aMessages )
aMessages->AppendText( _(" Ok\n"));
// test zone clearances to other zones, pads, tracks, and vias // test zone clearances to other zones, pads, tracks, and vias
if ( aMessages && m_doZonesTest)
aMessages->AppendText( _("Test zones") );
testZones( m_doZonesTest ); testZones( m_doZonesTest );
if ( aMessages && m_doZonesTest)
aMessages->AppendText( _("\n"));
// find and gather unconnected pads. // find and gather unconnected pads.
if( m_doUnconnectedTest ) if( m_doUnconnectedTest )
{
if ( aMessages )
aMessages->AppendText( _("List unconnected pads") );
testUnconnected(); testUnconnected();
if ( aMessages )
aMessages->AppendText( _("\n"));
}
// update the m_ui listboxes // update the m_ui listboxes
updatePointers(); updatePointers();
if ( aMessages )
aMessages->AppendText( _("Finished\n") );
} }
......
...@@ -593,8 +593,9 @@ public: ...@@ -593,8 +593,9 @@ public:
* Function RunTests * Function RunTests
* will actually run all the tests specified with a previous call to * will actually run all the tests specified with a previous call to
* SetSettings() * SetSettings()
* @param aMessages = a wxTextControl where to display some activity messages. Can be NULL
*/ */
void RunTests(); void RunTests(wxTextCtrl * aMessages = NULL);
/** /**
......
...@@ -102,7 +102,6 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb ) ...@@ -102,7 +102,6 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
/** Function Compile_Ratsnest /** Function Compile_Ratsnest
* Create the entire board ratsnesr. * Create the entire board ratsnesr.
* Msut be called AFTER the connectivity computation
* Must be called after a board change (changes for * Must be called after a board change (changes for
* pads, footprints or a read netlist ). * pads, footprints or a read netlist ).
* *
......
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