Browse Source

Only use front/back layer notation "F&B" for zone definitions.

This prevents false positive DRC footprint parity errors caused by commit
088e0e80a1.

(cherry picked from commit 8b525671b1)
9.0
Wayne Stambaugh 3 months ago
parent
commit
44c473c1b3
  1. 10
      pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.cpp
  2. 2
      pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h

10
pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.cpp

@ -1363,7 +1363,7 @@ void PCB_IO_KICAD_SEXPR::format( const FOOTPRINT* aFootprint ) const
}
void PCB_IO_KICAD_SEXPR::formatLayers( LSET aLayerMask, bool aEnumerateLayers ) const
void PCB_IO_KICAD_SEXPR::formatLayers( LSET aLayerMask, bool aEnumerateLayers, bool aIsZone ) const
{
static const LSET cu_all( LSET::AllCuMask() );
static const LSET fr_bk( { B_Cu, F_Cu } );
@ -1392,7 +1392,11 @@ void PCB_IO_KICAD_SEXPR::formatLayers( LSET aLayerMask, bool aEnumerateLayers )
}
else if( ( aLayerMask & cu_board_mask ) == fr_bk )
{
output += ' ' + m_out->Quotew( "F&B.Cu" );
if( aIsZone )
output += ' ' + m_out->Quotew( "F&B.Cu" );
else
output += ' ' + m_out->Quotew( "*.Cu" );
aLayerMask &= ~fr_bk;
}
@ -2477,7 +2481,7 @@ void PCB_IO_KICAD_SEXPR::format( const ZONE* aZone ) const
// Always enumerate every layer for a zone on a copper layer
if( layers.count() > 1 )
formatLayers( layers, aZone->IsOnCopperLayer() );
formatLayers( layers, aZone->IsOnCopperLayer(), true );
else
formatLayer( aZone->GetFirstLayer() );

2
pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h

@ -455,7 +455,7 @@ private:
void formatLayer( PCB_LAYER_ID aLayer, bool aIsKnockout = false ) const;
void formatLayers( LSET aLayerMask, bool aEnumerateLayers ) const;
void formatLayers( LSET aLayerMask, bool aEnumerateLayers, bool aIsZone = false ) const;
void formatTenting( const PADSTACK& aPadstack ) const;

Loading…
Cancel
Save