kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #08566
[PATCH] Thermals only for THT option
Currently zones have 3 pad attachment modes:
- Solid fill (pad fully enclosed)
- Thermals
- Unconnected (what is this for?)
I added the THT Only Thermals mode, which is solid for SMD pads and does
thermals for THT ones; rationale: in high power tracks thermals *impede*
SMD dissipation (it's their work!). THT pads needs them because they are
usually wave (or hand!) soldered, so there is a need to avoid cooling
the pad being soldered. SMD instead are (usually) baked in oven, so
there is no issue on soldering... (except for reworking, but that's
another story).
I allocated the 'H' letter in the i/o plugin. Also I'm not too satisfied
on the conditional tree but I couldn't express it more clearly
(hopefully the compiler is smart enough to reduce a boolean tree!)
--
Lorenzo Marcantonio
Logos Srl
=== modified file 'pcbnew/dialogs/dialog_copper_zones.cpp'
--- pcbnew/dialogs/dialog_copper_zones.cpp 2012-07-05 08:28:21 +0000
+++ pcbnew/dialogs/dialog_copper_zones.cpp 2012-07-05 08:37:56 +0000
@@ -200,8 +200,12 @@
switch( m_settings.GetPadConnection() )
{
+ case THT_THERMAL: // Thermals only for THT pads
+ m_PadInZoneOpt->SetSelection( 2 );
+ break;
+
case PAD_NOT_IN_ZONE: // Pads are not covered
- m_PadInZoneOpt->SetSelection( 2 );
+ m_PadInZoneOpt->SetSelection( 3 );
break;
default:
@@ -214,7 +218,9 @@
break;
}
- if( m_settings.GetPadConnection() != THERMAL_PAD )
+ // Antipad and spokes are significant only for thermals
+ if( m_settings.GetPadConnection() != THERMAL_PAD &&
+ m_settings.GetPadConnection() != THT_THERMAL )
{
m_AntipadSizeValue->Enable( false );
m_CopperWidthValue->Enable( false );
@@ -343,11 +349,16 @@
{
switch( m_PadInZoneOpt->GetSelection() )
{
- case 2:
+ case 3:
// Pads are not covered
m_settings.SetPadConnection( PAD_NOT_IN_ZONE );
break;
+ case 2:
+ // Use thermal relief for THT pads
+ m_settings.SetPadConnection( THT_THERMAL );
+ break;
+
case 1:
// Use thermal relief for pads
m_settings.SetPadConnection( THERMAL_PAD );
@@ -568,6 +579,7 @@
m_CopperWidthValue->Enable( false );
break;
+ case 2:
case 1:
m_AntipadSizeValue->Enable( true );
m_CopperWidthValue->Enable( true );
=== modified file 'pcbnew/dialogs/dialog_copper_zones_base.cpp'
--- pcbnew/dialogs/dialog_copper_zones_base.cpp 2012-06-05 05:25:39 +0000
+++ pcbnew/dialogs/dialog_copper_zones_base.cpp 2012-07-05 08:39:20 +0000
@@ -143,7 +143,7 @@
m_staticText13->Wrap( -1 );
m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
- wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") };
+ wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT Termal"), _("None") };
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
m_PadInZoneOpt->SetSelection( 0 );
=== modified file 'pcbnew/dialogs/dialog_copper_zones_base.fbp'
--- pcbnew/dialogs/dialog_copper_zones_base.fbp 2012-06-05 05:25:39 +0000
+++ pcbnew/dialogs/dialog_copper_zones_base.fbp 2012-07-05 08:31:01 +0000
@@ -1825,7 +1825,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
- <property name="choices">"Solid" "Thermal relief" "None"</property>
+ <property name="choices">"Solid" "Thermal relief" "THT Thermal" "None"</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
=== modified file 'pcbnew/kicad_plugin.cpp'
--- pcbnew/kicad_plugin.cpp 2012-07-05 08:28:21 +0000
+++ pcbnew/kicad_plugin.cpp 2012-07-05 08:42:14 +0000
@@ -1019,6 +1019,10 @@
case THERMAL_PAD: // Default option not saved or loaded.
break;
+ case THT_THERMAL:
+ m_out->Print( 0, " tht" );
+ break;
+
case PAD_IN_ZONE:
m_out->Print( 0, " yes" );
break;
=== modified file 'pcbnew/legacy_plugin.cpp'
--- pcbnew/legacy_plugin.cpp 2012-07-05 08:28:21 +0000
+++ pcbnew/legacy_plugin.cpp 2012-07-05 08:41:09 +0000
@@ -2245,6 +2245,7 @@
{
case 'I': popt = PAD_IN_ZONE; break;
case 'T': popt = THERMAL_PAD; break;
+ case 'H': popt = THT_THERMAL; break;
case 'X': popt = PAD_NOT_IN_ZONE; break;
default:
@@ -3555,6 +3556,7 @@
default:
case PAD_IN_ZONE: padoption = 'I'; break;
case THERMAL_PAD: padoption = 'T'; break;
+ case THT_THERMAL: padoption = 'H'; break; // H is for 'hole' since it reliefs holes only
case PAD_NOT_IN_ZONE: padoption = 'X'; break;
}
=== modified file 'pcbnew/zones.h'
--- pcbnew/zones.h 2012-06-25 20:59:19 +0000
+++ pcbnew/zones.h 2012-07-05 08:57:48 +0000
@@ -36,7 +36,8 @@
UNDEFINED_CONNECTION = -1,
PAD_NOT_IN_ZONE, ///< Pads are not covered
THERMAL_PAD, ///< Use thermal relief for pads
- PAD_IN_ZONE ///< pads are covered by copper
+ PAD_IN_ZONE, ///< pads are covered by copper
+ THT_THERMAL ///< Thermal relief only for THT pads
};
class ZONE_CONTAINER;
=== modified file 'pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp'
--- pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp 2012-06-08 09:56:42 +0000
+++ pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp 2012-07-05 10:12:37 +0000
@@ -385,7 +385,13 @@
{
for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() )
{
- if( GetPadConnection( pad ) != THERMAL_PAD )
+ // Rejects non-standard pads with tht-only thermal reliefs
+ if( GetPadConnection( pad ) == THT_THERMAL
+ && pad->GetAttribute() != PAD_STANDARD )
+ continue;
+
+ if( GetPadConnection( pad ) != THERMAL_PAD
+ && GetPadConnection( pad ) != THT_THERMAL )
continue;
if( !pad->IsOnLayer( GetLayer() ) )
=== modified file 'pcbnew/zones_convert_to_polygons_aux_functions.cpp'
--- pcbnew/zones_convert_to_polygons_aux_functions.cpp 2012-06-08 09:56:42 +0000
+++ pcbnew/zones_convert_to_polygons_aux_functions.cpp 2012-07-05 10:12:57 +0000
@@ -78,7 +78,13 @@
{
for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() )
{
- if( aZone->GetPadConnection( pad ) != THERMAL_PAD )
+ // Rejects non-standard pads with tht-only thermal reliefs
+ if( aZone->GetPadConnection( pad ) == THT_THERMAL
+ && pad->GetAttribute() != PAD_STANDARD )
+ continue;
+
+ if( aZone->GetPadConnection( pad ) != THERMAL_PAD
+ && aZone->GetPadConnection( pad ) != THT_THERMAL )
continue;
// check
Follow ups