Remove unnecessarily restrictive IsCopper() checks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11588
This commit is contained in:
parent
6c6a7cf862
commit
4df5f9969a
|
@ -904,31 +904,26 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
|
||||||
|
|
||||||
ERECT r( gr );
|
ERECT r( gr );
|
||||||
PCB_LAYER_ID layer = kicad_layer( r.layer );
|
PCB_LAYER_ID layer = kicad_layer( r.layer );
|
||||||
|
ZONE* zone = new ZONE( m_board );
|
||||||
|
|
||||||
if( IsCopperLayer( layer ) )
|
m_board->Add( zone, ADD_MODE::APPEND );
|
||||||
{
|
|
||||||
// use a "netcode = 0" type ZONE:
|
|
||||||
ZONE* zone = new ZONE( m_board );
|
|
||||||
m_board->Add( zone, ADD_MODE::APPEND );
|
|
||||||
|
|
||||||
zone->SetLayer( layer );
|
zone->SetLayer( layer );
|
||||||
zone->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
zone->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||||
|
|
||||||
ZONE_BORDER_DISPLAY_STYLE outline_hatch = ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE;
|
ZONE_BORDER_DISPLAY_STYLE outline_hatch = ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE;
|
||||||
|
|
||||||
const int outlineIdx = -1; // this is the id of the copper zone main outline
|
const int outlineIdx = -1; // this is the id of the copper zone main outline
|
||||||
zone->AppendCorner( VECTOR2I( kicad_x( r.x1 ), kicad_y( r.y1 ) ), outlineIdx );
|
zone->AppendCorner( VECTOR2I( kicad_x( r.x1 ), kicad_y( r.y1 ) ), outlineIdx );
|
||||||
zone->AppendCorner( VECTOR2I( kicad_x( r.x2 ), kicad_y( r.y1 ) ), outlineIdx );
|
zone->AppendCorner( VECTOR2I( kicad_x( r.x2 ), kicad_y( r.y1 ) ), outlineIdx );
|
||||||
zone->AppendCorner( VECTOR2I( kicad_x( r.x2 ), kicad_y( r.y2 ) ), outlineIdx );
|
zone->AppendCorner( VECTOR2I( kicad_x( r.x2 ), kicad_y( r.y2 ) ), outlineIdx );
|
||||||
zone->AppendCorner( VECTOR2I( kicad_x( r.x1 ), kicad_y( r.y2 ) ), outlineIdx );
|
zone->AppendCorner( VECTOR2I( kicad_x( r.x1 ), kicad_y( r.y2 ) ), outlineIdx );
|
||||||
|
|
||||||
if( r.rot )
|
if( r.rot )
|
||||||
zone->Rotate( zone->GetPosition(), EDA_ANGLE( r.rot->degrees, DEGREES_T ) );
|
zone->Rotate( zone->GetPosition(), EDA_ANGLE( r.rot->degrees, DEGREES_T ) );
|
||||||
|
|
||||||
// this is not my fault:
|
// this is not my fault:
|
||||||
zone->SetBorderDisplayStyle( outline_hatch, ZONE::GetDefaultHatchPitch(),
|
zone->SetBorderDisplayStyle( outline_hatch, ZONE::GetDefaultHatchPitch(), true );
|
||||||
true );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_xpath->pop();
|
m_xpath->pop();
|
||||||
}
|
}
|
||||||
|
@ -1452,9 +1447,6 @@ ZONE* EAGLE_PLUGIN::loadPolygon( wxXmlNode* aPolyNode )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !IsCopperLayer( layer ) && !keepout )
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
// use a "netcode = 0" type ZONE:
|
// use a "netcode = 0" type ZONE:
|
||||||
std::unique_ptr<ZONE> zone = std::make_unique<ZONE>( m_board );
|
std::unique_ptr<ZONE> zone = std::make_unique<ZONE>( m_board );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue