altium: Improve Keepout zone parsing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4378
This commit is contained in:
Thomas Pointhuber 2020-05-10 14:28:56 +02:00 committed by Jon Evans
parent ba409c95b9
commit 0a38ebcc41
1 changed files with 7 additions and 14 deletions

View File

@ -1372,24 +1372,17 @@ void ALTIUM_PCB::ParseShapeBasedRegions6Data(
{ {
HelperCreateBoardOutline( elem.vertices ); 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 ); ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board );
m_board->Add( zone, ADD_MODE::APPEND ); 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->SetIsKeepout( true ); zone->SetDoNotAllowVias( false );
zone->SetDoNotAllowTracks( false ); zone->SetDoNotAllowPads( false );
zone->SetDoNotAllowVias( false ); zone->SetDoNotAllowFootprints( false );
zone->SetDoNotAllowPads( false ); zone->SetDoNotAllowCopperPour( true );
zone->SetDoNotAllowFootprints( false );
zone->SetDoNotAllowCopperPour( true );
}
else
{
zone->SetNetCode( GetNetCode( elem.net ) );
}
if( elem.layer == ALTIUM_LAYER::MULTI_LAYER ) if( elem.layer == ALTIUM_LAYER::MULTI_LAYER )
{ {