diff --git a/common/pcb.keywords b/common/pcb.keywords index ec20b0b7ae..5e0f9a7b43 100644 --- a/common/pcb.keywords +++ b/common/pcb.keywords @@ -164,6 +164,7 @@ trace_clearance trapezoid thru thru_hole +thru_hole_only tstamp user user_trace_width diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index c9a74cc03d..ca20a621f4 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -149,6 +149,14 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) m_buttonPrint->SetDefault(); } +void DIALOG_PRINT_USING_PRINTER::GetPrintOptions() +{ + SCH_EDIT_FRAME* parent = GetParent(); + + parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); + parent->SetPrintSheetReference( m_checkReference->IsChecked() ); +} + void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) { @@ -160,8 +168,7 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) parent->SetPrintDialogSize( GetSize() ); } - parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); - parent->SetPrintSheetReference( m_checkReference->IsChecked() ); + GetPrintOptions(); EndDialog( wxID_CANCEL ); } @@ -187,8 +194,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) { SCH_EDIT_FRAME* parent = GetParent(); - parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); - parent->SetPrintSheetReference( m_checkReference->IsChecked() ); + GetPrintOptions(); // Pass two printout objects: for preview, and possible printing. wxString title = _( "Preview" ); @@ -216,8 +222,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) { SCH_EDIT_FRAME* parent = GetParent(); - parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); - parent->SetPrintSheetReference( m_checkReference->IsChecked() ); + GetPrintOptions(); wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() ); printDialogData.SetMaxPage( g_RootSheet->CountSheets() ); diff --git a/eeschema/dialogs/dialog_print_using_printer.h b/eeschema/dialogs/dialog_print_using_printer.h index 662babed60..5924d45fb4 100644 --- a/eeschema/dialogs/dialog_print_using_printer.h +++ b/eeschema/dialogs/dialog_print_using_printer.h @@ -26,6 +26,8 @@ private: void OnPrintPreview( wxCommandEvent& event ); void OnPrintButtonClick( wxCommandEvent& event ); void OnButtonCancelClick( wxCommandEvent& event ){ Close(); } + + void GetPrintOptions(); }; diff --git a/eeschema/dialogs/dialog_print_using_printer_base.cpp b/eeschema/dialogs/dialog_print_using_printer_base.cpp index 7cdb88f6c1..e3e584456c 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.cpp +++ b/eeschema/dialogs/dialog_print_using_printer_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Mar 17 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -19,16 +19,22 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare wxBoxSizer* bleftSizer; bleftSizer = new wxBoxSizer( wxVERTICAL ); - m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkReference->SetValue(true); + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Print options:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + bleftSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT, 5 ); + + m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkReference->SetValue(true); m_checkReference->SetToolTip( _("Print (or not) the Frame references.") ); - bleftSizer->Add( m_checkReference, 0, wxALL, 5 ); + bleftSizer->Add( m_checkReference, 0, wxALL, 10 ); m_checkMonochrome = new wxCheckBox( this, wxID_ANY, _("Print in &black and white only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkMonochrome->SetValue(true); + bleftSizer->Add( m_checkMonochrome, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); - bleftSizer->Add( m_checkMonochrome, 0, wxALL, 5 ); bMainSizer->Add( bleftSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 12 ); @@ -47,11 +53,12 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + bMainSizer->Add( bbuttonsSizer, 0, wxALL, 12 ); + this->SetSizer( bMainSizer ); this->Layout(); - bMainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); @@ -71,4 +78,5 @@ DIALOG_PRINT_USING_PRINTER_BASE::~DIALOG_PRINT_USING_PRINTER_BASE() m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this ); m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this ); + } diff --git a/eeschema/dialogs/dialog_print_using_printer_base.fbp b/eeschema/dialogs/dialog_print_using_printer_base.fbp index 007188f6ac..b8cfa1792b 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.fbp +++ b/eeschema/dialogs/dialog_print_using_printer_base.fbp @@ -1,11 +1,12 @@ - + C++ 1 source_name + 0 0 res UTF-8 @@ -19,6 +20,7 @@ . 1 + 1 1 1 0 @@ -27,8 +29,11 @@ 1 1 1 + 0 + + @@ -51,7 +56,6 @@ 0 0 wxID_ANY - 0 @@ -65,11 +69,9 @@ 1 - Resizable - 1 - -1,-1 + 388,185 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Print @@ -134,6 +136,93 @@ none 5 + wxTOP|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Print options: + + 0 + + + 0 + + 1 + m_staticText1 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 wxALL 0 @@ -141,7 +230,10 @@ 1 1 1 + + + @@ -163,7 +255,6 @@ 0 wxID_ANY Print sheet &reference and title block - 0 @@ -178,9 +269,7 @@ protected 1 - Resizable - 1 @@ -221,21 +310,24 @@ - 5 - wxALL + 10 + wxBOTTOM|wxRIGHT|wxLEFT 0 1 1 1 1 + + + 1 0 - 0 + 1 1 1 @@ -251,7 +343,6 @@ 0 wxID_ANY Print in &black and white only - 0 @@ -266,9 +357,7 @@ protected 1 - Resizable - 1 @@ -328,7 +417,10 @@ 1 1 1 + + + @@ -350,7 +442,6 @@ 0 wxID_ANY Page Setup - 0 @@ -365,9 +456,7 @@ protected 1 - Resizable - 1 @@ -416,7 +505,10 @@ 1 1 1 + + + @@ -438,7 +530,6 @@ 0 wxID_ANY Preview - 0 @@ -453,9 +544,7 @@ protected 1 - Resizable - 1 @@ -504,7 +593,10 @@ 1 1 1 + + + @@ -526,7 +618,6 @@ 0 wxID_ANY Print - 0 @@ -541,9 +632,7 @@ protected 1 - Resizable - 1 @@ -592,7 +681,10 @@ 1 1 1 + + + @@ -614,7 +706,6 @@ 0 wxID_CANCEL Close - 0 @@ -629,9 +720,7 @@ protected 1 - Resizable - 1 diff --git a/eeschema/dialogs/dialog_print_using_printer_base.h b/eeschema/dialogs/dialog_print_using_printer_base.h index 44e03da97d..3bc79205cc 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.h +++ b/eeschema/dialogs/dialog_print_using_printer_base.h @@ -1,21 +1,23 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Mar 17 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_print_using_printer_base__ -#define __dialog_print_using_printer_base__ +#ifndef __DIALOG_PRINT_USING_PRINTER_BASE_H__ +#define __DIALOG_PRINT_USING_PRINTER_BASE_H__ +#include +#include #include - #include -#include +#include #include #include #include #include +#include #include #include #include @@ -30,6 +32,7 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public wxDialog private: protected: + wxStaticText* m_staticText1; wxCheckBox* m_checkReference; wxCheckBox* m_checkMonochrome; wxButton* m_buttonPageSetup; @@ -38,18 +41,19 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public wxDialog wxButton* m_buttonQuit; // Virtual event handlers, overide them in your derived class - virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); } - virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } - virtual void OnPageSetup( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } + virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } + virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,185 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PRINT_USING_PRINTER_BASE(); }; -#endif //__dialog_print_using_printer_base__ +#endif //__DIALOG_PRINT_USING_PRINTER_BASE_H__ diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index b5426adced..0bf5e95949 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -199,10 +199,14 @@ void DIALOG_COPPER_ZONE::initDialog() switch( m_settings.GetPadConnection() ) { - case PAD_NOT_IN_ZONE: // Pads are not covered + case THT_THERMAL: // Thermals only for THT pads m_PadInZoneOpt->SetSelection( 2 ); break; + case PAD_NOT_IN_ZONE: // Pads are not covered + m_PadInZoneOpt->SetSelection( 3 ); + break; + default: case THERMAL_PAD: // Use thermal relief for pads m_PadInZoneOpt->SetSelection( 1 ); @@ -213,7 +217,9 @@ void DIALOG_COPPER_ZONE::initDialog() break; } - if( m_settings.GetPadConnection() != THERMAL_PAD ) + // Antipad and spokes are significant only for thermals + if( m_settings.GetPadConnection() != THERMAL_PAD && + m_settings.GetPadConnection() != THT_THERMAL ) { m_AntipadSizeValue->Enable( false ); m_CopperWidthValue->Enable( false ); @@ -341,11 +347,16 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab { switch( m_PadInZoneOpt->GetSelection() ) { - case 2: + case 3: // Pads are not covered m_settings.SetPadConnection( PAD_NOT_IN_ZONE ); break; + case 2: + // Use thermal relief for THT pads + m_settings.SetPadConnection( THT_THERMAL ); + break; + case 1: // Use thermal relief for pads m_settings.SetPadConnection( THERMAL_PAD ); @@ -566,6 +577,7 @@ void DIALOG_COPPER_ZONE::OnPadsInZoneClick( wxCommandEvent& event ) m_CopperWidthValue->Enable( false ); break; + case 2: case 1: m_AntipadSizeValue->Enable( true ); m_CopperWidthValue->Enable( true ); diff --git a/pcbnew/dialogs/dialog_copper_zones_base.cpp b/pcbnew/dialogs/dialog_copper_zones_base.cpp index b793d06e6c..4bd894adb9 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.cpp +++ b/pcbnew/dialogs/dialog_copper_zones_base.cpp @@ -1,268 +1,268 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 11 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_copper_zones_base.h" - -/////////////////////////////////////////////////////////////////////////// - -BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM ) - EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose ) - EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize ) - EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected ) - EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice ) - EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick ) - EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones ) - EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick ) - EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick ) -END_EVENT_TABLE() - -DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - m_MainBoxSizer = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* m_OptionsBoxSizer; - m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); - - m_layerSizer = new wxBoxSizer( wxVERTICAL ); - - m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText17->Wrap( -1 ); - m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - - m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2->Wrap( -1 ); - bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* m_NetSortOptSizer; - m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); - - m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; - int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); - m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); - m_NetDisplayOption->SetSelection( 0 ); - m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText5->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") ); - - m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText51->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") ); - - m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 ); - m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 ); - - - m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 ); - - - m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* m_ExportableSetupSizer; - m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL ); - - wxBoxSizer* bSizer9; - bSizer9 = new wxBoxSizer( wxVERTICAL ); - - m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ClearanceValueTitle->Wrap( -1 ); - bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MinThicknessValueTitle->Wrap( -1 ); - m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") ); - - bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText151->Wrap( -1 ); - bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; - int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); - m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); - m_cornerSmoothingChoice->SetSelection( 0 ); - bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cornerSmoothingTitle->Wrap( -1 ); - bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 ); - - wxBoxSizer* m_LeftBox; - m_LeftBox = new wxBoxSizer( wxVERTICAL ); - - m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13->Wrap( -1 ); - m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") }; - int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); - m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); - m_PadInZoneOpt->SetSelection( 0 ); - m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - wxStaticBoxSizer* m_ThermalShapesParamsSizer; - m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL ); - - m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - m_AntipadSizeText->Wrap( -1 ); - m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); - - m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 ); - m_CopperBridgeWidthText->Wrap( -1 ); - m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); - - m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 ); - - - m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 ); - - wxBoxSizer* m_MiddleBox; - m_MiddleBox = new wxBoxSizer( wxVERTICAL ); - - m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText171->Wrap( -1 ); - m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") ); - - m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 ); - - m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 ); - m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") }; - int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); - m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 ); - m_FillModeCtrl->SetSelection( 0 ); - m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12->Wrap( -1 ); - m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") }; - int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString ); - m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 ); - m_ArcApproximationOpt->SetSelection( 0 ); - m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer81; - bSizer81 = new wxBoxSizer( wxVERTICAL ); - - m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText14->Wrap( -1 ); - bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") }; - int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); - m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 ); - m_OrientEdgesOpt->SetSelection( 0 ); - bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; - int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); - m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 ); - m_OutlineAppearanceCtrl->SetSelection( 0 ); - bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); - - - m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - - m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") ); - - bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 ); - - m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OkButton->SetDefault(); - bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 ); - - m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 ); - - - m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 ); - - - this->SetSizer( m_MainBoxSizer ); - this->Layout(); -} - -DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE() -{ -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_copper_zones_base.h" + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM ) + EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose ) + EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize ) + EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected ) + EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice ) + EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick ) + EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones ) + EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick ) + EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick ) +END_EVENT_TABLE() + +DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + m_MainBoxSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* m_OptionsBoxSizer; + m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_layerSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17->Wrap( -1 ); + m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + + m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* m_NetSortOptSizer; + m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; + int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); + m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); + m_NetDisplayOption->SetSelection( 0 ); + m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") ); + + m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText51->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") ); + + m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 ); + m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 ); + + + m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 ); + + + m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* m_ExportableSetupSizer; + m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxVERTICAL ); + + m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ClearanceValueTitle->Wrap( -1 ); + bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MinThicknessValueTitle->Wrap( -1 ); + m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") ); + + bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText151->Wrap( -1 ); + bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; + int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); + m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); + m_cornerSmoothingChoice->SetSelection( 0 ); + bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerSmoothingTitle->Wrap( -1 ); + bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 ); + + wxBoxSizer* m_LeftBox; + m_LeftBox = new wxBoxSizer( wxVERTICAL ); + + m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT Thermal"), _("None") }; + int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); + m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); + m_PadInZoneOpt->SetSelection( 0 ); + m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + wxStaticBoxSizer* m_ThermalShapesParamsSizer; + m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL ); + + m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AntipadSizeText->Wrap( -1 ); + m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); + + m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperBridgeWidthText->Wrap( -1 ); + m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); + + m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 ); + + + m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 ); + + wxBoxSizer* m_MiddleBox; + m_MiddleBox = new wxBoxSizer( wxVERTICAL ); + + m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText171->Wrap( -1 ); + m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") ); + + m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 ); + + m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 ); + m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") }; + int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); + m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 ); + m_FillModeCtrl->SetSelection( 0 ); + m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") }; + int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString ); + m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 ); + m_ArcApproximationOpt->SetSelection( 0 ); + m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer81; + bSizer81 = new wxBoxSizer( wxVERTICAL ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") }; + int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); + m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 ); + m_OrientEdgesOpt->SetSelection( 0 ); + bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; + int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); + m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 ); + m_OutlineAppearanceCtrl->SetSelection( 0 ); + bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); + + + m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") ); + + bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 ); + + m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OkButton->SetDefault(); + bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 ); + + m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 ); + + + m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 ); + + + this->SetSizer( m_MainBoxSizer ); + this->Layout(); +} + +DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE() +{ +} diff --git a/pcbnew/dialogs/dialog_copper_zones_base.fbp b/pcbnew/dialogs/dialog_copper_zones_base.fbp index bb67a02271..078e126f50 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.fbp +++ b/pcbnew/dialogs/dialog_copper_zones_base.fbp @@ -1825,7 +1825,7 @@ 1 0 - "Solid" "Thermal relief" "None" + "Solid" "Thermal relief" "THT Thermal" "None" 1 1 diff --git a/pcbnew/dialogs/dialog_copper_zones_base.h b/pcbnew/dialogs/dialog_copper_zones_base.h index 14617522f2..b48bfc2c77 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.h +++ b/pcbnew/dialogs/dialog_copper_zones_base.h @@ -1,132 +1,132 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 11 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_COPPER_ZONES_BASE_H__ -#define __DIALOG_COPPER_ZONES_BASE_H__ - -#include -#include -#include -#include "dialog_shim.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_COPPER_ZONE_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM -{ - DECLARE_EVENT_TABLE() - private: - - // Private event handlers - void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } - void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } - void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } - void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } - void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } - void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); } - void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); } - void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } - void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } - - - protected: - enum - { - ID_DIALOG_COPPER_ZONE_BASE = 1000, - ID_NETNAME_SELECTION, - ID_M_NETDISPLAYOPTION, - ID_TEXTCTRL_NETNAMES_FILTER, - wxID_APPLY_FILTERS, - ID_CORNER_SMOOTHING, - ID_M_CORNERSMOOTHINGCTRL, - ID_M_PADINZONEOPT, - wxID_ANTIPAD_SIZE, - wxID_COPPER_BRIDGE_VALUE, - ID_M_PRIORITYLEVELCTRL, - ID_M_FILLMODECTRL, - ID_M_ARCAPPROXIMATIONOPT, - ID_M_ORIENTEDGESOPT, - ID_M_OUTLINEAPPEARANCECTRL, - wxID_BUTTON_EXPORT - }; - - wxBoxSizer* m_MainBoxSizer; - wxBoxSizer* m_layerSizer; - wxStaticText* m_staticText17; - wxStaticText* m_staticText2; - wxListBox* m_ListNetNameSelection; - wxStaticText* m_staticText16; - wxChoice* m_NetDisplayOption; - wxStaticText* m_staticText5; - wxTextCtrl* m_DoNotShowNetNameFilter; - wxStaticText* m_staticText51; - wxTextCtrl* m_ShowNetNameFilter; - wxButton* m_buttonRunFilter; - wxStaticText* m_ClearanceValueTitle; - wxTextCtrl* m_ZoneClearanceCtrl; - wxStaticText* m_MinThicknessValueTitle; - wxTextCtrl* m_ZoneMinThicknessCtrl; - wxStaticText* m_staticText151; - wxChoice* m_cornerSmoothingChoice; - wxStaticText* m_cornerSmoothingTitle; - wxTextCtrl* m_cornerSmoothingCtrl; - wxStaticText* m_staticText13; - wxChoice* m_PadInZoneOpt; - wxStaticText* m_AntipadSizeText; - wxTextCtrl* m_AntipadSizeValue; - wxStaticText* m_CopperBridgeWidthText; - wxTextCtrl* m_CopperWidthValue; - wxStaticText* m_staticText171; - wxSpinCtrl* m_PriorityLevelCtrl; - wxStaticText* m_staticText11; - wxChoice* m_FillModeCtrl; - wxStaticText* m_staticText12; - wxChoice* m_ArcApproximationOpt; - wxStaticText* m_staticText14; - wxChoice* m_OrientEdgesOpt; - wxStaticText* m_staticText15; - wxChoice* m_OutlineAppearanceCtrl; - wxButton* m_ExportSetupButton; - wxButton* m_OkButton; - wxButton* m_ButtonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } - virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } - virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); } - virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_COPPER_ZONE_BASE(); - -}; - -#endif //__DIALOG_COPPER_ZONES_BASE_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_COPPER_ZONES_BASE_H__ +#define __DIALOG_COPPER_ZONES_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_COPPER_ZONE_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM +{ + DECLARE_EVENT_TABLE() + private: + + // Private event handlers + void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } + void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } + void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } + void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } + void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } + void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); } + void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); } + void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } + void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } + + + protected: + enum + { + ID_DIALOG_COPPER_ZONE_BASE = 1000, + ID_NETNAME_SELECTION, + ID_M_NETDISPLAYOPTION, + ID_TEXTCTRL_NETNAMES_FILTER, + wxID_APPLY_FILTERS, + ID_CORNER_SMOOTHING, + ID_M_CORNERSMOOTHINGCTRL, + ID_M_PADINZONEOPT, + wxID_ANTIPAD_SIZE, + wxID_COPPER_BRIDGE_VALUE, + ID_M_PRIORITYLEVELCTRL, + ID_M_FILLMODECTRL, + ID_M_ARCAPPROXIMATIONOPT, + ID_M_ORIENTEDGESOPT, + ID_M_OUTLINEAPPEARANCECTRL, + wxID_BUTTON_EXPORT + }; + + wxBoxSizer* m_MainBoxSizer; + wxBoxSizer* m_layerSizer; + wxStaticText* m_staticText17; + wxStaticText* m_staticText2; + wxListBox* m_ListNetNameSelection; + wxStaticText* m_staticText16; + wxChoice* m_NetDisplayOption; + wxStaticText* m_staticText5; + wxTextCtrl* m_DoNotShowNetNameFilter; + wxStaticText* m_staticText51; + wxTextCtrl* m_ShowNetNameFilter; + wxButton* m_buttonRunFilter; + wxStaticText* m_ClearanceValueTitle; + wxTextCtrl* m_ZoneClearanceCtrl; + wxStaticText* m_MinThicknessValueTitle; + wxTextCtrl* m_ZoneMinThicknessCtrl; + wxStaticText* m_staticText151; + wxChoice* m_cornerSmoothingChoice; + wxStaticText* m_cornerSmoothingTitle; + wxTextCtrl* m_cornerSmoothingCtrl; + wxStaticText* m_staticText13; + wxChoice* m_PadInZoneOpt; + wxStaticText* m_AntipadSizeText; + wxTextCtrl* m_AntipadSizeValue; + wxStaticText* m_CopperBridgeWidthText; + wxTextCtrl* m_CopperWidthValue; + wxStaticText* m_staticText171; + wxSpinCtrl* m_PriorityLevelCtrl; + wxStaticText* m_staticText11; + wxChoice* m_FillModeCtrl; + wxStaticText* m_staticText12; + wxChoice* m_ArcApproximationOpt; + wxStaticText* m_staticText14; + wxChoice* m_OrientEdgesOpt; + wxStaticText* m_staticText15; + wxChoice* m_OutlineAppearanceCtrl; + wxButton* m_ExportSetupButton; + wxButton* m_OkButton; + wxButton* m_ButtonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } + virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); } + virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_COPPER_ZONE_BASE(); + +}; + +#endif //__DIALOG_COPPER_ZONES_BASE_H__ diff --git a/pcbnew/gpcb_exchange.cpp b/pcbnew/gpcb_exchange.cpp index 878ff12422..8018f2fc2b 100644 --- a/pcbnew/gpcb_exchange.cpp +++ b/pcbnew/gpcb_exchange.cpp @@ -399,6 +399,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName ) // format: Pad [x1 y1 x2 y2 thickness clearance mask "name" "pad_number" flags] pad = new D_PAD( this ); pad->SetShape( PAD_RECT ); + pad->SetAttribute( PAD_SMD ); pad->SetLayerMask( LAYER_FRONT | SOLDERMASK_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT ); // Set shape from flags diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 6a2eedf0d7..42ff20c0a3 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -990,6 +990,10 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const case THERMAL_PAD: // Default option not saved or loaded. break; + case THT_THERMAL: + m_out->Print( 0, " thru_hole_only" ); + break; + case PAD_IN_ZONE: m_out->Print( 0, " yes" ); break; diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 5e194ae943..c3c83ff1a5 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2239,6 +2239,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() { case 'I': popt = PAD_IN_ZONE; break; case 'T': popt = THERMAL_PAD; break; + case 'H': popt = THT_THERMAL; break; case 'X': popt = PAD_NOT_IN_ZONE; break; default: @@ -3548,6 +3549,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const default: case PAD_IN_ZONE: padoption = 'I'; break; case THERMAL_PAD: padoption = 'T'; break; + case THT_THERMAL: padoption = 'H'; break; // H is for 'hole' since it reliefs holes only case PAD_NOT_IN_ZONE: padoption = 'X'; break; } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index c1aa57f3e5..7e78a61f80 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2374,6 +2374,10 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) zone->SetPadConnection( PAD_NOT_IN_ZONE ); break; + case T_thru_hole_only: + zone->SetPadConnection( THT_THERMAL ); + break; + case T_clearance: zone->SetZoneClearance( parseBoardUnits( "zone clearance" ) ); NeedRIGHT(); diff --git a/pcbnew/zones.h b/pcbnew/zones.h index 69a2b61720..4c6b6c3e54 100644 --- a/pcbnew/zones.h +++ b/pcbnew/zones.h @@ -36,7 +36,8 @@ enum ZoneConnection { UNDEFINED_CONNECTION = -1, PAD_NOT_IN_ZONE, ///< Pads are not covered THERMAL_PAD, ///< Use thermal relief for pads - PAD_IN_ZONE ///< pads are covered by copper + PAD_IN_ZONE, ///< pads are covered by copper + THT_THERMAL ///< Thermal relief only for THT pads }; class ZONE_CONTAINER; diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index 20edbff31d..e6de77f223 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -385,7 +385,13 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) { for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() ) { - if( GetPadConnection( pad ) != THERMAL_PAD ) + // Rejects non-standard pads with tht-only thermal reliefs + if( GetPadConnection( pad ) == THT_THERMAL + && pad->GetAttribute() != PAD_STANDARD ) + continue; + + if( GetPadConnection( pad ) != THERMAL_PAD + && GetPadConnection( pad ) != THT_THERMAL ) continue; if( !pad->IsOnLayer( GetLayer() ) ) diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index 8b3376fe63..6c48611839 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -78,7 +78,13 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector& aCornerBuffe { for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() ) { - if( aZone->GetPadConnection( pad ) != THERMAL_PAD ) + // Rejects non-standard pads with tht-only thermal reliefs + if( aZone->GetPadConnection( pad ) == THT_THERMAL + && pad->GetAttribute() != PAD_STANDARD ) + continue; + + if( aZone->GetPadConnection( pad ) != THERMAL_PAD + && aZone->GetPadConnection( pad ) != THT_THERMAL ) continue; // check