Flash pads when connected by zone
Zone connections (even half-connections) should trigger the connected logic in flashPads. This removes the double-standard for painting pads and imposes thermal standoff based on the net connection to the pad if it shares a net, not just if connected
This commit is contained in:
parent
1a7b7e84c6
commit
714430fefa
|
@ -183,11 +183,11 @@ bool PAD::IsFlipped() const
|
|||
}
|
||||
|
||||
|
||||
bool PAD::FlashLayer( LSET aLayers, bool aIncludeZones ) const
|
||||
bool PAD::FlashLayer( LSET aLayers ) const
|
||||
{
|
||||
for( auto layer : aLayers.Seq() )
|
||||
{
|
||||
if( FlashLayer( layer, aIncludeZones ) )
|
||||
if( FlashLayer( layer ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -195,20 +195,10 @@ bool PAD::FlashLayer( LSET aLayers, bool aIncludeZones ) const
|
|||
}
|
||||
|
||||
|
||||
bool PAD::FlashLayer( int aLayer, bool aIncludeZones ) const
|
||||
bool PAD::FlashLayer( int aLayer ) const
|
||||
{
|
||||
std::vector<KICAD_T> types{ PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T };
|
||||
|
||||
/**
|
||||
* Normally, we don't need to include zones in our flash check because the
|
||||
* zones will fill over the hole. But, when we are drawing the pad in
|
||||
* pcbnew, it is helpful to show the annular ring where the pad is connected
|
||||
*/
|
||||
if( aIncludeZones )
|
||||
{
|
||||
types.push_back( PCB_ZONE_T );
|
||||
types.push_back( PCB_FP_ZONE_T );
|
||||
}
|
||||
std::vector<KICAD_T> types
|
||||
{ PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_T, PCB_FP_ZONE_T };
|
||||
|
||||
// Return the "normal" shape if the caller doesn't specify a particular layer
|
||||
if( aLayer == UNDEFINED_LAYER )
|
||||
|
|
|
@ -563,20 +563,18 @@ public:
|
|||
* Check to see whether the pad should be flashed on the specific layer.
|
||||
*
|
||||
* @param aLayer Layer to check for connectivity
|
||||
* @param aIncludeZones We include zones in potentially connected elements when drawing
|
||||
* @return true if connected by pad or track (or optionally zone)
|
||||
*/
|
||||
bool FlashLayer( int aLayer, bool aIncludeZones = false ) const;
|
||||
bool FlashLayer( int aLayer ) const;
|
||||
|
||||
/**
|
||||
* Check to see if the pad should be flashed to any of the layers in the set.
|
||||
*
|
||||
* @param aLayers set of layers to check the via against
|
||||
* @param aIncludeZones We include zones in potentially connected elements when drawing
|
||||
* @return true if connected by pad or track (or optionally zone) on any of the associated
|
||||
* layers
|
||||
*/
|
||||
bool FlashLayer( LSET aLayers, bool aIncludeZones = false ) const;
|
||||
bool FlashLayer( LSET aLayers ) const;
|
||||
|
||||
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
|
||||
bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
|
||||
|
|
|
@ -618,7 +618,7 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer )
|
|||
|
||||
for( unsigned int layer : m_pcbSettings.GetHighContrastLayers() )
|
||||
{
|
||||
if( aVia->FlashLayer( static_cast<PCB_LAYER_ID>( layer ), true ) )
|
||||
if( aVia->FlashLayer( static_cast<PCB_LAYER_ID>( layer ) ) )
|
||||
{
|
||||
draw = true;
|
||||
break;
|
||||
|
|
|
@ -467,7 +467,7 @@ void VIA::SanitizeLayers()
|
|||
}
|
||||
|
||||
|
||||
bool VIA::FlashLayer( LSET aLayers, bool aIncludeZones ) const
|
||||
bool VIA::FlashLayer( LSET aLayers ) const
|
||||
{
|
||||
for( auto layer : aLayers.Seq() )
|
||||
{
|
||||
|
@ -479,20 +479,10 @@ bool VIA::FlashLayer( LSET aLayers, bool aIncludeZones ) const
|
|||
}
|
||||
|
||||
|
||||
bool VIA::FlashLayer( int aLayer, bool aIncludeZones ) const
|
||||
bool VIA::FlashLayer( int aLayer ) const
|
||||
{
|
||||
std::vector<KICAD_T> types{ PCB_TRACE_T, PCB_ARC_T, PCB_PAD_T };
|
||||
|
||||
/**
|
||||
* Normally, we don't need to include zones in our flash check because the
|
||||
* zones will fill over the hole. But, when we are drawing the via in
|
||||
* pcbnew, it is helpful to show the annular ring where the via is connected
|
||||
*/
|
||||
if( aIncludeZones )
|
||||
{
|
||||
types.push_back( PCB_ZONE_T );
|
||||
types.push_back( PCB_FP_ZONE_T );
|
||||
}
|
||||
std::vector<KICAD_T> types
|
||||
{ PCB_TRACE_T, PCB_ARC_T, PCB_PAD_T, PCB_ZONE_T, PCB_FP_ZONE_T };
|
||||
|
||||
// Return the "normal" shape if the caller doesn't specify a particular layer
|
||||
if( aLayer == UNDEFINED_LAYER )
|
||||
|
|
|
@ -456,18 +456,16 @@ public:
|
|||
/**
|
||||
* Checks to see whether the via should have a pad on the specific layer
|
||||
* @param aLayer Layer to check for connectivity
|
||||
* @param aIncludeZones We include zones in potentially connected elements when drawing
|
||||
* @return true if connected by pad or track (or optionally zone)
|
||||
*/
|
||||
bool FlashLayer( int aLayer, bool aIncludeZones = false ) const;
|
||||
bool FlashLayer( int aLayer ) const;
|
||||
|
||||
/**
|
||||
* Checks to see if the via is present on any of the layers in the set
|
||||
* @param aLayers set of layers to check the via against
|
||||
* @param aIncludeZones We include zones in potentially connected elements when drawing
|
||||
* @return true if connected by pad or track (or optionally zone) on any of the associated layers
|
||||
*/
|
||||
bool FlashLayer( LSET aLayers, bool aIncludeZones = false ) const;
|
||||
bool FlashLayer( LSET aLayers ) const;
|
||||
|
||||
/**
|
||||
* Function SetDrill
|
||||
|
|
|
@ -618,7 +618,7 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
|
|||
|
||||
// If the pad isn't on the current layer but has a hole, knock out a thermal relief
|
||||
// for the hole.
|
||||
if( !pad->FlashLayer( aLayer ) )
|
||||
if( !pad->FlashLayer( aLayer ) && pad->GetNetCode() != aZone->GetNetCode() )
|
||||
{
|
||||
if( pad->GetDrillSize().x == 0 && pad->GetDrillSize().y == 0 )
|
||||
continue;
|
||||
|
@ -696,8 +696,8 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
|||
gap += extra_margin;
|
||||
|
||||
// If the pad isn't on the current layer but has a hole, knock out the
|
||||
// hole.
|
||||
if( !aPad->FlashLayer( aLayer ) )
|
||||
// hole. If the zone and the pad are the same layer, we still need the annular ring knockout
|
||||
if( !aPad->FlashLayer( aLayer ) && aPad->GetNetCode() != aZone->GetNetCode() )
|
||||
{
|
||||
if( aPad->GetDrillSize().x == 0 && aPad->GetDrillSize().y == 0 )
|
||||
return;
|
||||
|
@ -748,7 +748,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
|||
{
|
||||
VIA* via = static_cast<VIA*>( aTrack );
|
||||
|
||||
if( !via->FlashLayer( aLayer ) )
|
||||
if( !via->FlashLayer( aLayer ) && via->GetNetCode() != aZone->GetNetCode() )
|
||||
{
|
||||
int radius = via->GetDrillValue() / 2 + bds.GetHolePlatingThickness();
|
||||
TransformCircleToPolygon( aHoles, via->GetPosition(), radius + gap,
|
||||
|
|
Loading…
Reference in New Issue