From ca0e57f036463e6dbf48e138dcca2171bdfbbbdc Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 7 Apr 2023 11:23:24 +0200 Subject: [PATCH] Plot gerber: fix two issues: - ensure the metadata GBR_NETINFO_CMP is added to all PCB_SHAPE living in a footprint - fix a too zealous plot of negative objects on the silkscreen layers, when merging layers to silkscreen layers. --- pcbnew/plot_board_layers.cpp | 3 +++ pcbnew/plot_brditems_plotter.cpp | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 1b8b240be0..c643e471e5 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -207,6 +207,9 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, PCB_LAYER_ID aLayer, // Plot the mask PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt ); + + // Disable the negative polarity + aPlotter->SetLayerPolarity( true ); } break; diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 5ef162e404..1725f32afc 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -660,7 +660,6 @@ void BRDITEMS_PLOTTER::PlotPcbText( const EDA_TEXT* aText, PCB_LAYER_ID aLayer, COLOR4D color = getColor( aLayer ); m_plotter->SetColor( color ); - //VECTOR2I size = aText->GetTextSize(); VECTOR2I pos = aText->GetTextPos(); TEXT_ATTRIBUTES attrs = aText->GetAttributes(); @@ -668,9 +667,6 @@ void BRDITEMS_PLOTTER::PlotPcbText( const EDA_TEXT* aText, PCB_LAYER_ID aLayer, attrs.m_Angle = aText->GetDrawRotation(); attrs.m_Multiline = false; - //if( aText->IsMirrored() ) - // size.x = -size.x; - m_plotter->SetCurrentLineWidth( attrs.m_StrokeWidth ); if( aIsKnockout ) @@ -802,7 +798,10 @@ void BRDITEMS_PLOTTER::PlotPcbShape( const PCB_SHAPE* aShape ) GBR_METADATA gbr_metadata; if( parentFP ) + { gbr_metadata.SetCmpReference( parentFP->GetReference() ); + gbr_metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP ); + } if( aShape->GetLayer() == Edge_Cuts ) {