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.
master
Wayne Stambaugh 4 weeks ago
parent
commit
8b525671b1
  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

@ -1445,7 +1445,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 } );
@ -1474,7 +1474,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;
}
@ -2578,7 +2582,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

@ -477,7 +477,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;
friend class FP_CACHE;

Loading…
Cancel
Save