Commit a731a6b7 authored by Marco Mattila's avatar Marco Mattila

Add more pad local copper zone settings in pcbnew. Tune the pad properties dialog a little.

parent e90cc8ad
......@@ -69,6 +69,8 @@ MODULE::MODULE( BOARD* parent ) :
m_LocalSolderPasteMargin = 0;
m_LocalSolderPasteMarginRatio = 0.0;
m_ZoneConnection = UNDEFINED_CONNECTION; // Use zone setting by default
m_ThermalWidth = 0; // Use zone setting by default
m_ThermalGap = 0; // Use zone setting by default
m_Reference = new TEXTE_MODULE( this, TEXT_is_REFERENCE );
......@@ -103,6 +105,8 @@ MODULE::MODULE( const MODULE& aModule ) :
m_LocalSolderPasteMargin = aModule.m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = aModule.m_LocalSolderPasteMarginRatio;
m_ZoneConnection = aModule.m_ZoneConnection;
m_ThermalWidth = aModule.m_ThermalWidth;
m_ThermalGap = aModule.m_ThermalGap;
// Copy reference and value.
m_Reference = new TEXTE_MODULE( *aModule.m_Reference );
......@@ -219,6 +223,8 @@ void MODULE::Copy( MODULE* aModule )
m_LocalSolderPasteMargin = aModule->m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = aModule->m_LocalSolderPasteMarginRatio;
m_ZoneConnection = aModule->m_ZoneConnection;
m_ThermalWidth = aModule->m_ThermalWidth;
m_ThermalGap = aModule->m_ThermalGap;
// Copy reference and value.
m_Reference->Copy( aModule->m_Reference );
......
......@@ -122,6 +122,7 @@ public:
// The final margin is the sum of these 2 values
ZoneConnection m_ZoneConnection;
int m_ThermalWidth, m_ThermalGap;
public:
MODULE( BOARD* parent );
......@@ -198,6 +199,12 @@ public:
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
ZoneConnection GetZoneConnection() const { return m_ZoneConnection; }
void SetThermalWidth( int aWidth ) { m_ThermalWidth = aWidth; }
int GetThermalWidth() const { return m_ThermalWidth; }
void SetThermalGap( int aGap ) { m_ThermalGap = aGap; }
int GetThermalGap() const { return m_ThermalGap; }
int GetAttributes() const { return m_Attributs; }
void SetAttributes( int aAttributes ) { m_Attributs = aAttributes; }
......
......@@ -71,6 +71,8 @@ D_PAD::D_PAD( MODULE* parent ) :
m_LocalSolderPasteMargin = 0;
m_LocalSolderPasteMarginRatio = 0.0;
m_ZoneConnection = UNDEFINED_CONNECTION; // Use parent setting by default
m_ThermalWidth = 0; // Use parent setting by default
m_ThermalGap = 0; // Use parent setting by default
// set layers mask to default for a standard pad
m_layerMask = PAD_STANDARD_DEFAULT_LAYERS;
......@@ -305,6 +307,8 @@ void D_PAD::Copy( D_PAD* source )
m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = source->m_LocalSolderPasteMarginRatio;
m_ZoneConnection = source->m_ZoneConnection;
m_ThermalWidth = source->m_ThermalWidth;
m_ThermalGap = source->m_ThermalGap;
SetSubRatsnest( 0 );
SetSubNet( 0 );
......@@ -453,6 +457,28 @@ ZoneConnection D_PAD::GetZoneConnection() const
}
int D_PAD::GetThermalWidth() const
{
MODULE* module = (MODULE*) GetParent();
if( m_ThermalWidth == 0 && module )
return module->GetThermalWidth();
else
return m_ThermalWidth;
}
int D_PAD::GetThermalGap() const
{
MODULE* module = (MODULE*) GetParent();
if( m_ThermalGap == 0 && module )
return module->GetThermalGap();
else
return m_ThermalGap;
}
void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame )
{
MODULE* module;
......
......@@ -269,6 +269,12 @@ public:
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
ZoneConnection GetZoneConnection() const;
void SetThermalWidth( int aWidth ) { m_ThermalWidth = aWidth; }
int GetThermalWidth() const;
void SetThermalGap( int aGap ) { m_ThermalGap = aGap; }
int GetThermalGap() const;
/* Reading and writing data on files */
int ReadDescr( LINE_READER* aReader );
......@@ -534,6 +540,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;
int m_ThermalWidth, m_ThermalGap;
};
#endif // PAD_H_
......@@ -450,6 +450,24 @@ void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, in
}
int ZONE_CONTAINER::GetThermalReliefGap( D_PAD* aPad ) const
{
if( aPad == NULL || aPad->GetThermalGap() == 0 )
return m_ThermalReliefGap;
else
return aPad->GetThermalGap();
}
int ZONE_CONTAINER::GetThermalReliefCopperBridge( D_PAD* aPad ) const
{
if( aPad == NULL || aPad->GetThermalWidth() == 0 )
return m_ThermalReliefCopperBridge;
else
return aPad->GetThermalWidth();
}
bool ZONE_CONTAINER::HitTest( const wxPoint& refPos )
{
if( HitTestForCorner( refPos ) )
......@@ -888,7 +906,6 @@ ZoneConnection ZONE_CONTAINER::GetPadConnection( D_PAD* aPad ) const
return m_PadConnection;
else
return aPad->GetZoneConnection();
}
......
......@@ -274,13 +274,13 @@ public:
int GetFillMode() const { return m_FillMode; }
void SetThermalReliefGap( int aThermalReliefGap ) { m_ThermalReliefGap = aThermalReliefGap; }
int GetThermalReliefGap() const { return m_ThermalReliefGap; }
int GetThermalReliefGap( D_PAD* aPad = NULL ) const;
void SetThermalReliefCopperBridge( int aThermalReliefCopperBridge )
{
m_ThermalReliefCopperBridge = aThermalReliefCopperBridge;
}
int GetThermalReliefCopperBridge() const { return m_ThermalReliefCopperBridge; }
int GetThermalReliefCopperBridge( D_PAD* aPad = NULL ) const;
void SetArcSegCount( int aArcSegCount ) { m_ArcToSegmentsCount = aArcSegCount; }
int GetArcSegCount() const { return m_ArcToSegmentsCount; }
......
......@@ -80,6 +80,9 @@ private:
bool m_canUpdate;
static wxPoint prevPosition;
static wxSize prevSize;
void initValues();
void OnPadShapeSelection( wxCommandEvent& event );
void OnDrillShapeSelected( wxCommandEvent& event );
......@@ -95,6 +98,10 @@ private:
};
wxPoint DIALOG_PAD_PROPERTIES::prevPosition( -1, -1 );
wxSize DIALOG_PAD_PROPERTIES::prevSize;
DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) :
DIALOG_PAD_PROPERTIES_BASE( aParent ),
m_Pad_Master( aParent->GetBoard()->GetDesignSettings().m_Pad_Master )
......@@ -114,7 +121,14 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
m_sdbSizer1OK->SetDefault();
GetSizer()->SetSizeHints( this );
Center();
if( prevPosition.x != -1 )
SetSize( prevPosition.x, prevPosition.y,
prevSize.x, prevSize.y );
else
Center();
m_PadNumCtrl->SetFocus();
m_canUpdate = true;
}
......@@ -241,12 +255,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_PadShapeDelta_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_PadLengthDie_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
// Display current pad masks clearances units
m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_SolderMaskMarginUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_SolderPasteMarginUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_ThermalWidthUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_ThermalGapUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
// Display current pad parameters units:
PutValueInLocalUnits( *m_PadPosition_X_Ctrl, m_dummyPad->GetPosition().x, internalUnits );
......@@ -264,12 +279,12 @@ void DIALOG_PAD_PROPERTIES::initValues()
if( m_dummyPad->GetDelta().x )
{
PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().x, internalUnits );
m_radioBtnDeltaXdir->SetValue(true);
m_trapDeltaDirChoice->SetSelection( 0 );
}
else
{
PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().y, internalUnits );
m_radioBtnDeltaYdir->SetValue(true);
m_trapDeltaDirChoice->SetSelection( 1 );
}
PutValueInLocalUnits( *m_LengthDieCtrl, m_dummyPad->GetDieLength(), internalUnits );
......@@ -278,6 +293,8 @@ void DIALOG_PAD_PROPERTIES::initValues()
PutValueInLocalUnits( *m_SolderMaskMarginCtrl,
m_dummyPad->GetLocalSolderMaskMargin(),
internalUnits );
PutValueInLocalUnits( *m_ThermalWidthCtrl, m_dummyPad->GetThermalWidth(), internalUnits );
PutValueInLocalUnits( *m_ThermalGapCtrl, m_dummyPad->GetThermalGap(), internalUnits );
// These 2 parameters are usually < 0, so prepare entering a negative value, if current is 0
PutValueInLocalUnits( *m_SolderPasteMarginCtrl,
......@@ -345,7 +362,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
m_PadOrient->SetSelection( 1 );
break;
case - 900:
case -900:
m_PadOrient->SetSelection( 2 );
break;
......@@ -437,30 +454,34 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
{
case 0: //CIRCLE:
m_ShapeDelta_Ctrl->Enable( false );
m_radioBtnDeltaXdir->Enable( false );
m_radioBtnDeltaYdir->Enable( false );
m_trapDeltaDirChoice->Enable( false );
m_ShapeSize_Y_Ctrl->Enable( false );
m_ShapeOffset_X_Ctrl->Enable( false );
m_ShapeOffset_Y_Ctrl->Enable( false );
break;
case 1: //OVALE:
m_ShapeDelta_Ctrl->Enable( false );
m_radioBtnDeltaXdir->Enable( false );
m_radioBtnDeltaYdir->Enable( false );
m_trapDeltaDirChoice->Enable( false );
m_ShapeSize_Y_Ctrl->Enable( true );
m_ShapeOffset_X_Ctrl->Enable( true );
m_ShapeOffset_Y_Ctrl->Enable( true );
break;
case 2: // PAD_RECT:
m_ShapeDelta_Ctrl->Enable( false );
m_radioBtnDeltaXdir->Enable( false );
m_radioBtnDeltaYdir->Enable( false );
m_trapDeltaDirChoice->Enable( false );
m_ShapeSize_Y_Ctrl->Enable( true );
m_ShapeOffset_X_Ctrl->Enable( true );
m_ShapeOffset_Y_Ctrl->Enable( true );
break;
case 3: //TRAPEZE:
m_ShapeDelta_Ctrl->Enable( true );
m_radioBtnDeltaXdir->Enable( true );
m_radioBtnDeltaYdir->Enable( true );
m_trapDeltaDirChoice->Enable( true );
m_ShapeSize_Y_Ctrl->Enable( true );
m_ShapeOffset_X_Ctrl->Enable( true );
m_ShapeOffset_Y_Ctrl->Enable( true );
break;
}
......@@ -532,9 +553,6 @@ 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
*/
{
long layer_mask;
int ii;
......@@ -549,6 +567,10 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
// Enable/disable drill dialog items:
event.SetId( m_DrillShapeCtrl->GetSelection() );
OnDrillShapeSelected( event );
if( ii == 0 || ii == NBTYPES-1 )
m_DrillShapeCtrl->Enable( true );
else
m_DrillShapeCtrl->Enable( false );
// Enable/disable Pad name,and pad length die
// (disable for NPTH pads (mechanical pads)
......@@ -610,6 +632,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
bool rastnestIsChanged = false;
int isign = m_isFlipped ? -1 : 1;
prevPosition = GetPosition();
prevSize = GetSize();
bool success = TransfertDataToPad( m_dummyPad, true );
if( !success ) // An error on parameters has occured
return;
......@@ -649,7 +674,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_CurrentPad->SetOrientation( m_Pad_Master.GetOrientation() * isign + module->GetOrientation() );
m_CurrentPad->SetSize( m_Pad_Master.GetSize() );
m_CurrentPad->SetSize( m_Pad_Master.GetSize() );
size = m_Pad_Master.GetDelta();
size.y *= isign;
......@@ -702,6 +727,8 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_CurrentPad->SetLocalSolderPasteMargin( m_Pad_Master.GetLocalSolderPasteMargin() );
m_CurrentPad->SetLocalSolderPasteMarginRatio( m_Pad_Master.GetLocalSolderPasteMarginRatio() );
m_CurrentPad->SetZoneConnection( m_Pad_Master.GetZoneConnection() );
m_CurrentPad->SetThermalWidth( m_Pad_Master.GetThermalWidth() );
m_CurrentPad->SetThermalGap( m_Pad_Master.GetThermalGap() );
module->CalculateBoundingBox();
m_CurrentPad->DisplayInfo( m_Parent );
......@@ -737,6 +764,10 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
internalUnits ) );
aPad->SetLocalSolderPasteMargin( ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl,
internalUnits ) );
aPad->SetThermalWidth( ReturnValueFromTextCtrl( *m_ThermalWidthCtrl,
internalUnits ) );
aPad->SetThermalGap( ReturnValueFromTextCtrl( *m_ThermalGapCtrl,
internalUnits ) );
double dtmp = 0.0;
msg = m_SolderPasteMarginRatioCtrl->GetValue();
msg.ToDouble( &dtmp );
......@@ -805,7 +836,7 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
// m_DeltaSize.x or m_DeltaSize.y must be NULL. for a trapezoid.
wxSize delta;
if( m_radioBtnDeltaXdir->GetValue() )
if( m_trapDeltaDirChoice->GetSelection() == 0 )
delta.x = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits );
else
delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits );
......@@ -1005,9 +1036,9 @@ void DIALOG_PAD_PROPERTIES::OnValuesChanged( wxCommandEvent& event )
}
/*********************************************************************/
void DIALOG_PAD_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event )
/*********************************************************************/
{
prevPosition = GetPosition();
prevSize = GetSize();
EndModal( wxID_CANCEL );
}
......@@ -11,253 +11,213 @@
DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* m_MainSizer;
m_MainSizer = new wxBoxSizer( wxVERTICAL );
m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bGeneralSizer;
bGeneralSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* m_LeftBoxSizer;
m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
m_PadNumText = new wxStaticText( this, wxID_ANY, _("Number:"), wxDefaultPosition, wxDefaultSize, 0 );
wxFlexGridSizer* fgSizer5;
fgSizer5 = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizer5->AddGrowableCol( 1 );
fgSizer5->SetFlexibleDirection( wxBOTH );
fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_PadNumText = new wxStaticText( m_panel2, wxID_ANY, _("Number:"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadNumText->Wrap( -1 );
m_LeftBoxSizer->Add( m_PadNumText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
fgSizer5->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_PadNumCtrl = new wxTextCtrl( m_panel2, wxID_PADNUMCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer5->Add( m_PadNumCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_PadNameText = new wxStaticText( this, wxID_ANY, _("Net name:"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadNameText = new wxStaticText( m_panel2, wxID_ANY, _("Net name:"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadNameText->Wrap( -1 );
m_LeftBoxSizer->Add( m_PadNameText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadNetNameCtrl = new wxTextCtrl( this, wxID_PADNETNAMECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LeftBoxSizer->Add( m_PadNetNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer5->Add( m_PadNameText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizer2;
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Geometry") ), wxVERTICAL );
m_PadNetNameCtrl = new wxTextCtrl( m_panel2, wxID_PADNETNAMECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer5->Add( m_PadNetNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizerGeometry;
fgSizerGeometry = new wxFlexGridSizer( 14, 3, 0, 0 );
fgSizerGeometry->SetFlexibleDirection( wxBOTH );
fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText44 = new wxStaticText( m_panel2, wxID_ANY, _("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText44->Wrap( -1 );
fgSizer5->Add( m_staticText44, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
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 );
m_PadPosition_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadPosition_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadPosX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadPosX_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadPosX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
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 );
m_PadPosition_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadPosition_Y_Ctrl, 0, wxALL, 5 );
m_PadPosY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadPosY_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadPosY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticline7 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline7, 0, wxEXPAND | wxALL, 5 );
wxString m_PadTypeChoices[] = { _("Through-hole"), _("SMD"), _("Contact"), _("NPTH, Mechanical") };
int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString );
m_PadType = new wxChoice( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 0 );
m_PadType->SetSelection( 0 );
fgSizer5->Add( m_PadType, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline8, 0, wxEXPAND | wxALL, 5 );
m_LeftBoxSizer->Add( fgSizer5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
wxFlexGridSizer* fgSizer6;
fgSizer6 = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizer6->SetFlexibleDirection( wxBOTH );
fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
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 );
m_staticText45 = new wxStaticText( m_panel2, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText45->Wrap( -1 );
fgSizer6->Add( m_staticText45, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_PadDrill_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadDrill_X_Ctrl, 0, wxALL, 5 );
wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal") };
int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString );
m_PadShape = new wxChoice( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 );
m_PadShape->SetSelection( 0 );
fgSizer6->Add( m_PadShape, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_PadDrill_X_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadDrill_X_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticText46 = new wxStaticText( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_staticText46->Wrap( -1 );
fgSizer6->Add( m_staticText46, 0, wxALL, 5 );
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 );
m_staticText4 = new wxStaticText( m_panel2, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 );
fgSizer6->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_PadDrill_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadDrill_Y_Ctrl, 0, wxALL, 5 );
m_PadPosition_X_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_PadPosition_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_PadDrill_Y_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadDrill_Y_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadDrill_Y_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_PadPosX_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadPosX_Unit->Wrap( -1 );
fgSizer6->Add( m_PadPosX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 );
m_staticText41 = new wxStaticText( m_panel2, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText41->Wrap( -1 );
fgSizer6->Add( m_staticText41, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
m_PadPosition_Y_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_PadPosition_Y_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline6, 0, wxEXPAND | wxALL, 5 );
m_PadPosY_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadPosY_Unit->Wrap( -1 );
fgSizer6->Add( m_PadPosY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Shape size X"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12 = new wxStaticText( m_panel2, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
fgSizerGeometry->Add( m_staticText12, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
fgSizer6->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_ShapeSize_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_ShapeSize_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ShapeSize_X_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_ShapeSize_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_PadShapeSizeX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeSizeX_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeSizeX_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadShapeSizeX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
fgSizer6->Add( m_PadShapeSizeX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_staticText15 = new wxStaticText( this, wxID_ANY, _("Shape size Y"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15 = new wxStaticText( m_panel2, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15->Wrap( -1 );
fgSizerGeometry->Add( m_staticText15, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
fgSizer6->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_ShapeSize_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_ShapeSize_Y_Ctrl, 0, wxALL, 5 );
m_ShapeSize_Y_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_ShapeSize_Y_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_PadShapeSizeY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeSizeY_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeSizeY_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadShapeSizeY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticText17 = new wxStaticText( this, wxID_ANY, _("Shape offset X"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText17->Wrap( -1 );
fgSizerGeometry->Add( m_staticText17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer6->Add( m_PadShapeSizeY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_ShapeOffset_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_ShapeOffset_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticText48 = new wxStaticText( m_panel2, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText48->Wrap( -1 );
fgSizer6->Add( m_staticText48, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadShapeOffsetX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeOffsetX_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadShapeOffsetX_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticText19 = new wxStaticText( this, wxID_ANY, _("Shape offset Y"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText19->Wrap( -1 );
fgSizerGeometry->Add( m_staticText19, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
m_ShapeOffset_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_ShapeOffset_Y_Ctrl, 0, wxALL, 5 );
m_PadShapeOffsetY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeOffsetY_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadShapeOffsetY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticText21 = new wxStaticText( this, wxID_ANY, _("Shape delta dim"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText21->Wrap( -1 );
fgSizerGeometry->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
m_ShapeDelta_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_ShapeDelta_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxString m_PadOrientChoices[] = { _("0"), _("90"), _("-90"), _("180"), _("Custom") };
int m_PadOrientNChoices = sizeof( m_PadOrientChoices ) / sizeof( wxString );
m_PadOrient = new wxChoice( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadOrientNChoices, m_PadOrientChoices, 0 );
m_PadOrient->SetSelection( 0 );
fgSizer6->Add( m_PadOrient, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadShapeDelta_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeDelta_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadShapeDelta_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticText491 = new wxStaticText( m_panel2, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText491->Wrap( -1 );
fgSizer6->Add( m_staticText491, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_staticText23 = new wxStaticText( this, wxID_ANY, _("Trap. direction"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText23->Wrap( -1 );
fgSizerGeometry->Add( m_staticText23, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
m_PadOrientText = new wxStaticText( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_PadOrientText->Wrap( -1 );
fgSizer6->Add( m_PadOrientText, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizerbdir;
bSizerbdir = new wxBoxSizer( wxHORIZONTAL );
m_PadOrientCtrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_PadOrientCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_radioBtnDeltaXdir = new wxRadioButton( this, wxID_DDIRX, _(">"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_radioBtnDeltaXdir->SetValue( true );
bSizerbdir->Add( m_radioBtnDeltaXdir, 0, wxALL, 5 );
m_customOrientUnits = new wxStaticText( m_panel2, wxID_ANY, _("0.1 deg"), wxDefaultPosition, wxDefaultSize, 0 );
m_customOrientUnits->Wrap( -1 );
fgSizer6->Add( m_customOrientUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_radioBtnDeltaYdir = new wxRadioButton( this, wxID_DDIRY, _("^"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerbdir->Add( m_radioBtnDeltaYdir, 0, wxALL, 5 );
m_staticText17 = new wxStaticText( m_panel2, wxID_ANY, _("Offset X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText17->Wrap( -1 );
fgSizer6->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
fgSizerGeometry->Add( bSizerbdir, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_ShapeOffset_X_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_ShapeOffset_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_staticTextDDirInfo = new wxStaticText( this, wxID_ANY, _("Rot 0"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDDirInfo->Wrap( -1 );
fgSizerGeometry->Add( m_staticTextDDirInfo, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_PadShapeOffsetX_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeOffsetX_Unit->Wrap( -1 );
fgSizer6->Add( m_PadShapeOffsetX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline10, 0, wxEXPAND | wxALL, 5 );
m_staticText19 = new wxStaticText( m_panel2, wxID_ANY, _("Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText19->Wrap( -1 );
fgSizer6->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_staticline101 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline101, 0, wxEXPAND | wxALL, 5 );
m_ShapeOffset_Y_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_ShapeOffset_Y_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_staticline1011 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizerGeometry->Add( m_staticline1011, 0, wxEXPAND | wxALL, 5 );
m_PadShapeOffsetY_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeOffsetY_Unit->Wrap( -1 );
fgSizer6->Add( m_PadShapeOffsetY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_staticText38 = new wxStaticText( this, wxID_ANY, _("Length die"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText38 = new wxStaticText( m_panel2, wxID_ANY, _("Die length:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText38->Wrap( -1 );
m_staticText38->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") );
fgSizerGeometry->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
fgSizer6->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_LengthDieCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_LengthDieCtrl, 0, wxALL, 5 );
m_LengthDieCtrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_LengthDieCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLengthDie_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadLengthDie_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadLengthDie_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadLengthDie_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
fgSizer6->Add( m_PadLengthDie_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
sbSizer2->Add( fgSizerGeometry, 1, wxEXPAND, 5 );
m_staticText21 = new wxStaticText( m_panel2, wxID_ANY, _("Trap. delta dim:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText21->Wrap( -1 );
fgSizer6->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_LeftBoxSizer->Add( sbSizer2, 1, wxEXPAND, 5 );
m_ShapeDelta_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6->Add( m_ShapeDelta_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
bGeneralSizer->Add( m_LeftBoxSizer, 0, wxBOTTOM|wxLEFT|wxEXPAND, 5 );
m_PadShapeDelta_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadShapeDelta_Unit->Wrap( -1 );
fgSizer6->Add( m_PadShapeDelta_Unit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
wxBoxSizer* bMiddleSizer;
bMiddleSizer = new wxBoxSizer( wxVERTICAL );
m_staticText23 = new wxStaticText( m_panel2, wxID_ANY, _("Trap. direction:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText23->Wrap( -1 );
fgSizer6->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxLEFT, 5 );
wxString m_trapDeltaDirChoiceChoices[] = { _("Horiz."), _("Vert.") };
int m_trapDeltaDirChoiceNChoices = sizeof( m_trapDeltaDirChoiceChoices ) / sizeof( wxString );
m_trapDeltaDirChoice = new wxChoice( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trapDeltaDirChoiceNChoices, m_trapDeltaDirChoiceChoices, 0 );
m_trapDeltaDirChoice->SetSelection( 0 );
fgSizer6->Add( m_trapDeltaDirChoice, 0, wxEXPAND|wxALL, 5 );
m_LeftBoxSizer->Add( fgSizer6, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bMiddleUpperSizer;
bMiddleUpperSizer = new wxBoxSizer( wxHORIZONTAL );
m_DrillShapeBoxSizer = new wxBoxSizer( wxVERTICAL );
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->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->SetSelection( 0 );
m_DrillShapeBoxSizer->Add( m_DrillShapeCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bMiddleUpperSizer->Add( m_DrillShapeBoxSizer, 0, wxBOTTOM, 5 );
wxBoxSizer* m_MiddleRightBoxSizer;
m_MiddleRightBoxSizer = new wxBoxSizer( wxVERTICAL );
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->SetSelection( 0 );
m_MiddleRightBoxSizer->Add( m_PadOrient, 0, wxALL|wxEXPAND, 5 );
m_PadOrientText = new wxStaticText( this, wxID_ANY, _("Pad Orient (0.1 deg)"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadOrientText->Wrap( -1 );
m_MiddleRightBoxSizer->Add( m_PadOrientText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadOrientCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_MiddleRightBoxSizer->Add( m_PadOrientCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bMiddleUpperSizer->Add( m_MiddleRightBoxSizer, 0, wxBOTTOM, 5 );
m_panelShowPad = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
m_panelShowPad->SetBackgroundColour( wxColour( 0, 0, 0 ) );
bMiddleUpperSizer->Add( m_panelShowPad, 1, wxEXPAND, 5 );
bMiddleSizer->Add( bMiddleUpperSizer, 1, wxEXPAND, 5 );
m_LeftBoxSizer->Add( bMiddleUpperSizer, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizeModuleInfo;
sbSizeModuleInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprint Orientation") ), wxHORIZONTAL );
sbSizeModuleInfo = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Footprint Orientation") ), wxVERTICAL );
wxFlexGridSizer* fgSizer4;
fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
......@@ -265,194 +225,298 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
fgSizer4->SetFlexibleDirection( wxBOTH );
fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTitleModuleRot = new wxStaticText( this, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTitleModuleRot = new wxStaticText( m_panel2, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTitleModuleRot->Wrap( -1 );
fgSizer4->Add( m_staticTitleModuleRot, 0, wxALIGN_RIGHT|wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticModuleRotValue = new wxStaticText( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticModuleRotValue = new wxStaticText( m_panel2, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticModuleRotValue->Wrap( -1 );
fgSizer4->Add( m_staticModuleRotValue, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticTitleModuleSide = new wxStaticText( this, wxID_ANY, _("Board side:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTitleModuleSide = new wxStaticText( m_panel2, wxID_ANY, _("Board side:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTitleModuleSide->Wrap( -1 );
fgSizer4->Add( m_staticTitleModuleSide, 0, wxALL|wxALIGN_RIGHT, 5 );
m_staticModuleSideValue = new wxStaticText( this, wxID_ANY, _("Front side"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticModuleSideValue = new wxStaticText( m_panel2, wxID_ANY, _("Front side"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticModuleSideValue->Wrap( -1 );
fgSizer4->Add( m_staticModuleSideValue, 0, wxALL|wxEXPAND, 5 );
sbSizeModuleInfo->Add( fgSizer4, 1, wxEXPAND, 5 );
m_staticTextWarningPadFlipped = new wxStaticText( this, wxID_ANY, _("Warning:\nThis pad is flipped on board.\nBack and front layers will be swapped."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextWarningPadFlipped = new wxStaticText( m_panel2, wxID_ANY, _("Warning:\nThis pad is flipped on board.\nBack and front layers will be swapped."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextWarningPadFlipped->Wrap( -1 );
m_staticTextWarningPadFlipped->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
sbSizeModuleInfo->Add( m_staticTextWarningPadFlipped, 0, wxALIGN_CENTER_VERTICAL, 5 );
bMiddleSizer->Add( sbSizeModuleInfo, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_LeftBoxSizer->Add( sbSizeModuleInfo, 0, wxEXPAND|wxBOTTOM, 5 );
wxStaticBoxSizer* sbClearancesSizer;
sbClearancesSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Local Settings") ), wxVERTICAL );
bGeneralSizer->Add( m_LeftBoxSizer, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizer13;
bSizer13 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer12;
bSizer12 = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbSizer2;
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Drill") ), wxVERTICAL );
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 );
wxFlexGridSizer* fgSizerGeometry;
fgSizerGeometry = new wxFlexGridSizer( 14, 3, 0, 0 );
fgSizerGeometry->SetFlexibleDirection( wxBOTH );
fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
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 );
m_staticText47 = new wxStaticText( m_panel2, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText47->Wrap( -1 );
fgSizerGeometry->Add( m_staticText47, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bSizer13->Add( bSizer12, 0, wxEXPAND, 5 );
wxString m_DrillShapeCtrlChoices[] = { _("Circular"), _("Oval") };
int m_DrillShapeCtrlNChoices = sizeof( m_DrillShapeCtrlChoices ) / sizeof( wxString );
m_DrillShapeCtrl = new wxChoice( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 0 );
m_DrillShapeCtrl->SetSelection( 0 );
fgSizerGeometry->Add( m_DrillShapeCtrl, 0, wxALL|wxEXPAND, 5 );
m_staticText51 = new wxStaticText( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_staticText51->Wrap( -1 );
fgSizerGeometry->Add( m_staticText51, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_textPadDrillX = new wxStaticText( m_panel2, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillX->Wrap( -1 );
fgSizerGeometry->Add( m_textPadDrillX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_PadDrill_X_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadDrill_X_Ctrl, 0, wxALL, 5 );
m_PadDrill_X_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadDrill_X_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_textPadDrillY = new wxStaticText( m_panel2, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillY->Wrap( -1 );
fgSizerGeometry->Add( m_textPadDrillY, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_PadDrill_Y_Ctrl = new wxTextCtrl( m_panel2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadDrill_Y_Ctrl, 0, wxALL, 5 );
m_PadDrill_Y_Unit = new wxStaticText( m_panel2, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadDrill_Y_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadDrill_Y_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
sbSizer2->Add( fgSizerGeometry, 1, wxEXPAND, 5 );
bSizer10->Add( sbSizer2, 0, wxALL, 5 );
wxStaticBoxSizer* m_LayersSizer;
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Layers") ), wxVERTICAL );
wxBoxSizer* bSizer11;
bSizer11 = new wxBoxSizer( wxHORIZONTAL );
m_staticText511 = new wxStaticText( m_panel2, wxID_ANY, _("Copper:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText511->Wrap( -1 );
bSizer11->Add( m_staticText511, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
wxString m_rbCopperLayersSelChoices[] = { _("Front"), _("Back"), _("All"), _("None") };
int m_rbCopperLayersSelNChoices = sizeof( m_rbCopperLayersSelChoices ) / sizeof( wxString );
m_rbCopperLayersSel = new wxChoice( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 0 );
m_rbCopperLayersSel->SetSelection( 0 );
bSizer11->Add( m_rbCopperLayersSel, 1, wxALL, 5 );
m_LayersSizer->Add( bSizer11, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerTechlayers;
sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( m_panel2, wxID_ANY, _("Technical") ), wxVERTICAL );
m_PadLayerAdhCmp = new wxCheckBox( m_panel2, wxID_ANY, _("Adhesive Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerAdhCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerAdhCu = new wxCheckBox( m_panel2, wxID_ANY, _("Adhesive Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerPateCmp = new wxCheckBox( m_panel2, wxID_ANY, _("Solder paste Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerPateCu = new wxCheckBox( m_panel2, wxID_ANY, _("Solder paste Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerSilkCmp = new wxCheckBox( m_panel2, wxID_ANY, _("Silkscreen Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerSilkCu = new wxCheckBox( m_panel2, wxID_ANY, _("Silkscreen Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerMaskCmp = new wxCheckBox( m_panel2, wxID_ANY, _("Solder mask Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerMaskCu = new wxCheckBox( m_panel2, wxID_ANY, _("Solder mask Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerDraft = new wxCheckBox( m_panel2, wxID_ANY, _("Draft layer"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerECO1 = new wxCheckBox( m_panel2, wxID_ANY, _("E.C.O.1 layer"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerECO2 = new wxCheckBox( m_panel2, wxID_ANY, _("E.C.O.2 layer"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerECO2, 0, wxALL, 5 );
m_LayersSizer->Add( sbSizerTechlayers, 0, wxALL|wxEXPAND, 5 );
bSizer10->Add( m_LayersSizer, 1, wxALL|wxEXPAND, 5 );
bGeneralSizer->Add( bSizer10, 0, wxEXPAND|wxALL, 5 );
wxBoxSizer* bSizer13x;
bSizer13x = new wxBoxSizer( wxVERTICAL );
m_panelShowPad = new wxPanel( m_panel2, wxID_ANY, wxDefaultPosition, wxSize( 200,200 ), wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER );
m_panelShowPad->SetBackgroundColour( wxColour( 0, 0, 0 ) );
bSizer13x->Add( m_panelShowPad, 1, wxEXPAND|wxRIGHT|wxSHAPED|wxTOP, 5 );
bGeneralSizer->Add( bSizer13x, 1, wxEXPAND, 5 );
m_panel2->SetSizer( bGeneralSizer );
m_panel2->Layout();
bGeneralSizer->Fit( m_panel2 );
m_notebook1->AddPage( m_panel2, _("General"), true );
m_localSettingsPanel = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer14;
bSizer14 = new wxBoxSizer( wxHORIZONTAL );
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 ) );
bSizer13->Add( m_staticTextWarning, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer14->Add( 0, 0, 1, wxEXPAND, 5 );
sbClearancesSizer->Add( bSizer13, 0, wxEXPAND, 5 );
wxBoxSizer* bSizer13;
bSizer13 = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbClearancesSizer;
sbClearancesSizer = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Clearances") ), wxVERTICAL );
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( m_localSettingsPanel, 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 );
fgClearancesGridSizer->Add( m_staticTextNetClearance, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_NetClearanceValueCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceValueCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_NetClearanceValueCtrl, 0, wxALL|wxEXPAND, 5 );
m_NetClearanceUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_NetClearanceUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgClearancesGridSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgClearancesGridSizer->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgClearancesGridSizer->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_MaskClearanceTitle = new wxStaticText( this, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskClearanceTitle = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskClearanceTitle->Wrap( -1 );
m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between this pad and the solder mask\nIf 0, the footprint local value or the global value is used") );
fgClearancesGridSizer->Add( m_MaskClearanceTitle, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
fgClearancesGridSizer->Add( m_MaskClearanceTitle, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_SolderMaskMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderMaskMarginCtrl, 0, wxALL|wxEXPAND, 5 );
m_SolderMaskMarginUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_SolderMaskMarginUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticTextSolderPaste = new wxStaticText( this, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSolderPaste = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSolderPaste->Wrap( -1 );
m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between this pad and the solder paste.\nIf 0 the footprint value or the global value is used..\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") );
fgClearancesGridSizer->Add( m_staticTextSolderPaste, 0, wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
fgClearancesGridSizer->Add( m_staticTextSolderPaste, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_SolderPasteMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderPasteMarginCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_SolderPasteMarginUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_SolderPasteMarginUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticTextRatio = new wxStaticText( this, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRatio = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRatio->Wrap( -1 );
m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between this pad and the solder paste.\nA value of 10 means the clearance value is 10 per cent of the pad size\nIf 0 the footprint value or the global value is used..\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") );
fgClearancesGridSizer->Add( m_staticTextRatio, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
fgClearancesGridSizer->Add( m_staticTextRatio, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_SolderPasteMarginRatioCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginRatioCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderPasteMarginRatioCtrl, 0, wxALL|wxEXPAND, 5 );
m_SolderPasteRatioMarginUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteRatioMarginUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteRatioMarginUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_SolderPasteRatioMarginUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
sbClearancesSizer->Add( fgClearancesGridSizer, 1, wxEXPAND, 5 );
bMiddleSizer->Add( sbClearancesSizer, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizer13->Add( sbClearancesSizer, 0, wxEXPAND|wxALL, 5 );
bGeneralSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizer7;
sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Copper Zones") ), wxVERTICAL );
wxBoxSizer* m_RightBoxSizer;
m_RightBoxSizer = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgSizer41;
fgSizer41 = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizer41->SetFlexibleDirection( wxBOTH );
fgSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
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->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_staticText40 = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText40->Wrap( -1 );
fgSizer41->Add( m_staticText40, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
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( 2 );
m_LayersSizer->Add( m_rbCopperLayersSel, 0, wxALL|wxEXPAND, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("From parent module"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( m_localSettingsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
fgSizer41->Add( m_ZoneConnectionChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
wxStaticBoxSizer* sbSizerTechlayers;
sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers") ), wxVERTICAL );
m_staticText43 = new wxStaticText( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_staticText43->Wrap( -1 );
fgSizer41->Add( m_staticText43, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_PadLayerAdhCmp = new wxCheckBox( this, wxID_ANY, _("Adhesive Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerAdhCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticText49 = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Thermal relief width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText49->Wrap( -1 );
fgSizer41->Add( m_staticText49, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_PadLayerAdhCu = new wxCheckBox( this, wxID_ANY, _("Adhesive Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ThermalWidthCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer41->Add( m_ThermalWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_PadLayerPateCmp = new wxCheckBox( this, wxID_ANY, _("Solder paste Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ThermalWidthUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_ThermalWidthUnits->Wrap( -1 );
fgSizer41->Add( m_ThermalWidthUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_PadLayerPateCu = new wxCheckBox( this, wxID_ANY, _("Solder paste Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticText52 = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Thermal relief gap:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText52->Wrap( -1 );
fgSizer41->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_PadLayerSilkCmp = new wxCheckBox( this, wxID_ANY, _("Silkscreen Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ThermalGapCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer41->Add( m_ThermalGapCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_PadLayerSilkCu = new wxCheckBox( this, wxID_ANY, _("Silkscreen Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ThermalGapUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_ThermalGapUnits->Wrap( -1 );
fgSizer41->Add( m_ThermalGapUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_PadLayerMaskCmp = new wxCheckBox( this, wxID_ANY, _("Solder mask Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
sbSizer7->Add( fgSizer41, 1, wxEXPAND, 5 );
m_PadLayerMaskCu = new wxCheckBox( this, wxID_ANY, _("Solder mask Copper"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bSizer13->Add( sbSizer7, 1, wxEXPAND|wxALL, 5 );
m_PadLayerDraft = new wxCheckBox( this, wxID_ANY, _("Draft layer"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticTextWarning = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Set fields to 0 to use parent or global values"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextWarning->Wrap( -1 );
m_staticTextWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
m_PadLayerECO1 = new wxCheckBox( this, wxID_ANY, _("E.C.O.1 layer"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bSizer13->Add( m_staticTextWarning, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
m_PadLayerECO2 = new wxCheckBox( this, wxID_ANY, _("E.C.O.2 layer"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerECO2, 0, wxALL, 5 );
bSizer14->Add( bSizer13, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_LayersSizer->Add( sbSizerTechlayers, 1, wxALL|wxEXPAND, 5 );
m_RightBoxSizer->Add( m_LayersSizer, 0, wxALL, 5 );
bSizer14->Add( 0, 0, 1, wxEXPAND, 5 );
bGeneralSizer->Add( m_RightBoxSizer, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
m_localSettingsPanel->SetSizer( bSizer14 );
m_localSettingsPanel->Layout();
bSizer14->Fit( m_localSettingsPanel );
m_notebook1->AddPage( m_localSettingsPanel, _("Local Settings"), false );
m_MainSizer->Add( bGeneralSizer, 1, wxEXPAND, 5 );
m_MainSizer->Add( m_notebook1, 1, wxALL|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
......@@ -460,7 +524,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
m_MainSizer->Add( m_sdbSizer1, 0, wxTOP|wxBOTTOM|wxEXPAND, 5 );
m_MainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( m_MainSizer );
this->Layout();
......@@ -470,23 +534,20 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
// Connect Events
m_PadNumCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadNetNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadDrill_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadDrill_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
m_PadShape->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
m_ShapeSize_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeSize_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadOrient->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
m_PadOrientCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeOffset_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeOffset_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeDelta_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_radioBtnDeltaXdir->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_radioBtnDeltaYdir->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadShape->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
m_DrillShapeCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
m_PadOrient->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
m_PadOrientCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadType->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
m_rbCopperLayersSel->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_trapDeltaDirChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_DrillShapeCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
m_PadDrill_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadDrill_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_rbCopperLayersSel->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerAdhCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerAdhCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerPateCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
......@@ -498,6 +559,8 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_PadLayerDraft->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
}
......@@ -507,23 +570,20 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE()
// Disconnect Events
m_PadNumCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadNetNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadDrill_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadDrill_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
m_PadShape->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
m_ShapeSize_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeSize_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadOrient->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
m_PadOrientCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeOffset_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeOffset_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_ShapeDelta_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_radioBtnDeltaXdir->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_radioBtnDeltaYdir->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadShape->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
m_DrillShapeCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
m_PadOrient->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
m_PadOrientCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadType->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
m_rbCopperLayersSel->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_trapDeltaDirChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_DrillShapeCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
m_PadDrill_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_PadDrill_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_rbCopperLayersSel->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerAdhCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerAdhCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerPateCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
......@@ -535,6 +595,8 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE()
m_PadLayerDraft->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -18,14 +18,15 @@
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/statline.h>
#include <wx/radiobut.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/panel.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/panel.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/notebook.h>
#include <wx/button.h>
#include <wx/dialog.h>
......@@ -44,82 +45,84 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxID_DIALOG_EDIT_PAD = 1000,
wxID_PADNUMCTRL,
wxID_PADNETNAMECTRL,
wxID_DDIRX,
wxID_DDIRY,
ID_LISTBOX_SHAPE_PAD,
ID_RADIOBOX_DRILL_SHAPE,
ID_LISTBOX_ORIENT_PAD,
ID_LISTBOX_TYPE_PAD,
};
wxNotebook* m_notebook1;
wxPanel* m_panel2;
wxStaticText* m_PadNumText;
wxTextCtrl* m_PadNumCtrl;
wxStaticText* m_PadNameText;
wxTextCtrl* m_PadNetNameCtrl;
wxStaticText* m_staticText44;
wxChoice* m_PadType;
wxStaticText* m_staticText45;
wxChoice* m_PadShape;
wxStaticText* m_staticText46;
wxStaticText* m_staticText4;
wxTextCtrl* m_PadPosition_X_Ctrl;
wxStaticText* m_PadPosX_Unit;
wxStaticText* m_staticText41;
wxTextCtrl* m_PadPosition_Y_Ctrl;
wxStaticText* m_PadPosY_Unit;
wxStaticLine* m_staticline7;
wxStaticLine* m_staticline8;
wxStaticLine* m_staticline9;
wxStaticText* m_textPadDrillX;
wxTextCtrl* m_PadDrill_X_Ctrl;
wxStaticText* m_PadDrill_X_Unit;
wxStaticText* m_textPadDrillY;
wxTextCtrl* m_PadDrill_Y_Ctrl;
wxStaticText* m_PadDrill_Y_Unit;
wxStaticLine* m_staticline4;
wxStaticLine* m_staticline5;
wxStaticLine* m_staticline6;
wxStaticText* m_staticText12;
wxTextCtrl* m_ShapeSize_X_Ctrl;
wxStaticText* m_PadShapeSizeX_Unit;
wxStaticText* m_staticText15;
wxTextCtrl* m_ShapeSize_Y_Ctrl;
wxStaticText* m_PadShapeSizeY_Unit;
wxStaticText* m_staticText48;
wxChoice* m_PadOrient;
wxStaticText* m_staticText491;
wxStaticText* m_PadOrientText;
wxTextCtrl* m_PadOrientCtrl;
wxStaticText* m_customOrientUnits;
wxStaticText* m_staticText17;
wxTextCtrl* m_ShapeOffset_X_Ctrl;
wxStaticText* m_PadShapeOffsetX_Unit;
wxStaticText* m_staticText19;
wxTextCtrl* m_ShapeOffset_Y_Ctrl;
wxStaticText* m_PadShapeOffsetY_Unit;
wxStaticText* m_staticText38;
wxTextCtrl* m_LengthDieCtrl;
wxStaticText* m_PadLengthDie_Unit;
wxStaticText* m_staticText21;
wxTextCtrl* m_ShapeDelta_Ctrl;
wxStaticText* m_PadShapeDelta_Unit;
wxStaticText* m_staticText23;
wxRadioButton* m_radioBtnDeltaXdir;
wxRadioButton* m_radioBtnDeltaYdir;
wxStaticText* m_staticTextDDirInfo;
wxStaticLine* m_staticline10;
wxStaticLine* m_staticline101;
wxStaticLine* m_staticline1011;
wxStaticText* m_staticText38;
wxTextCtrl* m_LengthDieCtrl;
wxStaticText* m_PadLengthDie_Unit;
wxChoice* m_trapDeltaDirChoice;
wxBoxSizer* m_DrillShapeBoxSizer;
wxRadioBox* m_PadShape;
wxRadioBox* m_DrillShapeCtrl;
wxRadioBox* m_PadOrient;
wxStaticText* m_PadOrientText;
wxTextCtrl* m_PadOrientCtrl;
wxPanel* m_panelShowPad;
wxStaticText* m_staticTitleModuleRot;
wxStaticText* m_staticModuleRotValue;
wxStaticText* m_staticTitleModuleSide;
wxStaticText* m_staticModuleSideValue;
wxStaticText* m_staticTextWarningPadFlipped;
wxStaticText* m_staticText40;
wxChoice* m_ZoneConnectionChoice;
wxStaticText* m_staticTextWarning;
wxStaticText* m_staticText47;
wxChoice* m_DrillShapeCtrl;
wxStaticText* m_staticText51;
wxStaticText* m_textPadDrillX;
wxTextCtrl* m_PadDrill_X_Ctrl;
wxStaticText* m_PadDrill_X_Unit;
wxStaticText* m_textPadDrillY;
wxTextCtrl* m_PadDrill_Y_Ctrl;
wxStaticText* m_PadDrill_Y_Unit;
wxStaticText* m_staticText511;
wxChoice* m_rbCopperLayersSel;
wxCheckBox* m_PadLayerAdhCmp;
wxCheckBox* m_PadLayerAdhCu;
wxCheckBox* m_PadLayerPateCmp;
wxCheckBox* m_PadLayerPateCu;
wxCheckBox* m_PadLayerSilkCmp;
wxCheckBox* m_PadLayerSilkCu;
wxCheckBox* m_PadLayerMaskCmp;
wxCheckBox* m_PadLayerMaskCu;
wxCheckBox* m_PadLayerDraft;
wxCheckBox* m_PadLayerECO1;
wxCheckBox* m_PadLayerECO2;
wxPanel* m_panelShowPad;
wxPanel* m_localSettingsPanel;
wxStaticText* m_staticTextNetClearance;
wxTextCtrl* m_NetClearanceValueCtrl;
wxStaticText* m_NetClearanceUnits;
wxStaticLine* m_staticline1;
wxStaticLine* m_staticline2;
wxStaticLine* m_staticline3;
wxStaticText* m_MaskClearanceTitle;
wxTextCtrl* m_SolderMaskMarginCtrl;
wxStaticText* m_SolderMaskMarginUnits;
......@@ -129,38 +132,35 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxStaticText* m_staticTextRatio;
wxTextCtrl* m_SolderPasteMarginRatioCtrl;
wxStaticText* m_SolderPasteRatioMarginUnits;
wxRadioBox* m_PadType;
wxRadioBox* m_rbCopperLayersSel;
wxCheckBox* m_PadLayerAdhCmp;
wxCheckBox* m_PadLayerAdhCu;
wxCheckBox* m_PadLayerPateCmp;
wxCheckBox* m_PadLayerPateCu;
wxCheckBox* m_PadLayerSilkCmp;
wxCheckBox* m_PadLayerSilkCu;
wxCheckBox* m_PadLayerMaskCmp;
wxCheckBox* m_PadLayerMaskCu;
wxCheckBox* m_PadLayerDraft;
wxCheckBox* m_PadLayerECO1;
wxCheckBox* m_PadLayerECO2;
wxStaticText* m_staticText40;
wxChoice* m_ZoneConnectionChoice;
wxStaticText* m_staticText43;
wxStaticText* m_staticText49;
wxTextCtrl* m_ThermalWidthCtrl;
wxStaticText* m_ThermalWidthUnits;
wxStaticText* m_staticText52;
wxTextCtrl* m_ThermalGapCtrl;
wxStaticText* m_ThermalGapUnits;
wxStaticText* m_staticTextWarning;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnValuesChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPadShapeSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDrillShapeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void PadOrientEvent( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSetLayers( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDrillShapeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); }
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( 900,800 ), 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( 1000,750 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER );
~DIALOG_PAD_PROPERTIES_BASE();
};
......
......@@ -722,6 +722,12 @@ bool D_PAD::Save( FILE* aFile ) const
if( m_ZoneConnection != UNDEFINED_CONNECTION )
fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection );
if( m_ThermalWidth != 0 )
fprintf( aFile, ".ThermalWidth %d\n", m_ThermalWidth );
if( m_ThermalGap != 0 )
fprintf( aFile, ".ThermalGap %d\n", m_ThermalGap );
if( fprintf( aFile, "$EndPAD\n" ) != sizeof("$EndPAD\n") - 1 )
return false;
......@@ -785,6 +791,12 @@ bool MODULE::Save( FILE* aFile ) const
if( m_ZoneConnection != UNDEFINED_CONNECTION )
fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection );
if( m_ThermalWidth != 0 )
fprintf( aFile, ".ThermalWidth %d\n", m_ThermalWidth );
if( m_ThermalGap != 0 )
fprintf( aFile, ".ThermalGap %d\n", m_ThermalGap );
// attributes
if( m_Attributs != MOD_DEFAULT )
{
......@@ -1034,6 +1046,10 @@ int D_PAD::ReadDescr( LINE_READER* aReader )
SetLocalClearance( atoi( Line + 16 ) );
else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 )
m_ZoneConnection = (ZoneConnection)atoi( Line + 16 );
else if( strnicmp( Line, ".ThermalWidth ", 14 ) == 0 )
m_ThermalWidth = atoi( Line + 14 );
else if( strnicmp( Line, ".ThermalGap ", 12 ) == 0 )
m_ThermalGap = atoi( Line + 12 );
break;
default:
......@@ -1281,7 +1297,10 @@ int MODULE::ReadDescr( LINE_READER* aReader )
SetLocalClearance( atoi( Line + 16 ) );
else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 )
m_ZoneConnection = (ZoneConnection)atoi( Line + 16 );
else if( strnicmp( Line, ".ThermalWidth ", 14 ) == 0 )
m_ThermalWidth = atoi( Line + 14 );
else if( strnicmp( Line, ".ThermalGap ", 12 ) == 0 )
m_ThermalGap = atoi( Line + 12 );
break;
default:
......
......@@ -1024,6 +1024,18 @@ void KICAD_PLUGIN::loadMODULE()
module->SetZoneConnection( (ZoneConnection)tmp );
}
else if( TESTLINE( ".ThermalWidth" ) )
{
BIU tmp = biuParse( line + SZ( ".ThermalWidth" ) );
module->SetThermalWidth( tmp );
}
else if( TESTLINE( ".ThermalGap" ) )
{
BIU tmp = biuParse( line + SZ( ".ThermalGap" ) );
module->SetThermalGap( tmp );
}
else if( TESTLINE( "$EndMODULE" ) )
{
module->CalculateBoundingBox();
......@@ -1232,6 +1244,18 @@ void KICAD_PLUGIN::loadPAD( MODULE* aModule )
pad->SetZoneConnection( (ZoneConnection)tmp );
}
else if( TESTLINE( ".ThermalWidth" ) )
{
BIU tmp = biuParse( line + SZ( ".ThermalWidth" ) );
pad->SetThermalWidth( tmp );
}
else if( TESTLINE( ".ThermalGap" ) )
{
BIU tmp = biuParse( line + SZ( ".ThermalGap" ) );
pad->SetThermalGap( tmp );
}
else if( TESTLINE( "$EndPAD" ) )
{
wxPoint padpos = pad->GetPosition();
......@@ -3192,6 +3216,12 @@ void KICAD_PLUGIN::savePAD( const D_PAD* me ) const
if( me->GetZoneConnection() != UNDEFINED_CONNECTION )
fprintf( m_fp, ".ZoneConnection %d\n", me->GetZoneConnection() );
if( me->GetThermalWidth() != 0 )
fprintf( m_fp, ".ThermalWidth %d\n", me->GetThermalWidth() );
if( me->GetThermalGap() != 0 )
fprintf( m_fp, ".ThermalGap %d\n", me->GetThermalGap() );
fprintf( m_fp, "$EndPAD\n" );
CHECK_WRITE_ERROR();
......@@ -3248,6 +3278,12 @@ void KICAD_PLUGIN::saveMODULE( const MODULE* me ) const
if( me->GetZoneConnection() != UNDEFINED_CONNECTION )
fprintf( m_fp, ".ZoneConnection %d\n", me->GetZoneConnection() );
if( me->GetThermalWidth() != 0 )
fprintf( m_fp, ".ThermalWidth %d\n", me->GetThermalWidth() );
if( me->GetThermalGap() != 0 )
fprintf( m_fp, ".ThermalGap %d\n", me->GetThermalGap() );
// attributes
if( me->GetAttributes() != MOD_DEFAULT )
{
......
......@@ -371,13 +371,14 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
if( pad->GetNet() != GetNet() )
continue;
item_boundingbox = pad->GetBoundingBox();
item_boundingbox.Inflate( m_ThermalReliefGap, m_ThermalReliefGap );
int thermalGap = GetThermalReliefGap( pad );
item_boundingbox.Inflate( thermalGap, thermalGap );
if( item_boundingbox.Intersects( zone_boundingbox ) )
{
CreateThermalReliefPadPolygon( cornerBufferPolysToSubstract,
*pad, m_ThermalReliefGap,
m_ThermalReliefCopperBridge,
*pad, thermalGap,
GetThermalReliefCopperBridge( pad ),
m_ZoneMinThickness,
s_CircleToSegmentsCount,
s_Correction, s_thermalRot );
......
......@@ -75,7 +75,7 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& aCornerBuffe
endpoint.x = ( pad->GetSize().x / 2 ) + aZone->m_ThermalReliefGap;
endpoint.y = ( pad->GetSize().y / 2 ) + aZone->m_ThermalReliefGap;
int copperThickness = aZone->m_ThermalReliefCopperBridge - aZone->m_ZoneMinThickness;
int copperThickness = aZone->GetThermalReliefCopperBridge( pad ) - aZone->m_ZoneMinThickness;
if( copperThickness < 0 )
copperThickness = 0;
......
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