Altium PCB import: Polygon Cutout only cuts copper fill.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15587

(cherry picked from commit 4f303a8dc2)
This commit is contained in:
Alex Shvartzkop 2023-09-06 08:43:01 +03:00
parent 30c2028852
commit 9c87a52b6e
1 changed files with 24 additions and 2 deletions

View File

@ -1990,7 +1990,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 );
@ -2070,7 +2081,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 );