From 0a38ebcc41d229388c14e90004134a21a0741b62 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sun, 10 May 2020 14:28:56 +0200 Subject: [PATCH] altium: Improve Keepout zone parsing Fixes https://gitlab.com/kicad/code/kicad/-/issues/4378 --- pcbnew/altium2kicadpcb_plugin/altium_pcb.cpp | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pcbnew/altium2kicadpcb_plugin/altium_pcb.cpp b/pcbnew/altium2kicadpcb_plugin/altium_pcb.cpp index 3ee0dd161f..718fb67dd3 100644 --- a/pcbnew/altium2kicadpcb_plugin/altium_pcb.cpp +++ b/pcbnew/altium2kicadpcb_plugin/altium_pcb.cpp @@ -1372,24 +1372,17 @@ void ALTIUM_PCB::ParseShapeBasedRegions6Data( { HelperCreateBoardOutline( elem.vertices ); } - else if( elem.kind == ALTIUM_REGION_KIND::POLYGON_CUTOUT ) + else if( elem.kind == ALTIUM_REGION_KIND::POLYGON_CUTOUT || elem.is_keepout ) { ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); m_board->Add( zone, ADD_MODE::APPEND ); - if( elem.kind == ALTIUM_REGION_KIND::POLYGON_CUTOUT || elem.is_keepout ) - { - zone->SetIsKeepout( true ); - zone->SetDoNotAllowTracks( false ); - zone->SetDoNotAllowVias( false ); - zone->SetDoNotAllowPads( false ); - zone->SetDoNotAllowFootprints( false ); - zone->SetDoNotAllowCopperPour( true ); - } - else - { - zone->SetNetCode( GetNetCode( elem.net ) ); - } + zone->SetIsKeepout( true ); + zone->SetDoNotAllowTracks( false ); + zone->SetDoNotAllowVias( false ); + zone->SetDoNotAllowPads( false ); + zone->SetDoNotAllowFootprints( false ); + zone->SetDoNotAllowCopperPour( true ); if( elem.layer == ALTIUM_LAYER::MULTI_LAYER ) {