Don't generate thermal reliefs for pads that don't intersect zone.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18174
This commit is contained in:
parent
d304a30155
commit
a9b5b1728a
|
@ -875,6 +875,7 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
|
||||||
ZONE_CONNECTION connection;
|
ZONE_CONNECTION connection;
|
||||||
DRC_CONSTRAINT constraint;
|
DRC_CONSTRAINT constraint;
|
||||||
int padClearance;
|
int padClearance;
|
||||||
|
std::shared_ptr<SHAPE> padShape;
|
||||||
int holeClearance;
|
int holeClearance;
|
||||||
SHAPE_POLY_SET holes;
|
SHAPE_POLY_SET holes;
|
||||||
|
|
||||||
|
@ -916,22 +917,23 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
|
||||||
connection = constraint.m_ZoneConnection;
|
connection = constraint.m_ZoneConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( connection == ZONE_CONNECTION::THERMAL && !pad->CanFlashLayer( aLayer ) )
|
||||||
|
connection = ZONE_CONNECTION::NONE;
|
||||||
|
|
||||||
switch( connection )
|
switch( connection )
|
||||||
{
|
{
|
||||||
case ZONE_CONNECTION::THERMAL:
|
case ZONE_CONNECTION::THERMAL:
|
||||||
constraint = bds.m_DRCEngine->EvalRules( THERMAL_RELIEF_GAP_CONSTRAINT, pad, aZone,
|
padShape = pad->GetEffectiveShape( aLayer, FLASHING::ALWAYS_FLASHED );
|
||||||
aLayer );
|
|
||||||
|
if( aFill.Collide( padShape.get(), 0 ) )
|
||||||
|
{
|
||||||
|
constraint = bds.m_DRCEngine->EvalRules( THERMAL_RELIEF_GAP_CONSTRAINT, pad,
|
||||||
|
aZone, aLayer );
|
||||||
padClearance = constraint.GetValue().Min();
|
padClearance = constraint.GetValue().Min();
|
||||||
|
|
||||||
if( pad->CanFlashLayer( aLayer ) )
|
|
||||||
{
|
|
||||||
aThermalConnectionPads.push_back( pad );
|
aThermalConnectionPads.push_back( pad );
|
||||||
addKnockout( pad, aLayer, padClearance, holes );
|
addKnockout( pad, aLayer, padClearance, holes );
|
||||||
}
|
}
|
||||||
else if( pad->GetDrillSize().x > 0 )
|
|
||||||
{
|
|
||||||
pad->TransformHoleToPolygon( holes, padClearance, m_maxError, ERROR_OUTSIDE );
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue