Gerber plot: fix missing AperFunction attribute for texts.

Fix also a incorrect AperFunction attribute for graphic items on Edge.Cuts
in footprints
This commit is contained in:
jean-pierre charras
2021-03-14 12:37:13 +01:00
parent b7bde07287
commit 953279ce70
2 changed files with 10 additions and 6 deletions
+9 -5
View File
@@ -395,6 +395,10 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItem( const FP_TEXT* aTextMod, COLOR4D a
bool allow_bold = true;
GBR_METADATA gbr_metadata;
if( IsCopperLayer( aTextMod->GetLayer() ) )
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR );
gbr_metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP );
const FOOTPRINT* parent = static_cast<const FOOTPRINT*> ( aTextMod->GetParent() );
gbr_metadata.SetCmpReference( parent->GetReference() );
@@ -549,15 +553,15 @@ void BRDITEMS_PLOTTER::PlotFootprintGraphicItem( const FP_SHAPE* aShape )
bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
if( isOnCopperLayer )
if( aShape->GetLayer() == Edge_Cuts ) // happens also when plotting copper layers
{
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT );
}
else if( isOnCopperLayer ) // only for items not on Edge_Cuts.
{
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_ETCHEDCMP );
gbr_metadata.SetCopper( true );
}
else if( aShape->GetLayer() == Edge_Cuts ) // happens also when plotting copper layers
{
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT );
}
int radius; // Circle/arc radius.