Pcbnew: commit Lorenzo Marcantonio's patch for THT thermals (added loading/saving using S. expr).

Fix incorrect import of smd pads from Gpcb.
Very minor change in dialog print.
This commit is contained in:
jean-pierre charras 2012-07-09 09:10:07 +02:00
parent 096f4a1080
commit af0d21474d
17 changed files with 603 additions and 458 deletions

View File

@ -164,6 +164,7 @@ trace_clearance
trapezoid
thru
thru_hole
thru_hole_only
tstamp
user
user_trace_width

View File

@ -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() );

View File

@ -26,6 +26,8 @@ private:
void OnPrintPreview( wxCommandEvent& event );
void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ){ Close(); }
void GetPrintOptions();
};

View File

@ -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_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 );
}

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="10" />
<FileVersion major="1" minor="11" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
@ -19,6 +20,7 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
@ -27,8 +29,11 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_managed">0</property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -51,7 +56,6 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -65,11 +69,9 @@
<property name="pane_size"></property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size">-1,-1</property>
<property name="size">388,185</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Print</property>
@ -134,6 +136,93 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font">,90,92,-1,70,0</property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print options:</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticText1</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
@ -141,7 +230,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -163,7 +255,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print sheet &amp;reference and title block</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -178,9 +269,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
@ -221,21 +310,24 @@
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="border">10</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -251,7 +343,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print in &amp;black and white only</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -266,9 +357,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
@ -328,7 +417,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -350,7 +442,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Page Setup</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -365,9 +456,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
@ -416,7 +505,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -438,7 +530,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Preview</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -453,9 +544,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
@ -504,7 +593,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -526,7 +618,6 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Print</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -541,9 +632,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
@ -592,7 +681,10 @@
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
@ -614,7 +706,6 @@
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
<property name="label">Close</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -629,9 +720,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>

View File

@ -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 <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/checkbox.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/checkbox.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/dialog.h>
@ -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__

View File

@ -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 );

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 11 2012)
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -143,7 +143,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
m_staticText13->Wrap( -1 );
m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") };
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 );

View File

@ -1825,7 +1825,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Solid&quot; &quot;Thermal relief&quot; &quot;None&quot;</property>
<property name="choices">&quot;Solid&quot; &quot;Thermal relief&quot; &quot;THT Thermal&quot; &quot;None&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 11 2012)
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!

View File

@ -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

View File

@ -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;

View File

@ -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;
}

View File

@ -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();

View File

@ -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;

View File

@ -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() ) )

View File

@ -78,7 +78,13 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& 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