Allow no-net teardrops on no-net pads with no-net tracks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17566
(cherry picked from commit 50567764b5
)
This commit is contained in:
parent
c0a608bfdd
commit
0363806e7e
|
@ -888,9 +888,18 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
|
|||
if( !padBBox.Intersects( aZone->GetBoundingBox() ) )
|
||||
continue;
|
||||
|
||||
if( pad->GetNetCode() != aZone->GetNetCode()
|
||||
|| pad->GetNetCode() <= 0
|
||||
|| pad->GetZoneLayerOverride( aLayer ) == ZLO_FORCE_NO_ZONE_CONNECTION )
|
||||
bool noConnection = pad->GetNetCode() != aZone->GetNetCode();
|
||||
|
||||
if( !aZone->IsTeardropArea() )
|
||||
{
|
||||
if( aZone->GetNetCode() == 0
|
||||
|| pad->GetZoneLayerOverride( aLayer ) == ZLO_FORCE_NO_ZONE_CONNECTION )
|
||||
{
|
||||
noConnection = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( noConnection )
|
||||
{
|
||||
// collect these for knockout in buildCopperItemClearances()
|
||||
aNoConnectionPads.push_back( pad );
|
||||
|
@ -1052,8 +1061,10 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
|||
{
|
||||
if( aTrack->GetBoundingBox().Intersects( zone_boundingbox ) )
|
||||
{
|
||||
bool sameNet = aTrack->GetNetCode() == aZone->GetNetCode()
|
||||
&& aZone->GetNetCode() != 0;
|
||||
bool sameNet = aTrack->GetNetCode() == aZone->GetNetCode();
|
||||
|
||||
if( !aZone->IsTeardropArea() && aZone->GetNetCode() == 0 )
|
||||
sameNet = false;
|
||||
|
||||
int gap = evalRulesForItems( PHYSICAL_CLEARANCE_CONSTRAINT,
|
||||
aZone, aTrack, aLayer );
|
||||
|
@ -1127,8 +1138,15 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
|||
auto knockoutGraphicClearance =
|
||||
[&]( BOARD_ITEM* aItem )
|
||||
{
|
||||
int shapeNet = ( aItem->Type() == PCB_SHAPE_T ) ? static_cast<PCB_SHAPE*>( aItem )->GetNetCode() : -1;
|
||||
bool sameNet = shapeNet == aZone->GetNetCode() && aZone->GetNetCode() != 0;
|
||||
int shapeNet = -1;
|
||||
|
||||
if( aItem->Type() == PCB_SHAPE_T )
|
||||
shapeNet = static_cast<PCB_SHAPE*>( aItem )->GetNetCode();
|
||||
|
||||
bool sameNet = shapeNet == aZone->GetNetCode();
|
||||
|
||||
if( !aZone->IsTeardropArea() && aZone->GetNetCode() == 0 )
|
||||
sameNet = false;
|
||||
|
||||
// A item on the Edge_Cuts or Margin is always seen as on any layer:
|
||||
if( aItem->IsOnLayer( aLayer )
|
||||
|
@ -1177,7 +1195,12 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
|||
{
|
||||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
if( pad->GetNetCode() == aZone->GetNetCode() && aZone->GetNetCode() != 0 )
|
||||
bool sameNet = pad->GetNetCode() == aZone->GetNetCode();
|
||||
|
||||
if( !aZone->IsTeardropArea() && aZone->GetNetCode() == 0 )
|
||||
sameNet = false;
|
||||
|
||||
if( sameNet )
|
||||
{
|
||||
if( pad->IsOnLayer( aLayer ) )
|
||||
allowedNetTiePads.insert( pad );
|
||||
|
|
Loading…
Reference in New Issue