From 953279ce70f2476a0912cd0195c864b21c3b7702 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 14 Mar 2021 12:37:13 +0100 Subject: [PATCH] Gerber plot: fix missing AperFunction attribute for texts. Fix also a incorrect AperFunction attribute for graphic items on Edge.Cuts in footprints --- common/gr_text.cpp | 2 +- pcbnew/plot_brditems_plotter.cpp | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/common/gr_text.cpp b/common/gr_text.cpp index fc82d95ad2..e00b540b15 100644 --- a/common/gr_text.cpp +++ b/common/gr_text.cpp @@ -230,7 +230,7 @@ void PLOTTER::Text( const wxPoint& aPos, void* aData ) { SetColor( aColor ); - SetCurrentLineWidth( aPenWidth ); + SetCurrentLineWidth( aPenWidth, aData ); GRText( NULL, aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, aPenWidth, aItalic, aBold, nullptr, nullptr, this ); diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 1ea29875b4..f24ee05ca6 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -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 ( 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.