Import copper pour cutouts from Eagle packages (footprints).

Fixes https://gitlab.com/kicad/code/kicad/issues/13503
This commit is contained in:
Jeff Young 2023-01-13 14:40:34 +00:00
parent 7fbad183db
commit f358749b28
2 changed files with 19 additions and 5 deletions

View File

@ -199,7 +199,7 @@ static wxString interpret_text( const wxString& aText )
} }
static void setKeepoutSettingsToZone( ZONE* aZone, int aLayer ) void EAGLE_PLUGIN::setKeepoutSettingsToZone( ZONE* aZone, int aLayer ) const
{ {
if( aLayer == EAGLE_LAYER::TRESTRICT || aLayer == EAGLE_LAYER::BRESTRICT ) if( aLayer == EAGLE_LAYER::TRESTRICT || aLayer == EAGLE_LAYER::BRESTRICT )
{ {
@ -226,6 +226,17 @@ static void setKeepoutSettingsToZone( ZONE* aZone, int aLayer )
aZone->SetLayerSet( LSET::AllCuMask() ); aZone->SetLayerSet( LSET::AllCuMask() );
} }
else // copper pour cutout
{
aZone->SetIsRuleArea( true );
aZone->SetDoNotAllowVias( false );
aZone->SetDoNotAllowTracks( false );
aZone->SetDoNotAllowCopperPour( true );
aZone->SetDoNotAllowPads( false );
aZone->SetDoNotAllowFootprints( false );
aZone->SetLayerSet( kicad_layer( aLayer ) );
}
} }
@ -2279,7 +2290,8 @@ void EAGLE_PLUGIN::packagePolygon( FOOTPRINT* aFootprint, wxXmlNode* aTree ) con
} }
} }
if( p.layer == EAGLE_LAYER::TRESTRICT if( p.pour == EPOLYGON::CUTOUT
|| p.layer == EAGLE_LAYER::TRESTRICT
|| p.layer == EAGLE_LAYER::BRESTRICT || p.layer == EAGLE_LAYER::BRESTRICT
|| p.layer == EAGLE_LAYER::VRESTRICT ) || p.layer == EAGLE_LAYER::VRESTRICT )
{ {

View File

@ -233,6 +233,8 @@ private:
/// Get Eagle layer number by its name /// Get Eagle layer number by its name
int eagle_layer_id( const wxString& aLayerName ) const; int eagle_layer_id( const wxString& aLayerName ) const;
void setKeepoutSettingsToZone( ZONE* aZone, int aLayer ) const;
/// This PLUGIN only caches one footprint library, this determines which one. /// This PLUGIN only caches one footprint library, this determines which one.
void cacheLib( const wxString& aLibraryPath ); void cacheLib( const wxString& aLibraryPath );