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

View File

@ -230,7 +230,7 @@ void PLOTTER::Text( const wxPoint& aPos,
void* aData ) void* aData )
{ {
SetColor( aColor ); SetColor( aColor );
SetCurrentLineWidth( aPenWidth ); SetCurrentLineWidth( aPenWidth, aData );
GRText( NULL, aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, aPenWidth, GRText( NULL, aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, aPenWidth,
aItalic, aBold, nullptr, nullptr, this ); aItalic, aBold, nullptr, nullptr, this );

View File

@ -395,6 +395,10 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItem( const FP_TEXT* aTextMod, COLOR4D a
bool allow_bold = true; bool allow_bold = true;
GBR_METADATA gbr_metadata; 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 ); gbr_metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP );
const FOOTPRINT* parent = static_cast<const FOOTPRINT*> ( aTextMod->GetParent() ); const FOOTPRINT* parent = static_cast<const FOOTPRINT*> ( aTextMod->GetParent() );
gbr_metadata.SetCmpReference( parent->GetReference() ); gbr_metadata.SetCmpReference( parent->GetReference() );
@ -549,15 +553,15 @@ void BRDITEMS_PLOTTER::PlotFootprintGraphicItem( const FP_SHAPE* aShape )
bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any(); 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.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_ETCHEDCMP );
gbr_metadata.SetCopper( true ); 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. int radius; // Circle/arc radius.