Commit b536b1cf authored by Marco Mattila's avatar Marco Mattila

Add module and pad local parameters for pad-zone connections (thermal, solid etc.) in pcbnew.

parent bcd66579
......@@ -68,6 +68,7 @@ MODULE::MODULE( BOARD* parent ) :
m_LocalSolderMaskMargin = 0;
m_LocalSolderPasteMargin = 0;
m_LocalSolderPasteMarginRatio = 0.0;
m_ZoneConnection = UNDEFINED_CONNECTION; // Use zone setting by default
m_Reference = new TEXTE_MODULE( this, TEXT_is_REFERENCE );
......@@ -101,6 +102,7 @@ MODULE::MODULE( const MODULE& aModule ) :
m_LocalSolderMaskMargin = aModule.m_LocalSolderMaskMargin;
m_LocalSolderPasteMargin = aModule.m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = aModule.m_LocalSolderPasteMarginRatio;
m_ZoneConnection = aModule.m_ZoneConnection;
// Copy reference and value.
m_Reference = new TEXTE_MODULE( *aModule.m_Reference );
......@@ -216,6 +218,7 @@ void MODULE::Copy( MODULE* aModule )
m_LocalSolderMaskMargin = aModule->m_LocalSolderMaskMargin;
m_LocalSolderPasteMargin = aModule->m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = aModule->m_LocalSolderPasteMarginRatio;
m_ZoneConnection = aModule->m_ZoneConnection;
// Copy reference and value.
m_Reference->Copy( aModule->m_Reference );
......
......@@ -38,7 +38,7 @@
#include <class_board_item.h>
#include <class_text_mod.h>
#include "zones.h"
class LINE_READER;
class EDA_3D_CANVAS;
......@@ -121,6 +121,8 @@ public:
///< value of pad size
// The final margin is the sum of these 2 values
ZoneConnection m_ZoneConnection;
public:
MODULE( BOARD* parent );
......@@ -193,6 +195,9 @@ public:
double GetLocalSolderPasteMarginRatio() const { return m_LocalSolderPasteMarginRatio; }
void SetLocalSolderPasteMarginRatio( double aRatio ) { m_LocalSolderPasteMarginRatio = aRatio; }
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
ZoneConnection GetZoneConnection() const { return m_ZoneConnection; }
int GetAttributes() const { return m_Attributs; }
void SetAttributes( int aAttributes ) { m_Attributs = aAttributes; }
......
......@@ -70,6 +70,7 @@ D_PAD::D_PAD( MODULE* parent ) :
m_LocalSolderMaskMargin = 0;
m_LocalSolderPasteMargin = 0;
m_LocalSolderPasteMarginRatio = 0.0;
m_ZoneConnection = UNDEFINED_CONNECTION; // Use parent setting by default
// set layers mask to default for a standard pad
m_layerMask = PAD_STANDARD_DEFAULT_LAYERS;
......@@ -303,6 +304,7 @@ void D_PAD::Copy( D_PAD* source )
m_LocalSolderMaskMargin = source->m_LocalSolderMaskMargin;
m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = source->m_LocalSolderPasteMarginRatio;
m_ZoneConnection = source->m_ZoneConnection;
SetSubRatsnest( 0 );
SetSubNet( 0 );
......@@ -440,6 +442,17 @@ wxSize D_PAD::GetSolderPasteMargin()
}
ZoneConnection D_PAD::GetZoneConnection() const
{
MODULE* module = (MODULE*) GetParent();
if( m_ZoneConnection == UNDEFINED_CONNECTION && module )
return module->GetZoneConnection();
else
return m_ZoneConnection;
}
void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame )
{
MODULE* module;
......
......@@ -36,7 +36,7 @@
#include <pad_shapes.h>
#include <PolyLine.h>
#include <param_config.h> // PARAM_CFG_ARRAY
#include "zones.h"
class LINE_READER;
class EDA_3D_CANVAS;
......@@ -266,6 +266,9 @@ public:
*/
wxSize GetSolderPasteMargin();
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
ZoneConnection GetZoneConnection() const;
/* Reading and writing data on files */
int ReadDescr( LINE_READER* aReader );
......@@ -530,6 +533,7 @@ private:
double m_LocalSolderPasteMarginRatio; ///< Local solder mask margin ratio value of pad size
///< The final margin is the sum of these 2 values
ZoneConnection m_ZoneConnection;
};
#endif // PAD_H_
......@@ -80,7 +80,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
m_FillMode = aZone.m_FillMode; // Filling mode (segments/polygons)
m_priority = aZone.m_priority;
m_ArcToSegmentsCount = aZone.m_ArcToSegmentsCount;
m_PadOption = aZone.m_PadOption;
m_PadConnection = aZone.m_PadConnection;
m_ThermalReliefGap = aZone.m_ThermalReliefGap;
m_ThermalReliefCopperBridge = aZone.m_ThermalReliefCopperBridge;
m_FilledPolysList = aZone.m_FilledPolysList;
......@@ -856,7 +856,7 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src )
m_ZoneMinThickness = src->m_ZoneMinThickness;
m_FillMode = src->m_FillMode; // Filling mode (segments/polygons)
m_ArcToSegmentsCount = src->m_ArcToSegmentsCount;
m_PadOption = src->m_PadOption;
m_PadConnection = src->m_PadConnection;
m_ThermalReliefGap = src->m_ThermalReliefGap;
m_ThermalReliefCopperBridge = src->m_ThermalReliefCopperBridge;
m_Poly->m_HatchStyle = src->m_Poly->GetHatchStyle();
......@@ -882,6 +882,16 @@ bool ZONE_CONTAINER::SetNetNameFromNetCode( void )
}
ZoneConnection ZONE_CONTAINER::GetPadConnection( D_PAD* aPad ) const
{
if( aPad == NULL || aPad->GetZoneConnection() == UNDEFINED_CONNECTION )
return m_PadConnection;
else
return aPad->GetZoneConnection();
}
wxString ZONE_CONTAINER::GetSelectMenuText() const
{
wxString text;
......
......@@ -92,8 +92,6 @@ public:
//ARC_APPROX_SEGMENTS_COUNT_LOW_DEF or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF)
int m_ArcToSegmentsCount;
int m_PadOption;
// thickness of the gap in thermal reliefs.
int m_ThermalReliefGap;
......@@ -128,6 +126,7 @@ private:
// the other zone priority, it will be created inside.
// if priorities are equal, a DRC erroc is set
unsigned m_priority;
ZoneConnection m_PadConnection;
public:
ZONE_CONTAINER( BOARD* parent );
......@@ -292,8 +291,8 @@ public:
int GetZoneClearance() const { return m_ZoneClearance; }
void SetZoneClearance( int aZoneClearance ) { m_ZoneClearance = aZoneClearance; }
int GetPadOption() const { return m_PadOption; }
void SetPadOption( int aPadOption ) { m_PadOption = aPadOption; }
ZoneConnection GetPadConnection( D_PAD* aPad = NULL ) const;
void SetPadConnection( ZoneConnection aPadConnection ) { m_PadConnection = aPadConnection; }
int GetMinThickness() const { return m_ZoneMinThickness; }
void SetMinThickness( int aMinThickness ) { m_ZoneMinThickness = aMinThickness; }
......
......@@ -39,7 +39,7 @@ ZONE_SETTINGS::ZONE_SETTINGS()
m_ThermalReliefGap = 200; // tickness of the gap in thermal reliefs
m_ThermalReliefCopperBridge = 200; // tickness of the copper bridge in thermal reliefs
m_Zone_Pad_Options = THERMAL_PAD; // How pads are covered by copper in zone
m_PadConnection = THERMAL_PAD; // How pads are covered by copper in zone
m_Zone_45_Only = false;
......@@ -60,7 +60,7 @@ ZONE_SETTINGS& ZONE_SETTINGS::operator << ( const ZONE_CONTAINER& aSource )
m_ArcToSegmentsCount = aSource.m_ArcToSegmentsCount;
m_ThermalReliefGap = aSource.m_ThermalReliefGap;
m_ThermalReliefCopperBridge = aSource.m_ThermalReliefCopperBridge;
m_Zone_Pad_Options = aSource.m_PadOption;
m_PadConnection = aSource.GetPadConnection();
cornerSmoothingType = aSource.GetCornerSmoothingType();
cornerRadius = aSource.GetCornerRadius();
......@@ -77,7 +77,7 @@ void ZONE_SETTINGS::ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport ) c
aTarget.m_ArcToSegmentsCount = m_ArcToSegmentsCount;
aTarget.m_ThermalReliefGap = m_ThermalReliefGap;
aTarget.m_ThermalReliefCopperBridge = m_ThermalReliefCopperBridge;
aTarget.m_PadOption = m_Zone_Pad_Options;
aTarget.SetPadConnection( m_PadConnection );
aTarget.SetCornerSmoothingType( cornerSmoothingType );
aTarget.SetCornerRadius( cornerRadius );
......
......@@ -6,6 +6,8 @@
#ifndef ZONE_SETTINGS_H_
#define ZONE_SETTINGS_H_
#include "zones.h"
class ZONE_CONTAINER;
......@@ -45,13 +47,13 @@ public:
long m_ThermalReliefGap; ///< thickness of the gap in thermal reliefs
long m_ThermalReliefCopperBridge; ///< thickness of the copper bridge in thermal reliefs
int m_Zone_Pad_Options; ///< How pads are covered by copper in zone
bool m_Zone_45_Only;
private:
int cornerSmoothingType; ///< Corner smoothing type
unsigned int cornerRadius; ///< Corner chamfer distance / fillet radius
ZoneConnection m_PadConnection;
public:
ZONE_SETTINGS();
......@@ -75,9 +77,9 @@ public:
*/
void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true ) const;
void SetCornerSmoothingType( int aType) { cornerSmoothingType = aType; };
void SetCornerSmoothingType( int aType) { cornerSmoothingType = aType; }
int GetCornerSmoothingType() const { return cornerSmoothingType; };
int GetCornerSmoothingType() const { return cornerSmoothingType; }
void SetCornerRadius( int aRadius )
{
......@@ -89,7 +91,11 @@ public:
cornerRadius = aRadius;
};
unsigned int GetCornerRadius() const { return cornerRadius; };
unsigned int GetCornerRadius() const { return cornerRadius; }
ZoneConnection GetPadConnection() const { return m_PadConnection; }
void SetPadConnection( ZoneConnection aPadConnection ) { m_PadConnection = aPadConnection; }
};
......
......@@ -189,12 +189,13 @@ void DIALOG_COPPER_ZONE::initDialog()
m_Parent->GetInternalUnits() );
m_ZoneMinThicknessCtrl->SetValue( msg );
switch( m_settings.m_Zone_Pad_Options )
switch( m_settings.GetPadConnection() )
{
case PAD_NOT_IN_ZONE: // Pads are not covered
m_PadInZoneOpt->SetSelection( 2 );
break;
default:
case THERMAL_PAD: // Use thermal relief for pads
m_PadInZoneOpt->SetSelection( 1 );
break;
......@@ -204,7 +205,7 @@ void DIALOG_COPPER_ZONE::initDialog()
break;
}
if( m_settings.m_Zone_Pad_Options != THERMAL_PAD )
if( m_settings.GetPadConnection() != THERMAL_PAD )
{
m_AntipadSizeValue->Enable( false );
m_CopperWidthValue->Enable( false );
......@@ -345,17 +346,17 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab
{
case 2:
// Pads are not covered
m_settings.m_Zone_Pad_Options = PAD_NOT_IN_ZONE;
m_settings.SetPadConnection( PAD_NOT_IN_ZONE );
break;
case 1:
// Use thermal relief for pads
m_settings.m_Zone_Pad_Options = THERMAL_PAD;
m_settings.SetPadConnection( THERMAL_PAD );
break;
case 0:
// pads are covered by copper
m_settings.m_Zone_Pad_Options = PAD_IN_ZONE;
m_settings.SetPadConnection( PAD_IN_ZONE );
break;
}
......
......@@ -132,6 +132,26 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()
m_SolderPasteMarginRatioCtrl->SetValue( wxT("-") + msg );
else
m_SolderPasteMarginRatioCtrl->SetValue( msg );
switch( m_CurrentModule->GetZoneConnection() )
{
default:
case UNDEFINED_CONNECTION:
m_ZoneConnectionChoice->SetSelection( 0 );
break;
case PAD_IN_ZONE:
m_ZoneConnectionChoice->SetSelection( 1 );
break;
case THERMAL_PAD:
m_ZoneConnectionChoice->SetSelection( 2 );
break;
case PAD_NOT_IN_ZONE:
m_ZoneConnectionChoice->SetSelection( 3 );
break;
}
}
......@@ -482,6 +502,26 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
m_CurrentModule->SetLocalSolderPasteMarginRatio( dtmp / 100 );
switch( m_ZoneConnectionChoice->GetSelection() )
{
default:
case 0:
m_CurrentModule->SetZoneConnection( UNDEFINED_CONNECTION );
break;
case 1:
m_CurrentModule->SetZoneConnection( PAD_IN_ZONE );
break;
case 2:
m_CurrentModule->SetZoneConnection( THERMAL_PAD );
break;
case 3:
m_CurrentModule->SetZoneConnection( PAD_NOT_IN_ZONE );
break;
}
// Set Module Position
modpos.x = ReturnValueFromTextCtrl( *m_ModPositionX, PCB_INTERNAL_UNIT );
modpos.y = ReturnValueFromTextCtrl( *m_ModPositionY, PCB_INTERNAL_UNIT );
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Aug 24 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -20,75 +20,84 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
wxBoxSizer* m_PanelPropertiesBoxSizer;
m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* PropLeftSizer;
PropLeftSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Fields:") ), wxVERTICAL );
wxBoxSizer* bSizer13;
bSizer13 = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerRef;
sbSizerRef = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Reference") ), wxHORIZONTAL );
m_ReferenceCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
sbSizerRef->Add( m_ReferenceCtrl, 1, 0, 5 );
sbSizerRef->Add( m_ReferenceCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
m_button4 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
sbSizerRef->Add( m_button4, 0, 0, 5 );
sbSizerRef->Add( m_button4, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
PropLeftSizer->Add( sbSizerRef, 0, wxEXPAND, 5 );
bSizer13->Add( sbSizerRef, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerValue;
sbSizerValue = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Value") ), wxHORIZONTAL );
m_ValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
sbSizerValue->Add( m_ValueCtrl, 1, 0, 5 );
sbSizerValue->Add( m_ValueCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
m_button5 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
sbSizerValue->Add( m_button5, 0, 0, 5 );
sbSizerValue->Add( m_button5, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
PropLeftSizer->Add( sbSizerValue, 0, wxEXPAND, 5 );
bSizer13->Add( sbSizerValue, 0, wxALL|wxEXPAND, 5 );
wxString m_LayerCtrlChoices[] = { _("Top"), _("Bottom") };
int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString );
m_LayerCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Side Select"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_LayerCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Side"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, 0 );
m_LayerCtrl->SetSelection( 0 );
PropLeftSizer->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 );
bSizer13->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerOrientation;
sbSizerOrientation = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Orientation") ), wxVERTICAL );
wxString m_OrientCtrlChoices[] = { _("Normal"), _("+ 90.0"), _("- 90.0"), _("180.0"), _("User") };
wxString m_OrientCtrlChoices[] = { _("Normal"), _("+90.0"), _("-90.0"), _("180.0"), _("User") };
int m_OrientCtrlNChoices = sizeof( m_OrientCtrlChoices ) / sizeof( wxString );
m_OrientCtrl = new wxRadioBox( m_PanelProperties, ID_LISTBOX_ORIENT_SELECT, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientCtrlNChoices, m_OrientCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_OrientCtrl->SetSelection( 0 );
m_OrientCtrl->SetSelection( 1 );
sbSizerOrientation->Add( m_OrientCtrl, 0, wxALL|wxEXPAND, 5 );
m_staticText4 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Orientation (in 0.1 degrees)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4 = new wxStaticText( m_PanelProperties, wxID_ANY, _("User orientation (in 0.1 degrees):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 );
sbSizerOrientation->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_OrientValue = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerOrientation->Add( m_OrientValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
sbSizerOrientation->Add( m_OrientValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
PropLeftSizer->Add( sbSizerOrientation, 0, wxEXPAND, 5 );
bSizer13->Add( sbSizerOrientation, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerPosition;
sbSizerPosition = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Position") ), wxVERTICAL );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 );
fgSizer2->AddGrowableCol( 1 );
fgSizer2->AddGrowableRow( 2 );
fgSizer2->SetFlexibleDirection( wxHORIZONTAL );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
XPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 );
XPositionStatic->Wrap( -1 );
sbSizerPosition->Add( XPositionStatic, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( XPositionStatic, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxLEFT|wxRIGHT|wxTOP, 5 );
m_ModPositionX = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerPosition->Add( m_ModPositionX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
YPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 );
YPositionStatic->Wrap( -1 );
sbSizerPosition->Add( YPositionStatic, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( YPositionStatic, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_ModPositionY = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerPosition->Add( m_ModPositionY, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
sbSizerPosition->Add( fgSizer2, 1, wxEXPAND, 5 );
PropLeftSizer->Add( sbSizerPosition, 0, wxEXPAND, 5 );
bSizer13->Add( sbSizerPosition, 0, wxALL|wxEXPAND, 5 );
m_PanelPropertiesBoxSizer->Add( PropLeftSizer, 1, wxEXPAND, 5 );
m_PanelPropertiesBoxSizer->Add( bSizer13, 1, wxEXPAND, 5 );
m_PropRightSizer = new wxBoxSizer( wxVERTICAL );
......@@ -98,17 +107,22 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Module Editor"), wxDefaultPosition, wxDefaultSize, 0 );
m_PropRightSizer->Add( m_buttonModuleEditor, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
wxBoxSizer* bSizer12;
bSizer12 = new wxBoxSizer( wxHORIZONTAL );
wxString m_AttributsCtrlChoices[] = { _("Normal"), _("Normal+Insert"), _("Virtual") };
int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Attributs:"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AttributsCtrl->SetSelection( 1 );
m_PropRightSizer->Add( m_AttributsCtrl, 0, wxALL|wxEXPAND, 5 );
m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AttributsCtrl->SetSelection( 0 );
bSizer12->Add( m_AttributsCtrl, 1, wxALL|wxEXPAND, 5 );
wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") };
int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Auto Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl->SetSelection( 0 );
m_PropRightSizer->Add( m_AutoPlaceCtrl, 0, wxALL|wxEXPAND, 5 );
bSizer12->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 );
m_PropRightSizer->Add( bSizer12, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerAutoplace;
sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Move and Place") ), wxHORIZONTAL );
......@@ -140,27 +154,47 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
m_PropRightSizer->Add( sbSizerAutoplace, 1, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizerLocalProperties;
sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Masks clearances local values:") ), wxVERTICAL );
sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Local Settings") ), wxVERTICAL );
wxBoxSizer* bSizer11;
bSizer11 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
m_staticTextInfo = new wxStaticText( m_PanelProperties, wxID_ANY, _("Set these values to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
bSizer10->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
bSizer10->Add( m_ZoneConnectionChoice, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
bSizer11->Add( bSizer10, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
m_staticTextInfo = new wxStaticText( m_PanelProperties, wxID_ANY, _("Set clearances to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo->Wrap( -1 );
m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
bSizer11->Add( m_staticTextInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
sbSizerLocalProperties->Add( bSizer11, 0, 0, 5 );
wxFlexGridSizer* fgSizerClearances;
fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 );
fgSizerClearances->SetFlexibleDirection( wxBOTH );
fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextNetClearance = new wxStaticText( m_PanelProperties, wxID_ANY, _("All pads nets clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetClearance = new wxStaticText( m_PanelProperties, wxID_ANY, _("All pads nets clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetClearance->Wrap( -1 );
m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") );
fgSizerClearances->Add( m_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_NetClearanceValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerClearances->Add( m_NetClearanceValueCtrl, 0, wxALL, 5 );
fgSizerClearances->Add( m_NetClearanceValueCtrl, 0, wxALL|wxEXPAND, 5 );
m_NetClearanceUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceUnits->Wrap( -1 );
......@@ -182,7 +216,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
fgSizerClearances->Add( m_MaskClearanceTitle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_SolderMaskMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerClearances->Add( m_SolderMaskMarginCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderMaskMarginCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_SolderMaskMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginUnits->Wrap( -1 );
......@@ -195,7 +229,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
fgSizerClearances->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_SolderPasteMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerClearances->Add( m_SolderPasteMarginCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
fgSizerClearances->Add( m_SolderPasteMarginCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_SolderPasteMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginUnits->Wrap( -1 );
......@@ -208,7 +242,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
fgSizerClearances->Add( m_staticTextRatio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_SolderPasteMarginRatioCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_SolderPasteRatioMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteRatioMarginUnits->Wrap( -1 );
......@@ -216,7 +250,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 );
m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 5 );
m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxALL|wxEXPAND, 5 );
m_PanelPropertiesBoxSizer->Add( m_PropRightSizer, 0, 0, 5 );
......@@ -238,7 +272,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
wxBoxSizer* bLowerSizer3D;
bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
m_Sizer3DValues = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Scale and Pos") ), wxVERTICAL );
m_Sizer3DValues = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Scale and Position") ), wxVERTICAL );
bLowerSizer3D->Add( m_Sizer3DValues, 1, wxEXPAND, 5 );
......@@ -304,4 +338,5 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE()
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this );
m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this );
m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Aug 24 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_edit_module_for_BoardEditor_base__
#define __dialog_edit_module_for_BoardEditor_base__
#ifndef __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__
#define __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/gdicmn.h>
......@@ -22,6 +23,7 @@
#include <wx/radiobox.h>
#include <wx/stattext.h>
#include <wx/slider.h>
#include <wx/choice.h>
#include <wx/statline.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
......@@ -73,6 +75,8 @@ class DIALOG_MODULE_BOARD_EDITOR_BASE : public wxDialog
wxSlider* m_CostRot90Ctrl;
wxStaticText* m_staticText12;
wxSlider* m_CostRot180Ctrl;
wxStaticText* m_staticText16;
wxChoice* m_ZoneConnectionChoice;
wxStaticText* m_staticTextInfo;
wxStaticText* m_staticTextNetClearance;
wxTextCtrl* m_NetClearanceValueCtrl;
......@@ -100,24 +104,25 @@ class DIALOG_MODULE_BOARD_EDITOR_BASE : public wxDialog
wxButton* m_sdbSizerStdButtonsCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnEditReference( wxCommandEvent& event ){ event.Skip(); }
virtual void OnEditValue( wxCommandEvent& event ){ event.Skip(); }
virtual void ModuleOrientEvent( wxCommandEvent& event ){ event.Skip(); }
virtual void ExchangeModule( wxCommandEvent& event ){ event.Skip(); }
virtual void GotoModuleEditor( wxCommandEvent& event ){ event.Skip(); }
virtual void On3DShapeNameSelected( wxCommandEvent& event ){ event.Skip(); }
virtual void Browse3DLib( wxCommandEvent& event ){ event.Skip(); }
virtual void Add3DShape( wxCommandEvent& event ){ event.Skip(); }
virtual void Remove3DShape( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnEditReference( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditValue( wxCommandEvent& event ) { event.Skip(); }
virtual void ModuleOrientEvent( wxCommandEvent& event ) { event.Skip(); }
virtual void ExchangeModule( wxCommandEvent& event ) { event.Skip(); }
virtual void GotoModuleEditor( wxCommandEvent& event ) { event.Skip(); }
virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void Browse3DLib( wxCommandEvent& event ) { event.Skip(); }
virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
wxStaticBoxSizer* m_Sizer3DValues;
DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 474,607 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,800 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MODULE_BOARD_EDITOR_BASE();
};
#endif //__dialog_edit_module_for_BoardEditor_base__
#endif //__DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__
......@@ -187,9 +187,7 @@ void PCB_BASE_FRAME::InstallPadOptionsFrame( D_PAD* Pad )
}
/***************************************/
void DIALOG_PAD_PROPERTIES::initValues()
/***************************************/
{
SetFocus(); // Required under wxGTK if we want to dismiss the dialog with the ESC key
......@@ -297,6 +295,26 @@ void DIALOG_PAD_PROPERTIES::initValues()
else
m_SolderPasteMarginRatioCtrl->SetValue( msg );
switch( m_dummyPad->GetZoneConnection() )
{
default:
case UNDEFINED_CONNECTION:
m_ZoneConnectionChoice->SetSelection( 0 );
break;
case PAD_IN_ZONE:
m_ZoneConnectionChoice->SetSelection( 1 );
break;
case THERMAL_PAD:
m_ZoneConnectionChoice->SetSelection( 2 );
break;
case PAD_NOT_IN_ZONE:
m_ZoneConnectionChoice->SetSelection( 3 );
break;
}
if( m_CurrentPad )
{
MODULE* module = m_CurrentPad->GetParent();
......@@ -413,9 +431,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
}
/*********************************************************************/
void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
/*********************************************************************/
{
switch( m_PadShape->GetSelection() )
{
......@@ -453,9 +469,7 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
}
/**********************************************************************/
void DIALOG_PAD_PROPERTIES::OnDrillShapeSelected( wxCommandEvent& event )
/**********************************************************************/
{
if( m_PadType->GetSelection() == 1 || m_PadType->GetSelection() == 2 )
{
......@@ -484,9 +498,7 @@ void DIALOG_PAD_PROPERTIES::OnDrillShapeSelected( wxCommandEvent& event )
}
/*******************************************************************/
void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
/********************************************************************/
{
switch( m_PadOrient->GetSelection() )
{
......@@ -519,9 +531,7 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
}
/*****************************************************************/
void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
/*****************************************************************/
/* Adjust the better mask layer according to the selected pad type
*/
......@@ -549,9 +559,7 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
}
/****************************************************************/
void DIALOG_PAD_PROPERTIES::SetPadLayersList( long layer_mask )
/****************************************************************/
/** SetPadLayersList
* Update the CheckBoxes state in pad layers list,
......@@ -594,9 +602,7 @@ void DIALOG_PAD_PROPERTIES::OnSetLayers( wxCommandEvent& event )
}
/*************************************************************************/
void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
/*************************************************************************/
/* Updates the different parameters for the component being edited.
*/
......@@ -695,6 +701,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_CurrentPad->SetLocalSolderMaskMargin( m_Pad_Master.GetLocalSolderMaskMargin() );
m_CurrentPad->SetLocalSolderPasteMargin( m_Pad_Master.GetLocalSolderPasteMargin() );
m_CurrentPad->SetLocalSolderPasteMarginRatio( m_Pad_Master.GetLocalSolderPasteMarginRatio() );
m_CurrentPad->SetZoneConnection( m_Pad_Master.GetZoneConnection() );
module->CalculateBoundingBox();
m_CurrentPad->DisplayInfo( m_Parent );
......@@ -742,6 +749,26 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
aPad->SetLocalSolderPasteMarginRatio( dtmp / 100 );
switch( m_ZoneConnectionChoice->GetSelection() )
{
default:
case 0:
aPad->SetZoneConnection( UNDEFINED_CONNECTION );
break;
case 1:
aPad->SetZoneConnection( PAD_IN_ZONE );
break;
case 2:
aPad->SetZoneConnection( THERMAL_PAD );
break;
case 3:
aPad->SetZoneConnection( PAD_NOT_IN_ZONE );
break;
}
// Read pad position:
x = ReturnValueFromTextCtrl( *m_PadPosition_X_Ctrl, internalUnits );
y = ReturnValueFromTextCtrl( *m_PadPosition_Y_Ctrl, internalUnits );
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// C++ code generated with wxFormBuilder (version Aug 24 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -22,14 +22,14 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
wxBoxSizer* m_LeftBoxSizer;
m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
m_PadNumText = new wxStaticText( this, wxID_ANY, _("Pad Num :"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadNumText = new wxStaticText( this, wxID_ANY, _("Number:"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadNumText->Wrap( -1 );
m_LeftBoxSizer->Add( m_PadNumText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadNumCtrl = new wxTextCtrl( this, wxID_PADNUMCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LeftBoxSizer->Add( m_PadNumCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_PadNameText = new wxStaticText( this, wxID_ANY, _("Pad Net Name :"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadNameText = new wxStaticText( this, wxID_ANY, _("Net name:"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadNameText->Wrap( -1 );
m_LeftBoxSizer->Add( m_PadNameText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
......@@ -37,14 +37,14 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_LeftBoxSizer->Add( m_PadNetNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizer2;
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Geometry:") ), wxVERTICAL );
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Geometry") ), wxVERTICAL );
wxFlexGridSizer* fgSizerGeometry;
fgSizerGeometry = new wxFlexGridSizer( 14, 3, 0, 0 );
fgSizerGeometry->SetFlexibleDirection( wxBOTH );
fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Pad pos X"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Position X"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 );
fgSizerGeometry->Add( m_staticText4, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
......@@ -55,7 +55,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_PadPosX_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadPosX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_staticText41 = new wxStaticText( this, wxID_ANY, _("Pad pos Y"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText41 = new wxStaticText( this, wxID_ANY, _("Position Y"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText41->Wrap( -1 );
fgSizerGeometry->Add( m_staticText41, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
......@@ -75,7 +75,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
m_textPadDrillX = new wxStaticText( this, wxID_ANY, _("Pad drill X"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillX = new wxStaticText( this, wxID_ANY, _("Drill X"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillX->Wrap( -1 );
fgSizerGeometry->Add( m_textPadDrillX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxALIGN_RIGHT, 5 );
......@@ -86,7 +86,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_PadDrill_X_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_textPadDrillY = new wxStaticText( this, wxID_ANY, _("Pad drill Y"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillY = new wxStaticText( this, wxID_ANY, _("Drill Y"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillY->Wrap( -1 );
fgSizerGeometry->Add( m_textPadDrillY, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
......@@ -219,13 +219,13 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
wxString m_PadShapeChoices[] = { _("Circle"), _("Oval"), _("Rect"), _("Trapezoidal") };
int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString );
m_PadShape = new wxRadioBox( this, ID_LISTBOX_SHAPE_PAD, _("Pad Shape:"), wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 1, wxRA_SPECIFY_COLS );
m_PadShape = new wxRadioBox( this, ID_LISTBOX_SHAPE_PAD, _("Pad Shape"), wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 1, wxRA_SPECIFY_COLS );
m_PadShape->SetSelection( 0 );
m_DrillShapeBoxSizer->Add( m_PadShape, 0, wxALL|wxEXPAND, 5 );
wxString m_DrillShapeCtrlChoices[] = { _("Circle"), _("Oval") };
int m_DrillShapeCtrlNChoices = sizeof( m_DrillShapeCtrlChoices ) / sizeof( wxString );
m_DrillShapeCtrl = new wxRadioBox( this, ID_RADIOBOX_DRILL_SHAPE, _("Drill Shape:"), wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_DrillShapeCtrl = new wxRadioBox( this, ID_RADIOBOX_DRILL_SHAPE, _("Drill Shape"), wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_DrillShapeCtrl->SetSelection( 0 );
m_DrillShapeBoxSizer->Add( m_DrillShapeCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
......@@ -236,7 +236,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
wxString m_PadOrientChoices[] = { _("0"), _("90"), _("-90"), _("180"), _("Custom") };
int m_PadOrientNChoices = sizeof( m_PadOrientChoices ) / sizeof( wxString );
m_PadOrient = new wxRadioBox( this, ID_LISTBOX_ORIENT_PAD, _("Pad Orient:"), wxDefaultPosition, wxDefaultSize, m_PadOrientNChoices, m_PadOrientChoices, 1, wxRA_SPECIFY_COLS );
m_PadOrient = new wxRadioBox( this, ID_LISTBOX_ORIENT_PAD, _("Pad Orient"), wxDefaultPosition, wxDefaultSize, m_PadOrientNChoices, m_PadOrientChoices, 1, wxRA_SPECIFY_COLS );
m_PadOrient->SetSelection( 0 );
m_MiddleRightBoxSizer->Add( m_PadOrient, 0, wxALL|wxEXPAND, 5 );
......@@ -257,7 +257,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
bMiddleSizer->Add( bMiddleUpperSizer, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizeModuleInfo;
sbSizeModuleInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprint orientation") ), wxHORIZONTAL );
sbSizeModuleInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprint Orientation") ), wxHORIZONTAL );
wxFlexGridSizer* fgSizer4;
fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
......@@ -292,27 +292,47 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
bMiddleSizer->Add( sbSizeModuleInfo, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbClearancesSizer;
sbClearancesSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Clearances:") ), wxVERTICAL );
sbClearancesSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Local Settings") ), wxVERTICAL );
m_staticTextWarning = new wxStaticText( this, wxID_ANY, _("Set these values to 0\nto use Parent footprint or global values"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* bSizer13;
bSizer13 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer12;
bSizer12 = new wxBoxSizer( wxHORIZONTAL );
m_staticText40 = new wxStaticText( this, wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText40->Wrap( -1 );
bSizer12->Add( m_staticText40, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("From parent module"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
bSizer12->Add( m_ZoneConnectionChoice, 0, wxALL, 5 );
bSizer13->Add( bSizer12, 0, wxEXPAND, 5 );
m_staticTextWarning = new wxStaticText( this, wxID_ANY, _("Set clearances to 0\nto use Parent footprint or global values"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextWarning->Wrap( -1 );
m_staticTextWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
sbClearancesSizer->Add( m_staticTextWarning, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer13->Add( m_staticTextWarning, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbClearancesSizer->Add( bSizer13, 0, wxEXPAND, 5 );
wxFlexGridSizer* fgClearancesGridSizer;
fgClearancesGridSizer = new wxFlexGridSizer( 5, 3, 0, 0 );
fgClearancesGridSizer->SetFlexibleDirection( wxBOTH );
fgClearancesGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextNetClearance = new wxStaticText( this, wxID_ANY, _("Net pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetClearance = new wxStaticText( this, wxID_ANY, _("Net pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetClearance->Wrap( -1 );
m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for pad.\nIf 0, the footprint local value or the Netclass value is used") );
fgClearancesGridSizer->Add( m_staticTextNetClearance, 0, wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_NetClearanceValueCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_NetClearanceValueCtrl, 0, wxALL, 5 );
fgClearancesGridSizer->Add( m_NetClearanceValueCtrl, 0, wxALL|wxEXPAND, 5 );
m_NetClearanceUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceUnits->Wrap( -1 );
......@@ -334,7 +354,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
fgClearancesGridSizer->Add( m_MaskClearanceTitle, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
m_SolderMaskMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderMaskMarginCtrl, 0, wxALL, 5 );
fgClearancesGridSizer->Add( m_SolderMaskMarginCtrl, 0, wxALL|wxEXPAND, 5 );
m_SolderMaskMarginUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginUnits->Wrap( -1 );
......@@ -347,7 +367,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
fgClearancesGridSizer->Add( m_staticTextSolderPaste, 0, wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_SolderPasteMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderPasteMarginCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
fgClearancesGridSizer->Add( m_SolderPasteMarginCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_SolderPasteMarginUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginUnits->Wrap( -1 );
......@@ -360,7 +380,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
fgClearancesGridSizer->Add( m_staticTextRatio, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
m_SolderPasteMarginRatioCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderPasteMarginRatioCtrl, 0, wxALL, 5 );
fgClearancesGridSizer->Add( m_SolderPasteMarginRatioCtrl, 0, wxALL|wxEXPAND, 5 );
m_SolderPasteRatioMarginUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteRatioMarginUnits->Wrap( -1 );
......@@ -368,7 +388,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
sbClearancesSizer->Add( fgClearancesGridSizer, 1, wxEXPAND, 5 );
bMiddleSizer->Add( sbClearancesSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bMiddleSizer->Add( sbClearancesSizer, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
bGeneralSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
......@@ -377,21 +397,21 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
wxString m_PadTypeChoices[] = { _("Standard"), _("SMD"), _("Conn"), _("NPTH, Mechanical") };
int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString );
m_PadType = new wxRadioBox( this, ID_LISTBOX_TYPE_PAD, _("Pad Type:"), wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 1, wxRA_SPECIFY_COLS );
m_PadType = new wxRadioBox( this, ID_LISTBOX_TYPE_PAD, _("Pad Type"), wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 1, wxRA_SPECIFY_COLS );
m_PadType->SetSelection( 0 );
m_RightBoxSizer->Add( m_PadType, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* m_LayersSizer;
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxVERTICAL );
wxString m_rbCopperLayersSelChoices[] = { _("Front Layer"), _("Back Layer"), _("All Copper Layers"), _("No Copper Layers") };
wxString m_rbCopperLayersSelChoices[] = { _("Front layer"), _("Back layer"), _("All copper layers"), _("No copper layers") };
int m_rbCopperLayersSelNChoices = sizeof( m_rbCopperLayersSelChoices ) / sizeof( wxString );
m_rbCopperLayersSel = new wxRadioBox( this, wxID_ANY, _("Copper Layers:"), wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 1, wxRA_SPECIFY_COLS );
m_rbCopperLayersSel->SetSelection( 0 );
m_LayersSizer->Add( m_rbCopperLayersSel, 0, wxALL, 5 );
m_rbCopperLayersSel = new wxRadioBox( this, wxID_ANY, _("Copper Layers"), wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 1, wxRA_SPECIFY_COLS );
m_rbCopperLayersSel->SetSelection( 2 );
m_LayersSizer->Add( m_rbCopperLayersSel, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerTechlayers;
sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers") ), wxVERTICAL );
m_PadLayerAdhCmp = new wxCheckBox( this, wxID_ANY, _("Adhesive Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerAdhCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
......@@ -426,9 +446,9 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_PadLayerECO2 = new wxCheckBox( this, wxID_ANY, _("E.C.O.2 layer"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerECO2, 0, wxALL, 5 );
m_LayersSizer->Add( sbSizerTechlayers, 1, wxEXPAND, 5 );
m_LayersSizer->Add( sbSizerTechlayers, 1, wxALL|wxEXPAND, 5 );
m_RightBoxSizer->Add( m_LayersSizer, 0, 0, 5 );
m_RightBoxSizer->Add( m_LayersSizer, 0, wxALL, 5 );
bGeneralSizer->Add( m_RightBoxSizer, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
......
......@@ -69,7 +69,7 @@
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size">733,535</property>
<property name="size">900,800</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Pad Properties</property>
......@@ -170,7 +170,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad Num :</property>
<property name="label">Number:</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -348,7 +348,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad Net Name :</property>
<property name="label">Net name:</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -503,7 +503,7 @@
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Pad Geometry:</property>
<property name="label">Pad Geometry</property>
<property name="minimum_size"></property>
<property name="name">sbSizer2</property>
<property name="orient">wxVERTICAL</property>
......@@ -513,7 +513,7 @@
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="0">
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">3</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property>
......@@ -554,7 +554,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad pos X</property>
<property name="label">Position X</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -819,7 +819,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad pos Y</property>
<property name="label">Position Y</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -1339,7 +1339,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad drill X</property>
<property name="label">Drill X</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -1604,7 +1604,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad drill Y</property>
<property name="label">Drill Y</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -4364,7 +4364,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_LISTBOX_SHAPE_PAD</property>
<property name="label">Pad Shape:</property>
<property name="label">Pad Shape</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
......@@ -4454,7 +4454,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_RADIOBOX_DRILL_SHAPE</property>
<property name="label">Drill Shape:</property>
<property name="label">Drill Shape</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
......@@ -4555,7 +4555,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_LISTBOX_ORIENT_PAD</property>
<property name="label">Pad Orient:</property>
<property name="label">Pad Orient</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
......@@ -4887,7 +4887,7 @@
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Footprint orientation</property>
<property name="label">Footprint Orientation</property>
<property name="minimum_size"></property>
<property name="name">sbSizeModuleInfo</property>
<property name="orient">wxHORIZONTAL</property>
......@@ -4897,7 +4897,7 @@
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="1">
<object class="wxFlexGridSizer" expanded="0">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
......@@ -4909,11 +4909,11 @@
<property name="permission">none</property>
<property name="rows">2</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -4996,11 +4996,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -5083,11 +5083,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_RIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -5170,11 +5170,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
......@@ -5350,16 +5350,210 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="0">
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Clearances:</property>
<property name="label">Local Settings</property>
<property name="minimum_size"></property>
<property name="name">sbClearancesSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer13</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer12</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_name"></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"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pad connection to zones:</property>
<property name="layer"></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_staticText40</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="position"></property>
<property name="resize">Resizable</property>
<property name="row"></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="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_name"></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="choices">&quot;From parent module&quot; &quot;Solid&quot; &quot;Thermal relief&quot; &quot;None&quot;</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"></property>
<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>
<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_ZoneConnectionChoice</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="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></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>
<event name="OnChar"></event>
<event name="OnChoice"></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>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
......@@ -5389,7 +5583,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Set these values to 0&#x0A;to use Parent footprint or global values</property>
<property name="label">Set clearances to 0&#x0A;to use Parent footprint or global values</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -5447,11 +5641,13 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="0">
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">3</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property>
......@@ -5492,7 +5688,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Net pad clearance</property>
<property name="label">Net pad clearance:</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -5552,7 +5748,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
......@@ -6072,7 +6268,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
......@@ -6337,7 +6533,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
......@@ -6602,7 +6798,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
......@@ -6823,7 +7019,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_LISTBOX_TYPE_PAD</property>
<property name="label">Pad Type:</property>
<property name="label">Pad Type</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
......@@ -6885,11 +7081,11 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Layers:</property>
<property name="label">Layers</property>
<property name="minimum_size"></property>
<property name="name">m_LayersSizer</property>
<property name="orient">wxVERTICAL</property>
......@@ -6897,7 +7093,7 @@
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property>
......@@ -6910,7 +7106,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Front Layer&quot; &quot;Back Layer&quot; &quot;All Copper Layers&quot; &quot;No Copper Layers&quot;</property>
<property name="choices">&quot;Front layer&quot; &quot;Back layer&quot; &quot;All copper layers&quot; &quot;No copper layers&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
......@@ -6925,7 +7121,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Copper Layers:</property>
<property name="label">Copper Layers</property>
<property name="layer"></property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
......@@ -6945,7 +7141,7 @@
<property name="position"></property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property>
<property name="selection">2</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
......@@ -6987,11 +7183,11 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Technical Layers:</property>
<property name="label">Technical Layers</property>
<property name="minimum_size"></property>
<property name="name">sbSizerTechlayers</property>
<property name="orient">wxVERTICAL</property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// C++ code generated with wxFormBuilder (version Aug 24 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -24,6 +24,7 @@
#include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/panel.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
......@@ -110,6 +111,8 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxStaticText* m_staticTitleModuleSide;
wxStaticText* m_staticModuleSideValue;
wxStaticText* m_staticTextWarningPadFlipped;
wxStaticText* m_staticText40;
wxChoice* m_ZoneConnectionChoice;
wxStaticText* m_staticTextWarning;
wxStaticText* m_staticTextNetClearance;
wxTextCtrl* m_NetClearanceValueCtrl;
......@@ -157,7 +160,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
public:
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 733,535 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER );
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 900,800 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER );
~DIALOG_PAD_PROPERTIES_BASE();
};
......
......@@ -210,7 +210,6 @@ bool ZONE_CONTAINER::Save( FILE* aFile ) const
int ret;
unsigned corners_count = m_Poly->corner.size();
int outline_hatch;
char padoption;
fprintf( aFile, "$CZONE_OUTLINE\n" );
......@@ -258,23 +257,24 @@ bool ZONE_CONTAINER::Save( FILE* aFile ) const
}
// Save pad option and clearance
switch( m_PadOption )
int padConnection;
switch( m_PadConnection )
{
default:
case PAD_IN_ZONE:
padoption = 'I';
padConnection = 'I';
break;
case THERMAL_PAD:
padoption = 'T';
padConnection = 'T';
break;
case PAD_NOT_IN_ZONE:
padoption = 'X';
padConnection = 'X';
break;
}
ret = fprintf( aFile, "ZClearance %d %c\n", m_ZoneClearance, padoption );
ret = fprintf( aFile, "ZClearance %d %c\n", m_ZoneClearance, padConnection );
if( ret < 2 )
return false;
......@@ -719,6 +719,9 @@ bool D_PAD::Save( FILE* aFile ) const
if( GetLocalClearance() != 0 )
fprintf( aFile, ".LocalClearance %d\n", GetLocalClearance() );
if( m_ZoneConnection != UNDEFINED_CONNECTION )
fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection );
if( fprintf( aFile, "$EndPAD\n" ) != sizeof("$EndPAD\n") - 1 )
return false;
......@@ -779,6 +782,9 @@ bool MODULE::Save( FILE* aFile ) const
if( m_LocalClearance != 0 )
fprintf( aFile, ".LocalClearance %d\n", GetLocalClearance() );
if( m_ZoneConnection != UNDEFINED_CONNECTION )
fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection );
// attributes
if( m_Attributs != MOD_DEFAULT )
{
......@@ -1026,6 +1032,8 @@ int D_PAD::ReadDescr( LINE_READER* aReader )
SetLocalSolderPasteMarginRatio( atoi( Line + 18 ) );
else if( strnicmp( Line, ".LocalClearance ", 16 ) == 0 )
SetLocalClearance( atoi( Line + 16 ) );
else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 )
m_ZoneConnection = (ZoneConnection)atoi( Line + 16 );
break;
default:
......@@ -1271,6 +1279,8 @@ int MODULE::ReadDescr( LINE_READER* aReader )
SetLocalSolderPasteMarginRatio( atof( Line + 18 ) );
else if( strnicmp( Line, ".LocalClearance ", 16 ) == 0 )
SetLocalClearance( atoi( Line + 16 ) );
else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 )
m_ZoneConnection = (ZoneConnection)atoi( Line + 16 );
break;
......@@ -1848,9 +1858,9 @@ int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader )
else if( strnicmp( Line, "ZClearance", 10 ) == 0 ) // Clearance and pad options info found
{
int clearance = 200;
char padoption;
char padConnection;
text = Line + 10;
ret = sscanf( text, "%d %1c", &clearance, &padoption );
ret = sscanf( text, "%d %1c", &clearance, &padConnection );
if( ret < 2 )
{
......@@ -1860,21 +1870,21 @@ int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader )
{
m_ZoneClearance = clearance;
switch( padoption )
switch( padConnection )
{
case 'i':
case 'I':
m_PadOption = PAD_IN_ZONE;
m_PadConnection = PAD_IN_ZONE;
break;
case 't':
case 'T':
m_PadOption = THERMAL_PAD;
m_PadConnection = THERMAL_PAD;
break;
case 'x':
case 'X':
m_PadOption = PAD_NOT_IN_ZONE;
m_PadConnection = PAD_NOT_IN_ZONE;
break;
}
}
......
......@@ -1018,6 +1018,12 @@ void KICAD_PLUGIN::loadMODULE()
module->SetLocalClearance( tmp );
}
else if( TESTLINE( ".ZoneConnection" ) )
{
int tmp = intParse( line + SZ( ".ZoneConnection" ) );
module->SetZoneConnection( (ZoneConnection)tmp );
}
else if( TESTLINE( "$EndMODULE" ) )
{
module->CalculateBoundingBox();
......@@ -1220,6 +1226,12 @@ void KICAD_PLUGIN::loadPAD( MODULE* aModule )
pad->SetLocalClearance( tmp );
}
else if( TESTLINE( ".ZoneConnection" ) )
{
int tmp = intParse( line + SZ( ".ZoneConnection" ) );
pad->SetZoneConnection( (ZoneConnection)tmp );
}
else if( TESTLINE( "$EndPAD" ) )
{
wxPoint padpos = pad->GetPosition();
......@@ -3177,6 +3189,9 @@ void KICAD_PLUGIN::savePAD( const D_PAD* me ) const
if( me->GetLocalClearance() != 0 )
fprintf( m_fp, ".LocalClearance %s\n", fmtBIU( me->GetLocalClearance( ) ).c_str() );
if( me->GetZoneConnection() != UNDEFINED_CONNECTION )
fprintf( m_fp, ".ZoneConnection %d\n", me->GetZoneConnection() );
fprintf( m_fp, "$EndPAD\n" );
CHECK_WRITE_ERROR();
......@@ -3230,6 +3245,9 @@ void KICAD_PLUGIN::saveMODULE( const MODULE* me ) const
if( me->GetLocalClearance() != 0 )
fprintf( m_fp, ".LocalClearance %s\n", fmtBIU( me->GetLocalClearance( ) ).c_str() );
if( me->GetZoneConnection() != UNDEFINED_CONNECTION )
fprintf( m_fp, ".ZoneConnection %d\n", me->GetZoneConnection() );
// attributes
if( me->GetAttributes() != MOD_DEFAULT )
{
......
......@@ -21,7 +21,8 @@ enum ZONE_EDIT_T {
/// How pads are covered by copper in zone
enum {
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
......
......@@ -233,8 +233,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
int gap = zone_clearance;
if( (m_PadOption == PAD_NOT_IN_ZONE)
|| (GetNet() == 0) || pad->GetShape() == PAD_TRAPEZOID )
if( ( GetPadConnection( pad ) == PAD_NOT_IN_ZONE )
|| ( GetNet() == 0 ) || ( pad->GetShape() == PAD_TRAPEZOID ) )
// PAD_TRAPEZOID shapes are not in zones because they are used in microwave apps
// and i think it is good that shapes are not changed by thermal pads or others
......@@ -358,12 +358,13 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
}
// Remove thermal symbols
if( m_PadOption == THERMAL_PAD )
{
for( MODULE* module = aPcb->m_Modules; module; module = module->Next() )
{
for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() )
{
if( GetPadConnection( pad ) != THERMAL_PAD )
continue;
if( !pad->IsOnLayer( GetLayer() ) )
continue;
......@@ -383,7 +384,6 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
}
}
}
}
// cornerBufferPolysToSubstract contains polygons to substract.
// polyset_zone_solid_areas contains the main filled area
......@@ -405,8 +405,6 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
Test_For_Copper_Island_And_Remove_Insulated_Islands( aPcb );
// Now we remove all unused thermal stubs.
if( m_PadOption == THERMAL_PAD )
{
cornerBufferPolysToSubstract.clear();
// Test thermal stubs connections and add polygons to remove unconnected stubs.
......@@ -427,7 +425,6 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
if( GetNet() > 0 )
Test_For_Copper_Island_And_Remove_Insulated_Islands( aPcb );
}
}
cornerBufferPolysToSubstract.clear();
}
......
......@@ -54,9 +54,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 )
continue;
// check
if( !pad->IsOnLayer( aZone->GetLayer() ) )
continue;
if( pad->GetNet() != aZone->GetNet() )
continue;
......
......@@ -83,7 +83,7 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare )
if( m_ArcToSegmentsCount != aZoneToCompare.m_ArcToSegmentsCount )
return false;
if( m_PadOption != aZoneToCompare.m_PadOption )
if( m_PadConnection != aZoneToCompare.m_PadConnection )
return false;
if( m_ThermalReliefGap != aZoneToCompare.m_ThermalReliefGap )
......
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