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 ) : ...@@ -69,6 +69,8 @@ MODULE::MODULE( BOARD* parent ) :
m_LocalSolderPasteMargin = 0; m_LocalSolderPasteMargin = 0;
m_LocalSolderPasteMarginRatio = 0.0; m_LocalSolderPasteMarginRatio = 0.0;
m_ZoneConnection = UNDEFINED_CONNECTION; // Use zone setting by default 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 ); m_Reference = new TEXTE_MODULE( this, TEXT_is_REFERENCE );
...@@ -103,6 +105,8 @@ MODULE::MODULE( const MODULE& aModule ) : ...@@ -103,6 +105,8 @@ MODULE::MODULE( const MODULE& aModule ) :
m_LocalSolderPasteMargin = aModule.m_LocalSolderPasteMargin; m_LocalSolderPasteMargin = aModule.m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = aModule.m_LocalSolderPasteMarginRatio; m_LocalSolderPasteMarginRatio = aModule.m_LocalSolderPasteMarginRatio;
m_ZoneConnection = aModule.m_ZoneConnection; m_ZoneConnection = aModule.m_ZoneConnection;
m_ThermalWidth = aModule.m_ThermalWidth;
m_ThermalGap = aModule.m_ThermalGap;
// Copy reference and value. // Copy reference and value.
m_Reference = new TEXTE_MODULE( *aModule.m_Reference ); m_Reference = new TEXTE_MODULE( *aModule.m_Reference );
...@@ -219,6 +223,8 @@ void MODULE::Copy( MODULE* aModule ) ...@@ -219,6 +223,8 @@ void MODULE::Copy( MODULE* aModule )
m_LocalSolderPasteMargin = aModule->m_LocalSolderPasteMargin; m_LocalSolderPasteMargin = aModule->m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = aModule->m_LocalSolderPasteMarginRatio; m_LocalSolderPasteMarginRatio = aModule->m_LocalSolderPasteMarginRatio;
m_ZoneConnection = aModule->m_ZoneConnection; m_ZoneConnection = aModule->m_ZoneConnection;
m_ThermalWidth = aModule->m_ThermalWidth;
m_ThermalGap = aModule->m_ThermalGap;
// Copy reference and value. // Copy reference and value.
m_Reference->Copy( aModule->m_Reference ); m_Reference->Copy( aModule->m_Reference );
......
...@@ -122,6 +122,7 @@ public: ...@@ -122,6 +122,7 @@ public:
// The final margin is the sum of these 2 values // The final margin is the sum of these 2 values
ZoneConnection m_ZoneConnection; ZoneConnection m_ZoneConnection;
int m_ThermalWidth, m_ThermalGap;
public: public:
MODULE( BOARD* parent ); MODULE( BOARD* parent );
...@@ -198,6 +199,12 @@ public: ...@@ -198,6 +199,12 @@ public:
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; } void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
ZoneConnection GetZoneConnection() const { return m_ZoneConnection; } 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; } int GetAttributes() const { return m_Attributs; }
void SetAttributes( int aAttributes ) { m_Attributs = aAttributes; } void SetAttributes( int aAttributes ) { m_Attributs = aAttributes; }
......
...@@ -71,6 +71,8 @@ D_PAD::D_PAD( MODULE* parent ) : ...@@ -71,6 +71,8 @@ D_PAD::D_PAD( MODULE* parent ) :
m_LocalSolderPasteMargin = 0; m_LocalSolderPasteMargin = 0;
m_LocalSolderPasteMarginRatio = 0.0; m_LocalSolderPasteMarginRatio = 0.0;
m_ZoneConnection = UNDEFINED_CONNECTION; // Use parent setting by default 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 // set layers mask to default for a standard pad
m_layerMask = PAD_STANDARD_DEFAULT_LAYERS; m_layerMask = PAD_STANDARD_DEFAULT_LAYERS;
...@@ -305,6 +307,8 @@ void D_PAD::Copy( D_PAD* source ) ...@@ -305,6 +307,8 @@ void D_PAD::Copy( D_PAD* source )
m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin; m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin;
m_LocalSolderPasteMarginRatio = source->m_LocalSolderPasteMarginRatio; m_LocalSolderPasteMarginRatio = source->m_LocalSolderPasteMarginRatio;
m_ZoneConnection = source->m_ZoneConnection; m_ZoneConnection = source->m_ZoneConnection;
m_ThermalWidth = source->m_ThermalWidth;
m_ThermalGap = source->m_ThermalGap;
SetSubRatsnest( 0 ); SetSubRatsnest( 0 );
SetSubNet( 0 ); SetSubNet( 0 );
...@@ -453,6 +457,28 @@ ZoneConnection D_PAD::GetZoneConnection() const ...@@ -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 ) void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame )
{ {
MODULE* module; MODULE* module;
......
...@@ -269,6 +269,12 @@ public: ...@@ -269,6 +269,12 @@ public:
void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; } void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; }
ZoneConnection GetZoneConnection() const; 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 */ /* Reading and writing data on files */
int ReadDescr( LINE_READER* aReader ); int ReadDescr( LINE_READER* aReader );
...@@ -534,6 +540,7 @@ private: ...@@ -534,6 +540,7 @@ private:
double m_LocalSolderPasteMarginRatio; ///< Local solder mask margin ratio value of pad size double m_LocalSolderPasteMarginRatio; ///< Local solder mask margin ratio value of pad size
///< The final margin is the sum of these 2 values ///< The final margin is the sum of these 2 values
ZoneConnection m_ZoneConnection; ZoneConnection m_ZoneConnection;
int m_ThermalWidth, m_ThermalGap;
}; };
#endif // PAD_H_ #endif // PAD_H_
...@@ -450,6 +450,24 @@ void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, in ...@@ -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 ) bool ZONE_CONTAINER::HitTest( const wxPoint& refPos )
{ {
if( HitTestForCorner( refPos ) ) if( HitTestForCorner( refPos ) )
...@@ -888,7 +906,6 @@ ZoneConnection ZONE_CONTAINER::GetPadConnection( D_PAD* aPad ) const ...@@ -888,7 +906,6 @@ ZoneConnection ZONE_CONTAINER::GetPadConnection( D_PAD* aPad ) const
return m_PadConnection; return m_PadConnection;
else else
return aPad->GetZoneConnection(); return aPad->GetZoneConnection();
} }
......
...@@ -274,13 +274,13 @@ public: ...@@ -274,13 +274,13 @@ public:
int GetFillMode() const { return m_FillMode; } int GetFillMode() const { return m_FillMode; }
void SetThermalReliefGap( int aThermalReliefGap ) { m_ThermalReliefGap = aThermalReliefGap; } void SetThermalReliefGap( int aThermalReliefGap ) { m_ThermalReliefGap = aThermalReliefGap; }
int GetThermalReliefGap() const { return m_ThermalReliefGap; } int GetThermalReliefGap( D_PAD* aPad = NULL ) const;
void SetThermalReliefCopperBridge( int aThermalReliefCopperBridge ) void SetThermalReliefCopperBridge( int aThermalReliefCopperBridge )
{ {
m_ThermalReliefCopperBridge = aThermalReliefCopperBridge; m_ThermalReliefCopperBridge = aThermalReliefCopperBridge;
} }
int GetThermalReliefCopperBridge() const { return m_ThermalReliefCopperBridge; } int GetThermalReliefCopperBridge( D_PAD* aPad = NULL ) const;
void SetArcSegCount( int aArcSegCount ) { m_ArcToSegmentsCount = aArcSegCount; } void SetArcSegCount( int aArcSegCount ) { m_ArcToSegmentsCount = aArcSegCount; }
int GetArcSegCount() const { return m_ArcToSegmentsCount; } int GetArcSegCount() const { return m_ArcToSegmentsCount; }
......
...@@ -80,6 +80,9 @@ private: ...@@ -80,6 +80,9 @@ private:
bool m_canUpdate; bool m_canUpdate;
static wxPoint prevPosition;
static wxSize prevSize;
void initValues(); void initValues();
void OnPadShapeSelection( wxCommandEvent& event ); void OnPadShapeSelection( wxCommandEvent& event );
void OnDrillShapeSelected( wxCommandEvent& event ); void OnDrillShapeSelected( wxCommandEvent& event );
...@@ -95,6 +98,10 @@ private: ...@@ -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::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) :
DIALOG_PAD_PROPERTIES_BASE( aParent ), DIALOG_PAD_PROPERTIES_BASE( aParent ),
m_Pad_Master( aParent->GetBoard()->GetDesignSettings().m_Pad_Master ) 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 ...@@ -114,7 +121,14 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
m_sdbSizer1OK->SetDefault(); m_sdbSizer1OK->SetDefault();
GetSizer()->SetSizeHints( this ); 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; m_canUpdate = true;
} }
...@@ -241,12 +255,13 @@ void DIALOG_PAD_PROPERTIES::initValues() ...@@ -241,12 +255,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_PadShapeDelta_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_PadShapeDelta_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_PadLengthDie_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_PadLengthDie_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
// Display current pad masks clearances units // Display current pad masks clearances units
m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_SolderMaskMarginUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_SolderMaskMarginUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_SolderPasteMarginUnits->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: // Display current pad parameters units:
PutValueInLocalUnits( *m_PadPosition_X_Ctrl, m_dummyPad->GetPosition().x, internalUnits ); PutValueInLocalUnits( *m_PadPosition_X_Ctrl, m_dummyPad->GetPosition().x, internalUnits );
...@@ -264,12 +279,12 @@ void DIALOG_PAD_PROPERTIES::initValues() ...@@ -264,12 +279,12 @@ void DIALOG_PAD_PROPERTIES::initValues()
if( m_dummyPad->GetDelta().x ) if( m_dummyPad->GetDelta().x )
{ {
PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().x, internalUnits ); PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().x, internalUnits );
m_radioBtnDeltaXdir->SetValue(true); m_trapDeltaDirChoice->SetSelection( 0 );
} }
else else
{ {
PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().y, internalUnits ); PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().y, internalUnits );
m_radioBtnDeltaYdir->SetValue(true); m_trapDeltaDirChoice->SetSelection( 1 );
} }
PutValueInLocalUnits( *m_LengthDieCtrl, m_dummyPad->GetDieLength(), internalUnits ); PutValueInLocalUnits( *m_LengthDieCtrl, m_dummyPad->GetDieLength(), internalUnits );
...@@ -278,6 +293,8 @@ void DIALOG_PAD_PROPERTIES::initValues() ...@@ -278,6 +293,8 @@ void DIALOG_PAD_PROPERTIES::initValues()
PutValueInLocalUnits( *m_SolderMaskMarginCtrl, PutValueInLocalUnits( *m_SolderMaskMarginCtrl,
m_dummyPad->GetLocalSolderMaskMargin(), m_dummyPad->GetLocalSolderMaskMargin(),
internalUnits ); 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 // These 2 parameters are usually < 0, so prepare entering a negative value, if current is 0
PutValueInLocalUnits( *m_SolderPasteMarginCtrl, PutValueInLocalUnits( *m_SolderPasteMarginCtrl,
...@@ -345,7 +362,7 @@ void DIALOG_PAD_PROPERTIES::initValues() ...@@ -345,7 +362,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
m_PadOrient->SetSelection( 1 ); m_PadOrient->SetSelection( 1 );
break; break;
case - 900: case -900:
m_PadOrient->SetSelection( 2 ); m_PadOrient->SetSelection( 2 );
break; break;
...@@ -437,30 +454,34 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) ...@@ -437,30 +454,34 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
{ {
case 0: //CIRCLE: case 0: //CIRCLE:
m_ShapeDelta_Ctrl->Enable( false ); m_ShapeDelta_Ctrl->Enable( false );
m_radioBtnDeltaXdir->Enable( false ); m_trapDeltaDirChoice->Enable( false );
m_radioBtnDeltaYdir->Enable( false );
m_ShapeSize_Y_Ctrl->Enable( false ); m_ShapeSize_Y_Ctrl->Enable( false );
m_ShapeOffset_X_Ctrl->Enable( false );
m_ShapeOffset_Y_Ctrl->Enable( false );
break; break;
case 1: //OVALE: case 1: //OVALE:
m_ShapeDelta_Ctrl->Enable( false ); m_ShapeDelta_Ctrl->Enable( false );
m_radioBtnDeltaXdir->Enable( false ); m_trapDeltaDirChoice->Enable( false );
m_radioBtnDeltaYdir->Enable( false );
m_ShapeSize_Y_Ctrl->Enable( true ); m_ShapeSize_Y_Ctrl->Enable( true );
m_ShapeOffset_X_Ctrl->Enable( true );
m_ShapeOffset_Y_Ctrl->Enable( true );
break; break;
case 2: // PAD_RECT: case 2: // PAD_RECT:
m_ShapeDelta_Ctrl->Enable( false ); m_ShapeDelta_Ctrl->Enable( false );
m_radioBtnDeltaXdir->Enable( false ); m_trapDeltaDirChoice->Enable( false );
m_radioBtnDeltaYdir->Enable( false );
m_ShapeSize_Y_Ctrl->Enable( true ); m_ShapeSize_Y_Ctrl->Enable( true );
m_ShapeOffset_X_Ctrl->Enable( true );
m_ShapeOffset_Y_Ctrl->Enable( true );
break; break;
case 3: //TRAPEZE: case 3: //TRAPEZE:
m_ShapeDelta_Ctrl->Enable( true ); m_ShapeDelta_Ctrl->Enable( true );
m_radioBtnDeltaXdir->Enable( true ); m_trapDeltaDirChoice->Enable( true );
m_radioBtnDeltaYdir->Enable( true );
m_ShapeSize_Y_Ctrl->Enable( true ); m_ShapeSize_Y_Ctrl->Enable( true );
m_ShapeOffset_X_Ctrl->Enable( true );
m_ShapeOffset_Y_Ctrl->Enable( true );
break; break;
} }
...@@ -532,9 +553,6 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event ) ...@@ -532,9 +553,6 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
/* Adjust the better mask layer according to the selected pad type
*/
{ {
long layer_mask; long layer_mask;
int ii; int ii;
...@@ -549,6 +567,10 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) ...@@ -549,6 +567,10 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
// Enable/disable drill dialog items: // Enable/disable drill dialog items:
event.SetId( m_DrillShapeCtrl->GetSelection() ); event.SetId( m_DrillShapeCtrl->GetSelection() );
OnDrillShapeSelected( event ); 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 // Enable/disable Pad name,and pad length die
// (disable for NPTH pads (mechanical pads) // (disable for NPTH pads (mechanical pads)
...@@ -610,6 +632,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) ...@@ -610,6 +632,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
bool rastnestIsChanged = false; bool rastnestIsChanged = false;
int isign = m_isFlipped ? -1 : 1; int isign = m_isFlipped ? -1 : 1;
prevPosition = GetPosition();
prevSize = GetSize();
bool success = TransfertDataToPad( m_dummyPad, true ); bool success = TransfertDataToPad( m_dummyPad, true );
if( !success ) // An error on parameters has occured if( !success ) // An error on parameters has occured
return; return;
...@@ -649,7 +674,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) ...@@ -649,7 +674,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_CurrentPad->SetOrientation( m_Pad_Master.GetOrientation() * isign + module->GetOrientation() ); 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 = m_Pad_Master.GetDelta();
size.y *= isign; size.y *= isign;
...@@ -702,6 +727,8 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) ...@@ -702,6 +727,8 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_CurrentPad->SetLocalSolderPasteMargin( m_Pad_Master.GetLocalSolderPasteMargin() ); m_CurrentPad->SetLocalSolderPasteMargin( m_Pad_Master.GetLocalSolderPasteMargin() );
m_CurrentPad->SetLocalSolderPasteMarginRatio( m_Pad_Master.GetLocalSolderPasteMarginRatio() ); m_CurrentPad->SetLocalSolderPasteMarginRatio( m_Pad_Master.GetLocalSolderPasteMarginRatio() );
m_CurrentPad->SetZoneConnection( m_Pad_Master.GetZoneConnection() ); m_CurrentPad->SetZoneConnection( m_Pad_Master.GetZoneConnection() );
m_CurrentPad->SetThermalWidth( m_Pad_Master.GetThermalWidth() );
m_CurrentPad->SetThermalGap( m_Pad_Master.GetThermalGap() );
module->CalculateBoundingBox(); module->CalculateBoundingBox();
m_CurrentPad->DisplayInfo( m_Parent ); m_CurrentPad->DisplayInfo( m_Parent );
...@@ -737,6 +764,10 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError ...@@ -737,6 +764,10 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
internalUnits ) ); internalUnits ) );
aPad->SetLocalSolderPasteMargin( ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl, aPad->SetLocalSolderPasteMargin( ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl,
internalUnits ) ); internalUnits ) );
aPad->SetThermalWidth( ReturnValueFromTextCtrl( *m_ThermalWidthCtrl,
internalUnits ) );
aPad->SetThermalGap( ReturnValueFromTextCtrl( *m_ThermalGapCtrl,
internalUnits ) );
double dtmp = 0.0; double dtmp = 0.0;
msg = m_SolderPasteMarginRatioCtrl->GetValue(); msg = m_SolderPasteMarginRatioCtrl->GetValue();
msg.ToDouble( &dtmp ); msg.ToDouble( &dtmp );
...@@ -805,7 +836,7 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError ...@@ -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. // m_DeltaSize.x or m_DeltaSize.y must be NULL. for a trapezoid.
wxSize delta; wxSize delta;
if( m_radioBtnDeltaXdir->GetValue() ) if( m_trapDeltaDirChoice->GetSelection() == 0 )
delta.x = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits ); delta.x = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits );
else else
delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits ); delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits );
...@@ -1005,9 +1036,9 @@ void DIALOG_PAD_PROPERTIES::OnValuesChanged( wxCommandEvent& event ) ...@@ -1005,9 +1036,9 @@ void DIALOG_PAD_PROPERTIES::OnValuesChanged( wxCommandEvent& event )
} }
/*********************************************************************/
void DIALOG_PAD_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event ) void DIALOG_PAD_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event )
/*********************************************************************/
{ {
prevPosition = GetPosition();
prevSize = GetSize();
EndModal( wxID_CANCEL ); EndModal( wxID_CANCEL );
} }
...@@ -18,14 +18,15 @@ ...@@ -18,14 +18,15 @@
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/statline.h> #include <wx/choice.h>
#include <wx/radiobut.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/panel.h>
#include <wx/choice.h>
#include <wx/checkbox.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/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
...@@ -44,82 +45,84 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog ...@@ -44,82 +45,84 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxID_DIALOG_EDIT_PAD = 1000, wxID_DIALOG_EDIT_PAD = 1000,
wxID_PADNUMCTRL, wxID_PADNUMCTRL,
wxID_PADNETNAMECTRL, 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; wxStaticText* m_PadNumText;
wxTextCtrl* m_PadNumCtrl; wxTextCtrl* m_PadNumCtrl;
wxStaticText* m_PadNameText; wxStaticText* m_PadNameText;
wxTextCtrl* m_PadNetNameCtrl; wxTextCtrl* m_PadNetNameCtrl;
wxStaticText* m_staticText44;
wxChoice* m_PadType;
wxStaticText* m_staticText45;
wxChoice* m_PadShape;
wxStaticText* m_staticText46;
wxStaticText* m_staticText4; wxStaticText* m_staticText4;
wxTextCtrl* m_PadPosition_X_Ctrl; wxTextCtrl* m_PadPosition_X_Ctrl;
wxStaticText* m_PadPosX_Unit; wxStaticText* m_PadPosX_Unit;
wxStaticText* m_staticText41; wxStaticText* m_staticText41;
wxTextCtrl* m_PadPosition_Y_Ctrl; wxTextCtrl* m_PadPosition_Y_Ctrl;
wxStaticText* m_PadPosY_Unit; 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; wxStaticText* m_staticText12;
wxTextCtrl* m_ShapeSize_X_Ctrl; wxTextCtrl* m_ShapeSize_X_Ctrl;
wxStaticText* m_PadShapeSizeX_Unit; wxStaticText* m_PadShapeSizeX_Unit;
wxStaticText* m_staticText15; wxStaticText* m_staticText15;
wxTextCtrl* m_ShapeSize_Y_Ctrl; wxTextCtrl* m_ShapeSize_Y_Ctrl;
wxStaticText* m_PadShapeSizeY_Unit; 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; wxStaticText* m_staticText17;
wxTextCtrl* m_ShapeOffset_X_Ctrl; wxTextCtrl* m_ShapeOffset_X_Ctrl;
wxStaticText* m_PadShapeOffsetX_Unit; wxStaticText* m_PadShapeOffsetX_Unit;
wxStaticText* m_staticText19; wxStaticText* m_staticText19;
wxTextCtrl* m_ShapeOffset_Y_Ctrl; wxTextCtrl* m_ShapeOffset_Y_Ctrl;
wxStaticText* m_PadShapeOffsetY_Unit; wxStaticText* m_PadShapeOffsetY_Unit;
wxStaticText* m_staticText38;
wxTextCtrl* m_LengthDieCtrl;
wxStaticText* m_PadLengthDie_Unit;
wxStaticText* m_staticText21; wxStaticText* m_staticText21;
wxTextCtrl* m_ShapeDelta_Ctrl; wxTextCtrl* m_ShapeDelta_Ctrl;
wxStaticText* m_PadShapeDelta_Unit; wxStaticText* m_PadShapeDelta_Unit;
wxStaticText* m_staticText23; wxStaticText* m_staticText23;
wxRadioButton* m_radioBtnDeltaXdir; wxChoice* m_trapDeltaDirChoice;
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;
wxBoxSizer* m_DrillShapeBoxSizer; 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_staticTitleModuleRot;
wxStaticText* m_staticModuleRotValue; wxStaticText* m_staticModuleRotValue;
wxStaticText* m_staticTitleModuleSide; wxStaticText* m_staticTitleModuleSide;
wxStaticText* m_staticModuleSideValue; wxStaticText* m_staticModuleSideValue;
wxStaticText* m_staticTextWarningPadFlipped; wxStaticText* m_staticTextWarningPadFlipped;
wxStaticText* m_staticText40; wxStaticText* m_staticText47;
wxChoice* m_ZoneConnectionChoice; wxChoice* m_DrillShapeCtrl;
wxStaticText* m_staticTextWarning; 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; wxStaticText* m_staticTextNetClearance;
wxTextCtrl* m_NetClearanceValueCtrl; wxTextCtrl* m_NetClearanceValueCtrl;
wxStaticText* m_NetClearanceUnits; wxStaticText* m_NetClearanceUnits;
wxStaticLine* m_staticline1;
wxStaticLine* m_staticline2;
wxStaticLine* m_staticline3;
wxStaticText* m_MaskClearanceTitle; wxStaticText* m_MaskClearanceTitle;
wxTextCtrl* m_SolderMaskMarginCtrl; wxTextCtrl* m_SolderMaskMarginCtrl;
wxStaticText* m_SolderMaskMarginUnits; wxStaticText* m_SolderMaskMarginUnits;
...@@ -129,38 +132,35 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog ...@@ -129,38 +132,35 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxStaticText* m_staticTextRatio; wxStaticText* m_staticTextRatio;
wxTextCtrl* m_SolderPasteMarginRatioCtrl; wxTextCtrl* m_SolderPasteMarginRatioCtrl;
wxStaticText* m_SolderPasteRatioMarginUnits; wxStaticText* m_SolderPasteRatioMarginUnits;
wxRadioBox* m_PadType; wxStaticText* m_staticText40;
wxRadioBox* m_rbCopperLayersSel; wxChoice* m_ZoneConnectionChoice;
wxCheckBox* m_PadLayerAdhCmp; wxStaticText* m_staticText43;
wxCheckBox* m_PadLayerAdhCu; wxStaticText* m_staticText49;
wxCheckBox* m_PadLayerPateCmp; wxTextCtrl* m_ThermalWidthCtrl;
wxCheckBox* m_PadLayerPateCu; wxStaticText* m_ThermalWidthUnits;
wxCheckBox* m_PadLayerSilkCmp; wxStaticText* m_staticText52;
wxCheckBox* m_PadLayerSilkCu; wxTextCtrl* m_ThermalGapCtrl;
wxCheckBox* m_PadLayerMaskCmp; wxStaticText* m_ThermalGapUnits;
wxCheckBox* m_PadLayerMaskCu; wxStaticText* m_staticTextWarning;
wxCheckBox* m_PadLayerDraft;
wxCheckBox* m_PadLayerECO1;
wxCheckBox* m_PadLayerECO2;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnValuesChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnValuesChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPadShapeSelection( 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 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 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 OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); } virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); }
public: 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(); ~DIALOG_PAD_PROPERTIES_BASE();
}; };
......
...@@ -722,6 +722,12 @@ bool D_PAD::Save( FILE* aFile ) const ...@@ -722,6 +722,12 @@ bool D_PAD::Save( FILE* aFile ) const
if( m_ZoneConnection != UNDEFINED_CONNECTION ) if( m_ZoneConnection != UNDEFINED_CONNECTION )
fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection ); 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 ) if( fprintf( aFile, "$EndPAD\n" ) != sizeof("$EndPAD\n") - 1 )
return false; return false;
...@@ -785,6 +791,12 @@ bool MODULE::Save( FILE* aFile ) const ...@@ -785,6 +791,12 @@ bool MODULE::Save( FILE* aFile ) const
if( m_ZoneConnection != UNDEFINED_CONNECTION ) if( m_ZoneConnection != UNDEFINED_CONNECTION )
fprintf( aFile, ".ZoneConnection %d\n", m_ZoneConnection ); 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 // attributes
if( m_Attributs != MOD_DEFAULT ) if( m_Attributs != MOD_DEFAULT )
{ {
...@@ -1034,6 +1046,10 @@ int D_PAD::ReadDescr( LINE_READER* aReader ) ...@@ -1034,6 +1046,10 @@ int D_PAD::ReadDescr( LINE_READER* aReader )
SetLocalClearance( atoi( Line + 16 ) ); SetLocalClearance( atoi( Line + 16 ) );
else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 ) else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 )
m_ZoneConnection = (ZoneConnection)atoi( Line + 16 ); 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; break;
default: default:
...@@ -1281,7 +1297,10 @@ int MODULE::ReadDescr( LINE_READER* aReader ) ...@@ -1281,7 +1297,10 @@ int MODULE::ReadDescr( LINE_READER* aReader )
SetLocalClearance( atoi( Line + 16 ) ); SetLocalClearance( atoi( Line + 16 ) );
else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 ) else if( strnicmp( Line, ".ZoneConnection ", 16 ) == 0 )
m_ZoneConnection = (ZoneConnection)atoi( Line + 16 ); 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; break;
default: default:
......
...@@ -1024,6 +1024,18 @@ void KICAD_PLUGIN::loadMODULE() ...@@ -1024,6 +1024,18 @@ void KICAD_PLUGIN::loadMODULE()
module->SetZoneConnection( (ZoneConnection)tmp ); 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" ) ) else if( TESTLINE( "$EndMODULE" ) )
{ {
module->CalculateBoundingBox(); module->CalculateBoundingBox();
...@@ -1232,6 +1244,18 @@ void KICAD_PLUGIN::loadPAD( MODULE* aModule ) ...@@ -1232,6 +1244,18 @@ void KICAD_PLUGIN::loadPAD( MODULE* aModule )
pad->SetZoneConnection( (ZoneConnection)tmp ); 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" ) ) else if( TESTLINE( "$EndPAD" ) )
{ {
wxPoint padpos = pad->GetPosition(); wxPoint padpos = pad->GetPosition();
...@@ -3192,6 +3216,12 @@ void KICAD_PLUGIN::savePAD( const D_PAD* me ) const ...@@ -3192,6 +3216,12 @@ void KICAD_PLUGIN::savePAD( const D_PAD* me ) const
if( me->GetZoneConnection() != UNDEFINED_CONNECTION ) if( me->GetZoneConnection() != UNDEFINED_CONNECTION )
fprintf( m_fp, ".ZoneConnection %d\n", me->GetZoneConnection() ); 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" ); fprintf( m_fp, "$EndPAD\n" );
CHECK_WRITE_ERROR(); CHECK_WRITE_ERROR();
...@@ -3248,6 +3278,12 @@ void KICAD_PLUGIN::saveMODULE( const MODULE* me ) const ...@@ -3248,6 +3278,12 @@ void KICAD_PLUGIN::saveMODULE( const MODULE* me ) const
if( me->GetZoneConnection() != UNDEFINED_CONNECTION ) if( me->GetZoneConnection() != UNDEFINED_CONNECTION )
fprintf( m_fp, ".ZoneConnection %d\n", me->GetZoneConnection() ); 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 // attributes
if( me->GetAttributes() != MOD_DEFAULT ) if( me->GetAttributes() != MOD_DEFAULT )
{ {
......
...@@ -371,13 +371,14 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) ...@@ -371,13 +371,14 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
if( pad->GetNet() != GetNet() ) if( pad->GetNet() != GetNet() )
continue; continue;
item_boundingbox = pad->GetBoundingBox(); 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 ) ) if( item_boundingbox.Intersects( zone_boundingbox ) )
{ {
CreateThermalReliefPadPolygon( cornerBufferPolysToSubstract, CreateThermalReliefPadPolygon( cornerBufferPolysToSubstract,
*pad, m_ThermalReliefGap, *pad, thermalGap,
m_ThermalReliefCopperBridge, GetThermalReliefCopperBridge( pad ),
m_ZoneMinThickness, m_ZoneMinThickness,
s_CircleToSegmentsCount, s_CircleToSegmentsCount,
s_Correction, s_thermalRot ); s_Correction, s_thermalRot );
......
...@@ -75,7 +75,7 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& aCornerBuffe ...@@ -75,7 +75,7 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& aCornerBuffe
endpoint.x = ( pad->GetSize().x / 2 ) + aZone->m_ThermalReliefGap; endpoint.x = ( pad->GetSize().x / 2 ) + aZone->m_ThermalReliefGap;
endpoint.y = ( pad->GetSize().y / 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 ) if( copperThickness < 0 )
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