Zone filler: pads non connected in zone option: use same algo as the 5.1 branch

to calculate thermal clearance (antipad size) for pads having the same netcode
as the zone, the net clearance has no meaning
(net clearance between object of the same net is 0)
and the zone_clearance can be set to 0 (i.e. use the netclass clearance).
Therefore use the antipad clearance (thermal clearance) or the zone_clearance if bigger.
This commit is contained in:
jean-pierre charras 2020-02-14 17:00:08 +01:00
parent fb19d83b69
commit 39c2c4e13b
1 changed files with 13 additions and 0 deletions

View File

@ -557,7 +557,20 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE_CONTAINER* aZone, SHAPE_
if( pad->GetNetCode() != aZone->GetNetCode() || pad->GetNetCode() <= 0
|| aZone->GetPadConnection( pad ) == ZONE_CONNECTION::NONE )
{
// for pads having a netcode different from the zone, use the net clearance:
int gap = std::max( zone_clearance, pad->GetClearance() );
// for pads having the same netcode as the zone, the net clearance has no
// meaning (clearance between object of the same net is 0) and the
// zone_clearance can be set to 0 (In this case the netclass clearance is used)
// therefore use the antipad clearance (thermal clearance) or the
// zone_clearance if bigger.
if( pad->GetNetCode() > 0 && pad->GetNetCode() == aZone->GetNetCode() )
{
int thermalGap = aZone->GetThermalReliefGap( pad );
gap = std::max( zone_clearance, thermalGap );;
}
EDA_RECT item_boundingbox = pad->GetBoundingBox();
item_boundingbox.Inflate( pad->GetClearance() );