From 4f303a8dc2eda49c4dec05c1b7d5572af808411a Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Wed, 6 Sep 2023 08:43:01 +0300 Subject: [PATCH] Altium PCB import: Polygon Cutout only cuts copper fill. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15587 --- pcbnew/plugins/altium/altium_pcb.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp index 8484c01d96..848092bf3b 100644 --- a/pcbnew/plugins/altium/altium_pcb.cpp +++ b/pcbnew/plugins/altium/altium_pcb.cpp @@ -1930,7 +1930,18 @@ void ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItem( const AREGION6& aElem ) zone->SetIsRuleArea( true ); - HelperSetZoneKeepoutRestrictions( zone, aElem.keepoutrestrictions ); + if( aElem.is_keepout ) + { + HelperSetZoneKeepoutRestrictions( zone, aElem.keepoutrestrictions ); + } + else if( aElem.kind == ALTIUM_REGION_KIND::POLYGON_CUTOUT ) + { + zone->SetDoNotAllowCopperPour( true ); + zone->SetDoNotAllowVias( false ); + zone->SetDoNotAllowTracks( false ); + zone->SetDoNotAllowPads( false ); + zone->SetDoNotAllowFootprints( false ); + } zone->SetPosition( aElem.outline.at( 0 ).position ); zone->Outline()->AddOutline( linechain ); @@ -2014,7 +2025,18 @@ void ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItem( FOOTPRINT* aFoot zone->SetIsRuleArea( true ); - HelperSetZoneKeepoutRestrictions( zone, aElem.keepoutrestrictions ); + if( aElem.is_keepout ) + { + HelperSetZoneKeepoutRestrictions( zone, aElem.keepoutrestrictions ); + } + else if( aElem.kind == ALTIUM_REGION_KIND::POLYGON_CUTOUT ) + { + zone->SetDoNotAllowCopperPour( true ); + zone->SetDoNotAllowVias( false ); + zone->SetDoNotAllowTracks( false ); + zone->SetDoNotAllowPads( false ); + zone->SetDoNotAllowFootprints( false ); + } zone->SetPosition( aElem.outline.at( 0 ).position ); zone->Outline()->AddOutline( linechain );