Implement changes for Sketch Pads to Fab Layers.

Includes adding Fab Layers to default text & graphic settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/1885

Fixes https://gitlab.com/kicad/code/kicad/issues/2274
This commit is contained in:
Jeff Young 2020-05-01 17:24:01 +01:00
parent 4a60b8a776
commit 10614a9ebc
26 changed files with 212 additions and 504 deletions

View File

@ -89,6 +89,8 @@ edge_width
effects effects
end end
epsilon_r epsilon_r
fab_layers_line_width
fab_layers_text_dims
feature1 feature1
feature2 feature2
fill fill

View File

@ -13,7 +13,6 @@ mirror
mode mode
outputdirectory outputdirectory
outputformat outputformat
padsonsilk
pcbplotparams pcbplotparams
plotframeref plotframeref
plotinvisibletext plotinvisibletext
@ -23,6 +22,7 @@ psa4output
pscolor pscolor
psnegative psnegative
scaleselection scaleselection
sketchpadsonfab
subtractmaskfromsilk subtractmaskfromsilk
svgprecision svgprecision
svguseinch svguseinch

View File

@ -731,8 +731,6 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_
if( trace_mode == SKETCH ) if( trace_mode == SKETCH )
{ {
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH, gbr_metadata );
if( gbr_metadata ) if( gbr_metadata )
formatNetAttribute( &gbr_metadata->m_NetlistMetadata ); formatNetAttribute( &gbr_metadata->m_NetlistMetadata );
@ -825,8 +823,6 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
case 1800: case 1800:
if( trace_mode == SKETCH ) if( trace_mode == SKETCH )
{ {
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH, gbr_metadata );
if( gbr_metadata ) if( gbr_metadata )
formatNetAttribute( &gbr_metadata->m_NetlistMetadata ); formatNetAttribute( &gbr_metadata->m_NetlistMetadata );
@ -1113,8 +1109,7 @@ void GERBER_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCo
metadata = *gbr_metadata; metadata = *gbr_metadata;
if( aTrace_Mode == SKETCH ) if( aTrace_Mode == SKETCH )
PlotPoly( cornerList, NO_FILL, USE_DEFAULT_LINE_WIDTH, PlotPoly( cornerList, NO_FILL, DO_NOT_SET_LINE_WIDTH, &metadata );
&metadata );
else else
PlotGerberRegion( cornerList, &metadata ); PlotGerberRegion( cornerList, &metadata );
} }
@ -1145,7 +1140,6 @@ void GERBER_PLOTTER::FlashRegularPolygon( const wxPoint& aShapePos,
cornerList.push_back( cornerList[0] ); // Close the shape cornerList.push_back( cornerList[0] ); // Close the shape
SetCurrentLineWidth( aDiameter/8, gbr_metadata );
PlotPoly( cornerList, NO_FILL, GetCurrentLineWidth(), gbr_metadata ); PlotPoly( cornerList, NO_FILL, GetCurrentLineWidth(), gbr_metadata );
} }
else else

View File

@ -168,6 +168,7 @@ enum
LAYER_CLASS_COPPER, LAYER_CLASS_COPPER,
LAYER_CLASS_EDGES, LAYER_CLASS_EDGES,
LAYER_CLASS_COURTYARD, LAYER_CLASS_COURTYARD,
LAYER_CLASS_FAB,
LAYER_CLASS_OTHERS, LAYER_CLASS_OTHERS,
LAYER_CLASS_COUNT LAYER_CLASS_COUNT

View File

@ -551,6 +551,13 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
m_TextItalic[ LAYER_CLASS_COURTYARD ] = false; m_TextItalic[ LAYER_CLASS_COURTYARD ] = false;
m_TextUpright[ LAYER_CLASS_COURTYARD ] = false; m_TextUpright[ LAYER_CLASS_COURTYARD ] = false;
m_LineThickness[ LAYER_CLASS_FAB ] = Millimeter2iu( DEFAULT_LINE_WIDTH );
m_TextSize[ LAYER_CLASS_FAB ] = wxSize( Millimeter2iu( DEFAULT_TEXT_SIZE ),
Millimeter2iu( DEFAULT_TEXT_SIZE ) );
m_TextThickness[ LAYER_CLASS_FAB ] = Millimeter2iu( DEFAULT_TEXT_WIDTH );
m_TextItalic[ LAYER_CLASS_FAB ] = false;
m_TextUpright[ LAYER_CLASS_FAB ] = false;
m_LineThickness[ LAYER_CLASS_OTHERS ] = Millimeter2iu( DEFAULT_LINE_WIDTH ); m_LineThickness[ LAYER_CLASS_OTHERS ] = Millimeter2iu( DEFAULT_LINE_WIDTH );
m_TextSize[ LAYER_CLASS_OTHERS ] = wxSize( Millimeter2iu( DEFAULT_TEXT_SIZE ), m_TextSize[ LAYER_CLASS_OTHERS ] = wxSize( Millimeter2iu( DEFAULT_TEXT_SIZE ),
Millimeter2iu( DEFAULT_TEXT_SIZE ) ); Millimeter2iu( DEFAULT_TEXT_SIZE ) );
@ -734,6 +741,32 @@ void BOARD_DESIGN_SETTINGS::AppendConfigs( BOARD* aBoard, std::vector<PARAM_CFG*
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ), Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
nullptr, MM_PER_IU ) ); nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "FabLineWidth" ),
&m_LineThickness[ LAYER_CLASS_FAB ],
Millimeter2iu( DEFAULT_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "FabTextSizeV" ),
&m_TextSize[ LAYER_CLASS_FAB ].x,
Millimeter2iu( DEFAULT_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "FabTextSizeH" ),
&m_TextSize[ LAYER_CLASS_FAB ].y,
Millimeter2iu( DEFAULT_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "FabTextSizeThickness" ),
&m_TextThickness[ LAYER_CLASS_FAB ],
Millimeter2iu( DEFAULT_TEXT_WIDTH ), 1, TEXTS_MAX_WIDTH,
nullptr, MM_PER_IU ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "FabTextItalic" ),
&m_TextItalic[ LAYER_CLASS_FAB ], false ) );
aResult->push_back( new PARAM_CFG_BOOL( wxT( "FabTextUpright" ),
&m_TextUpright[ LAYER_CLASS_FAB ], true ) );
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "OthersLineWidth" ), aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "OthersLineWidth" ),
&m_LineThickness[ LAYER_CLASS_OTHERS ], &m_LineThickness[ LAYER_CLASS_OTHERS ],
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ), Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
@ -1034,7 +1067,7 @@ void BOARD_DESIGN_SETTINGS::SetEnabledLayers( LSET aMask )
} }
// Return the layer class index { silk, copper, edges & courtyards, others } of the // Return the layer class index { silk, copper, edges & courtyards, fab, others } of the
// given layer. // given layer.
int BOARD_DESIGN_SETTINGS::GetLayerClass( PCB_LAYER_ID aLayer ) const int BOARD_DESIGN_SETTINGS::GetLayerClass( PCB_LAYER_ID aLayer ) const
{ {
@ -1046,6 +1079,8 @@ int BOARD_DESIGN_SETTINGS::GetLayerClass( PCB_LAYER_ID aLayer ) const
return LAYER_CLASS_EDGES; return LAYER_CLASS_EDGES;
else if( aLayer == F_CrtYd || aLayer == B_CrtYd ) else if( aLayer == F_CrtYd || aLayer == B_CrtYd )
return LAYER_CLASS_COURTYARD; return LAYER_CLASS_COURTYARD;
else if( aLayer == F_Fab || aLayer == B_Fab )
return LAYER_CLASS_FAB;
else else
return LAYER_CLASS_OTHERS; return LAYER_CLASS_OTHERS;
} }

View File

@ -55,6 +55,7 @@ enum
ROW_COPPER, ROW_COPPER,
ROW_EDGES, ROW_EDGES,
ROW_COURTYARD, ROW_COURTYARD,
ROW_FAB,
ROW_OTHERS ROW_OTHERS
}; };
@ -202,6 +203,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
m_grid->SetCellValue( ROW_COPPER, COL_CLASS_NAME, _( "Copper Layers" ) ); m_grid->SetCellValue( ROW_COPPER, COL_CLASS_NAME, _( "Copper Layers" ) );
m_grid->SetCellValue( ROW_EDGES, COL_CLASS_NAME, _( "Edge Cuts" ) ); m_grid->SetCellValue( ROW_EDGES, COL_CLASS_NAME, _( "Edge Cuts" ) );
m_grid->SetCellValue( ROW_COURTYARD, COL_CLASS_NAME, _( "Courtyards" ) ); m_grid->SetCellValue( ROW_COURTYARD, COL_CLASS_NAME, _( "Courtyards" ) );
m_grid->SetCellValue( ROW_FAB, COL_CLASS_NAME, _( "Fab Layers" ) );
m_grid->SetCellValue( ROW_OTHERS, COL_CLASS_NAME, _( "Other Layers" ) ); m_grid->SetCellValue( ROW_OTHERS, COL_CLASS_NAME, _( "Other Layers" ) );
m_grid->SetCellValue( ROW_HEADER, COL_LINE_THICKNESS, _( "Line Thickness" ) ); m_grid->SetCellValue( ROW_HEADER, COL_LINE_THICKNESS, _( "Line Thickness" ) );
@ -209,31 +211,37 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
SET_INT_VALUE( ROW_COPPER, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_COPPER ] ); SET_INT_VALUE( ROW_COPPER, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_COPPER ] );
SET_INT_VALUE( ROW_EDGES, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_EDGES ] ); SET_INT_VALUE( ROW_EDGES, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_EDGES ] );
SET_INT_VALUE( ROW_COURTYARD, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_COURTYARD ] ); SET_INT_VALUE( ROW_COURTYARD, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_COURTYARD ] );
SET_INT_VALUE( ROW_FAB, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_FAB ] );
SET_INT_VALUE( ROW_OTHERS, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_OTHERS ] ); SET_INT_VALUE( ROW_OTHERS, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_OTHERS ] );
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_WIDTH, _( "Text Width" ) ); m_grid->SetCellValue( ROW_HEADER, COL_TEXT_WIDTH, _( "Text Width" ) );
SET_INT_VALUE( ROW_SILK, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_SILK ].x ); SET_INT_VALUE( ROW_SILK, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_SILK ].x );
SET_INT_VALUE( ROW_COPPER, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_COPPER ].x ); SET_INT_VALUE( ROW_COPPER, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_COPPER ].x );
SET_INT_VALUE( ROW_FAB, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_FAB ].x );
SET_INT_VALUE( ROW_OTHERS, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_OTHERS ].x ); SET_INT_VALUE( ROW_OTHERS, COL_TEXT_WIDTH, bds.m_TextSize[ LAYER_CLASS_OTHERS ].x );
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_HEIGHT, _( "Text Height" ) ); m_grid->SetCellValue( ROW_HEADER, COL_TEXT_HEIGHT, _( "Text Height" ) );
SET_INT_VALUE( ROW_SILK, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_SILK ].y ); SET_INT_VALUE( ROW_SILK, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_SILK ].y );
SET_INT_VALUE( ROW_COPPER, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_COPPER ].y ); SET_INT_VALUE( ROW_COPPER, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_COPPER ].y );
SET_INT_VALUE( ROW_FAB, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_FAB ].y );
SET_INT_VALUE( ROW_OTHERS, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_OTHERS ].y ); SET_INT_VALUE( ROW_OTHERS, COL_TEXT_HEIGHT, bds.m_TextSize[ LAYER_CLASS_OTHERS ].y );
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_THICKNESS, _( "Text Thickness" ) ); m_grid->SetCellValue( ROW_HEADER, COL_TEXT_THICKNESS, _( "Text Thickness" ) );
SET_INT_VALUE( ROW_SILK, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_SILK ] ); SET_INT_VALUE( ROW_SILK, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_SILK ] );
SET_INT_VALUE( ROW_COPPER, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_COPPER ] ); SET_INT_VALUE( ROW_COPPER, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_COPPER ] );
SET_INT_VALUE( ROW_FAB, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_FAB ] );
SET_INT_VALUE( ROW_OTHERS, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_OTHERS ] ); SET_INT_VALUE( ROW_OTHERS, COL_TEXT_THICKNESS, bds.m_TextThickness[ LAYER_CLASS_OTHERS ] );
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_ITALIC, _( "Italic" ) ); m_grid->SetCellValue( ROW_HEADER, COL_TEXT_ITALIC, _( "Italic" ) );
SET_BOOL_VALUE( ROW_SILK, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_SILK ] ); SET_BOOL_VALUE( ROW_SILK, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_SILK ] );
SET_BOOL_VALUE( ROW_COPPER, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_COPPER ] ); SET_BOOL_VALUE( ROW_COPPER, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_COPPER ] );
SET_BOOL_VALUE( ROW_FAB, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_FAB ] );
SET_BOOL_VALUE( ROW_OTHERS, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_OTHERS ] ); SET_BOOL_VALUE( ROW_OTHERS, COL_TEXT_ITALIC, bds.m_TextItalic[ LAYER_CLASS_OTHERS ] );
m_grid->SetCellValue( ROW_HEADER, COL_TEXT_UPRIGHT, _( "Upright" ) ); m_grid->SetCellValue( ROW_HEADER, COL_TEXT_UPRIGHT, _( "Upright" ) );
SET_BOOL_VALUE( ROW_SILK, COL_TEXT_UPRIGHT, bds.m_TextUpright[ LAYER_CLASS_SILK ] ); SET_BOOL_VALUE( ROW_SILK, COL_TEXT_UPRIGHT, bds.m_TextUpright[ LAYER_CLASS_SILK ] );
SET_BOOL_VALUE( ROW_COPPER, COL_TEXT_UPRIGHT, bds.m_TextUpright[ LAYER_CLASS_COPPER ] ); SET_BOOL_VALUE( ROW_COPPER, COL_TEXT_UPRIGHT, bds.m_TextUpright[ LAYER_CLASS_COPPER ] );
SET_BOOL_VALUE( ROW_FAB, COL_TEXT_UPRIGHT, bds.m_TextUpright[ LAYER_CLASS_FAB ] );
SET_BOOL_VALUE( ROW_OTHERS, COL_TEXT_UPRIGHT, bds.m_TextUpright[ LAYER_CLASS_OTHERS ] ); SET_BOOL_VALUE( ROW_OTHERS, COL_TEXT_UPRIGHT, bds.m_TextUpright[ LAYER_CLASS_OTHERS ] );
return true; return true;

View File

@ -46,7 +46,6 @@
DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) : DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
DIALOG_PLOT_BASE( aParent ), m_parent( aParent ), DIALOG_PLOT_BASE( aParent ), m_parent( aParent ),
m_defaultLineWidth( aParent, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits, true ),
m_defaultPenSize( aParent, m_hpglPenLabel, m_hpglPenCtrl, m_hpglPenUnits, true ), m_defaultPenSize( aParent, m_hpglPenLabel, m_hpglPenCtrl, m_hpglPenUnits, true ),
m_trackWidthCorrection( aParent, m_widthAdjustLabel, m_widthAdjustCtrl, m_widthAdjustUnits, true ) m_trackWidthCorrection( aParent, m_widthAdjustLabel, m_widthAdjustCtrl, m_widthAdjustUnits, true )
{ {
@ -106,8 +105,6 @@ void DIALOG_PLOT::init_Dialog()
// Set units and value for HPGL pen size (this param is in mils). // Set units and value for HPGL pen size (this param is in mils).
m_defaultPenSize.SetValue( m_plotOpts.GetHPGLPenDiameter() * IU_PER_MILS ); m_defaultPenSize.SetValue( m_plotOpts.GetHPGLPenDiameter() * IU_PER_MILS );
m_defaultLineWidth.SetValue( m_plotOpts.GetLineWidth() );
// Test for a reasonable scale value. Set to 1 if problem // Test for a reasonable scale value. Set to 1 if problem
if( m_XScaleAdjust < PLOT_MIN_SCALE || m_YScaleAdjust < PLOT_MIN_SCALE if( m_XScaleAdjust < PLOT_MIN_SCALE || m_YScaleAdjust < PLOT_MIN_SCALE
|| m_XScaleAdjust > PLOT_MAX_SCALE || m_YScaleAdjust > PLOT_MAX_SCALE ) || m_XScaleAdjust > PLOT_MAX_SCALE || m_YScaleAdjust > PLOT_MAX_SCALE )
@ -164,7 +161,7 @@ void DIALOG_PLOT::init_Dialog()
m_excludeEdgeLayerOpt->SetValue( m_plotOpts.GetExcludeEdgeLayer() ); m_excludeEdgeLayerOpt->SetValue( m_plotOpts.GetExcludeEdgeLayer() );
// Option to exclude pads from silkscreen layers // Option to exclude pads from silkscreen layers
m_excludePadsFromSilkscreen->SetValue( !m_plotOpts.GetPlotPadsOnSilkLayer() ); m_sketchPadsOnFabLayers->SetValue( m_plotOpts.GetSketchPadsOnFabLayers() );
// Option to tent vias // Option to tent vias
m_subtractMaskFromSilk->SetValue( m_plotOpts.GetSubtractMaskFromSilk() ); m_subtractMaskFromSilk->SetValue( m_plotOpts.GetSubtractMaskFromSilk() );
@ -412,7 +409,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotMirrorOpt->Enable( true ); m_plotMirrorOpt->Enable( true );
m_useAuxOriginCheckBox->Enable( false ); m_useAuxOriginCheckBox->Enable( false );
m_useAuxOriginCheckBox->SetValue( false ); m_useAuxOriginCheckBox->SetValue( false );
m_defaultLineWidth.Enable( true );
m_defaultPenSize.Enable( false ); m_defaultPenSize.Enable( false );
m_excludeEdgeLayerOpt->Enable( true ); m_excludeEdgeLayerOpt->Enable( true );
m_scaleOpt->Enable( false ); m_scaleOpt->Enable( false );
@ -436,7 +432,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotMirrorOpt->Enable( true ); m_plotMirrorOpt->Enable( true );
m_useAuxOriginCheckBox->Enable( false ); m_useAuxOriginCheckBox->Enable( false );
m_useAuxOriginCheckBox->SetValue( false ); m_useAuxOriginCheckBox->SetValue( false );
m_defaultLineWidth.Enable( true );
m_defaultPenSize.Enable( false ); m_defaultPenSize.Enable( false );
m_excludeEdgeLayerOpt->Enable( true ); m_excludeEdgeLayerOpt->Enable( true );
m_scaleOpt->Enable( true ); m_scaleOpt->Enable( true );
@ -461,7 +456,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotMirrorOpt->Enable( false ); m_plotMirrorOpt->Enable( false );
m_plotMirrorOpt->SetValue( false ); m_plotMirrorOpt->SetValue( false );
m_useAuxOriginCheckBox->Enable( true ); m_useAuxOriginCheckBox->Enable( true );
m_defaultLineWidth.Enable( true );
m_defaultPenSize.Enable( false ); m_defaultPenSize.Enable( false );
m_excludeEdgeLayerOpt->Enable( true ); m_excludeEdgeLayerOpt->Enable( true );
m_scaleOpt->Enable( false ); m_scaleOpt->Enable( false );
@ -487,7 +481,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotMirrorOpt->Enable( true ); m_plotMirrorOpt->Enable( true );
m_useAuxOriginCheckBox->Enable( false ); m_useAuxOriginCheckBox->Enable( false );
m_useAuxOriginCheckBox->SetValue( false ); m_useAuxOriginCheckBox->SetValue( false );
m_defaultLineWidth.Enable( false );
m_defaultPenSize.Enable( true ); m_defaultPenSize.Enable( true );
m_excludeEdgeLayerOpt->Enable( true ); m_excludeEdgeLayerOpt->Enable( true );
m_scaleOpt->Enable( true ); m_scaleOpt->Enable( true );
@ -512,7 +505,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotMirrorOpt->Enable( false ); m_plotMirrorOpt->Enable( false );
m_plotMirrorOpt->SetValue( false ); m_plotMirrorOpt->SetValue( false );
m_useAuxOriginCheckBox->Enable( true ); m_useAuxOriginCheckBox->Enable( true );
m_defaultLineWidth.Enable( false );
m_defaultPenSize.Enable( false ); m_defaultPenSize.Enable( false );
m_excludeEdgeLayerOpt->Enable( true ); m_excludeEdgeLayerOpt->Enable( true );
m_scaleOpt->Enable( false ); m_scaleOpt->Enable( false );
@ -595,7 +587,7 @@ void DIALOG_PLOT::applyPlotSettings()
tempOptions.SetExcludeEdgeLayer( m_excludeEdgeLayerOpt->GetValue() ); tempOptions.SetExcludeEdgeLayer( m_excludeEdgeLayerOpt->GetValue() );
tempOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() ); tempOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() );
tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() ); tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() );
tempOptions.SetPlotPadsOnSilkLayer( !m_excludePadsFromSilkscreen->GetValue() ); tempOptions.SetSketchPadsOnFabLayers( m_sketchPadsOnFabLayers->GetValue());
tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() ); tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() );
tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() ); tempOptions.SetPlotValue( m_plotModuleValueOpt->GetValue() );
tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() ); tempOptions.SetPlotReference( m_plotModuleRefOpt->GetValue() );
@ -640,14 +632,6 @@ void DIALOG_PLOT::applyPlotSettings()
else // keep the last value (initial value if no HPGL plot made) else // keep the last value (initial value if no HPGL plot made)
tempOptions.SetHPGLPenDiameter( m_plotOpts.GetHPGLPenDiameter() ); tempOptions.SetHPGLPenDiameter( m_plotOpts.GetHPGLPenDiameter() );
// Default linewidth
if( !tempOptions.SetLineWidth( m_defaultLineWidth.GetValue() ) )
{
m_defaultLineWidth.SetValue( tempOptions.GetLineWidth() );
msg.Printf( _( "Default line width constrained." ) );
reporter.Report( msg, RPT_SEVERITY_INFO );
}
// X scale // X scale
double tmpDouble; double tmpDouble;
msg = m_fineAdjustXCtrl->GetValue(); msg = m_fineAdjustXCtrl->GetValue();
@ -754,6 +738,8 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
applyPlotSettings(); applyPlotSettings();
m_plotOpts.SetSketchPadLineWidth( board->GetDesignSettings().GetLineThickness( F_Fab ) );
// If no layer selected, we have nothing plotted. // If no layer selected, we have nothing plotted.
// Prompt user if it happens because he could think there is a bug in Pcbnew. // Prompt user if it happens because he could think there is a bug in Pcbnew.
if( !m_plotOpts.GetLayerSelection().any() ) if( !m_plotOpts.GetLayerSelection().any() )

View File

@ -56,7 +56,6 @@ private:
int m_widthAdjustMinValue; // Global track width limits int m_widthAdjustMinValue; // Global track width limits
int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
// m_PSWidthAdjust to these limits. // m_PSWidthAdjust to these limits.
UNIT_BINDER m_defaultLineWidth;
UNIT_BINDER m_defaultPenSize; UNIT_BINDER m_defaultPenSize;
UNIT_BINDER m_trackWidthCorrection; UNIT_BINDER m_trackWidthCorrection;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019) // C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -97,10 +97,10 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
gbSizer1->Add( m_excludeEdgeLayerOpt, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); gbSizer1->Add( m_excludeEdgeLayerOpt, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_excludePadsFromSilkscreen = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Exclude pads from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 ); m_sketchPadsOnFabLayers = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Sketch pads on fab layers"), wxDefaultPosition, wxDefaultSize, 0 );
m_excludePadsFromSilkscreen->SetToolTip( _("Do not plot pads on silkscreen layers, even when they are assigned to them.\nUncheck this if you wish to create assembly drawings from silkscreen layers.") ); m_sketchPadsOnFabLayers->SetToolTip( _("Do not plot pads on silkscreen layers, even when they are assigned to them.\nUncheck this if you wish to create assembly drawings from silkscreen layers.") );
gbSizer1->Add( m_excludePadsFromSilkscreen, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); gbSizer1->Add( m_sketchPadsOnFabLayers, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_plotNoViaOnMaskOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotNoViaOnMaskOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias") ); m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias") );
@ -110,7 +110,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_useAuxOriginCheckBox = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 ); m_useAuxOriginCheckBox = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 );
m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in plot files") ); m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in plot files") );
gbSizer1->Add( m_useAuxOriginCheckBox, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); gbSizer1->Add( m_useAuxOriginCheckBox, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
drillMarksLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 ); drillMarksLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Drill marks:"), wxDefaultPosition, wxDefaultSize, 0 );
drillMarksLabel->Wrap( -1 ); drillMarksLabel->Wrap( -1 );
@ -142,22 +142,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_plotModeOpt->SetSelection( 0 ); m_plotModeOpt->SetSelection( 0 );
gbSizer1->Add( m_plotModeOpt, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 5 ); gbSizer1->Add( m_plotModeOpt, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT, 5 );
m_lineWidthLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthLabel->Wrap( -1 );
m_lineWidthLabel->SetToolTip( _("Pen size used to draw items that have no pen size specified.\nUsed mainly to draw items in sketch mode.") );
gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
m_lineWidthCtrl = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthCtrl->SetToolTip( _("Line width for, e.g., sheet references.") );
m_lineWidthCtrl->SetMinSize( wxSize( 120,-1 ) );
gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxLEFT, 5 );
m_lineWidthUnits = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthUnits->Wrap( -1 );
gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_plotMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_MIROR_OPT, _("Mirrored plot"), wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_plotMirrorOpt, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); gbSizer1->Add( m_plotMirrorOpt, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
@ -165,7 +149,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
gbSizer1->Add( m_plotPSNegativeOpt, wxGBPosition( 5, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); gbSizer1->Add( m_plotPSNegativeOpt, wxGBPosition( 5, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
m_zoneFillCheck = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Check zone fills before plotting"), wxDefaultPosition, wxDefaultSize, 0 ); m_zoneFillCheck = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Check zone fills before plotting"), wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_zoneFillCheck, wxGBPosition( 7, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 30 ); gbSizer1->Add( m_zoneFillCheck, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 30 );
gbSizer1->AddGrowableCol( 0 ); gbSizer1->AddGrowableCol( 0 );

View File

@ -14,7 +14,6 @@
<property name="file">dialog_plot_base</property> <property name="file">dialog_plot_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property> <property name="indent_with_spaces"></property>
<property name="internationalize">1</property> <property name="internationalize">1</property>
<property name="name">Dialog_Plot_base</property> <property name="name">Dialog_Plot_base</property>
@ -26,7 +25,6 @@
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property> <property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
@ -901,7 +899,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_ALLOW_PRINT_PAD_ON_SILKSCREEN</property> <property name="id">ID_ALLOW_PRINT_PAD_ON_SILKSCREEN</property>
<property name="label">Exclude pads from silkscreen</property> <property name="label">Sketch pads on fab layers</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -909,7 +907,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_excludePadsFromSilkscreen</property> <property name="name">m_sketchPadsOnFabLayers</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -1000,11 +998,11 @@
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">5</property> <property name="border">30</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="row">7</property> <property name="row">3</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxCheckBox" expanded="0"> <object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1460,201 +1458,6 @@
<property name="window_style"></property> <property name="window_style"></property>
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="0">
<property name="border">30</property>
<property name="colspan">1</property>
<property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="row">3</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Default line width:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_lineWidthLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Pen size used to draw items that have no pen size specified.&#x0A;Used mainly to draw items in sketch mode.</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="gbsizeritem" expanded="0">
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">2</property>
<property name="flag">wxLEFT</property>
<property name="row">3</property>
<property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">120,-1</property>
<property name="moveable">1</property>
<property name="name">m_lineWidthCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Line width for, e.g., sheet references.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="gbsizeritem" expanded="0">
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">3</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="row">3</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">mm</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_lineWidthUnits</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="gbsizeritem" expanded="0"> <object class="gbsizeritem" expanded="0">
<property name="border">30</property> <property name="border">30</property>
<property name="colspan">2</property> <property name="colspan">2</property>
@ -1793,8 +1596,8 @@
<property name="border">30</property> <property name="border">30</property>
<property name="colspan">2</property> <property name="colspan">2</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="row">7</property> <property name="row">6</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxCheckBox" expanded="0"> <object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019) // C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -72,7 +72,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
wxCheckBox* m_plotModuleRefOpt; wxCheckBox* m_plotModuleRefOpt;
wxCheckBox* m_plotInvisibleText; wxCheckBox* m_plotInvisibleText;
wxCheckBox* m_excludeEdgeLayerOpt; wxCheckBox* m_excludeEdgeLayerOpt;
wxCheckBox* m_excludePadsFromSilkscreen; wxCheckBox* m_sketchPadsOnFabLayers;
wxCheckBox* m_plotNoViaOnMaskOpt; wxCheckBox* m_plotNoViaOnMaskOpt;
wxCheckBox* m_useAuxOriginCheckBox; wxCheckBox* m_useAuxOriginCheckBox;
wxStaticText* drillMarksLabel; wxStaticText* drillMarksLabel;
@ -81,9 +81,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
wxChoice* m_scaleOpt; wxChoice* m_scaleOpt;
wxStaticText* plotModeLabel; wxStaticText* plotModeLabel;
wxChoice* m_plotModeOpt; wxChoice* m_plotModeOpt;
wxStaticText* m_lineWidthLabel;
wxTextCtrl* m_lineWidthCtrl;
wxStaticText* m_lineWidthUnits;
wxCheckBox* m_plotMirrorOpt; wxCheckBox* m_plotMirrorOpt;
wxCheckBox* m_plotPSNegativeOpt; wxCheckBox* m_plotPSNegativeOpt;
wxCheckBox* m_zoneFillCheck; wxCheckBox* m_zoneFillCheck;

View File

@ -23,7 +23,6 @@
#include <fctsys.h> #include <fctsys.h>
#include <pcbnew.h> #include <pcbnew.h>
#include <board_design_settings.h>
#include <widgets/paged_dialog.h> #include <widgets/paged_dialog.h>
#include <footprint_edit_frame.h> #include <footprint_edit_frame.h>
#include <widgets/wx_grid.h> #include <widgets/wx_grid.h>
@ -48,6 +47,7 @@ enum
ROW_COPPER, ROW_COPPER,
ROW_EDGES, ROW_EDGES,
ROW_COURTYARD, ROW_COURTYARD,
ROW_FAB,
ROW_OTHERS, ROW_OTHERS,
ROW_COUNT ROW_COUNT
@ -157,7 +157,7 @@ bool PANEL_MODEDIT_DEFAULTS::validateData()
return false; return false;
// Test text parameters. // Test text parameters.
for( int row : { ROW_SILK, ROW_COPPER, ROW_OTHERS } ) for( int row : { ROW_SILK, ROW_COPPER, ROW_FAB, ROW_OTHERS } )
{ {
int textSize = std::min( getGridValue( row, COL_TEXT_WIDTH ), int textSize = std::min( getGridValue( row, COL_TEXT_WIDTH ),
getGridValue( row, COL_TEXT_HEIGHT ) ); getGridValue( row, COL_TEXT_HEIGHT ) );

View File

@ -97,7 +97,7 @@ PANEL_MODEDIT_DEFAULTS_BASE::PANEL_MODEDIT_DEFAULTS_BASE( wxWindow* parent, wxWi
m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
// Grid // Grid
m_grid->CreateGrid( 5, 5 ); m_grid->CreateGrid( 6, 5 );
m_grid->EnableEditing( true ); m_grid->EnableEditing( true );
m_grid->EnableGridLines( true ); m_grid->EnableGridLines( true );
m_grid->EnableDragGridSize( false ); m_grid->EnableDragGridSize( false );
@ -126,7 +126,8 @@ PANEL_MODEDIT_DEFAULTS_BASE::PANEL_MODEDIT_DEFAULTS_BASE( wxWindow* parent, wxWi
m_grid->SetRowLabelValue( 1, _("Copper Layers") ); m_grid->SetRowLabelValue( 1, _("Copper Layers") );
m_grid->SetRowLabelValue( 2, _("Edge Cuts") ); m_grid->SetRowLabelValue( 2, _("Edge Cuts") );
m_grid->SetRowLabelValue( 3, _("Courtyards") ); m_grid->SetRowLabelValue( 3, _("Courtyards") );
m_grid->SetRowLabelValue( 4, _("Other Layers") ); m_grid->SetRowLabelValue( 4, _("Fab Layers") );
m_grid->SetRowLabelValue( 5, _("Other Layers") );
m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER ); m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
// Label Appearance // Label Appearance

View File

@ -873,10 +873,10 @@
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_LEFT</property> <property name="row_label_horiz_alignment">wxALIGN_LEFT</property>
<property name="row_label_size">125</property> <property name="row_label_size">125</property>
<property name="row_label_values">&quot;Silk Layers&quot; &quot;Copper Layers&quot; &quot;Edge Cuts&quot; &quot;Courtyards&quot; &quot;Other Layers&quot;</property> <property name="row_label_values">&quot;Silk Layers&quot; &quot;Copper Layers&quot; &quot;Edge Cuts&quot; &quot;Courtyards&quot; &quot;Fab Layers&quot; &quot;Other Layers&quot;</property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property> <property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property> <property name="row_sizes"></property>
<property name="rows">5</property> <property name="rows">6</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property> <property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>

View File

@ -47,6 +47,7 @@ enum
ROW_COPPER, ROW_COPPER,
ROW_EDGES, ROW_EDGES,
ROW_COURTYARD, ROW_COURTYARD,
ROW_FAB,
ROW_OTHERS, ROW_OTHERS,
ROW_COUNT ROW_COUNT
@ -150,7 +151,7 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::validateData()
return false; return false;
// Test text parameters. // Test text parameters.
for( int row : { ROW_SILK, ROW_COPPER, ROW_OTHERS } ) for( int row : { ROW_SILK, ROW_COPPER, ROW_FAB, ROW_OTHERS } )
{ {
int textSize = std::min( getGridValue( row, COL_TEXT_WIDTH ), int textSize = std::min( getGridValue( row, COL_TEXT_WIDTH ),
getGridValue( row, COL_TEXT_HEIGHT ) ); getGridValue( row, COL_TEXT_HEIGHT ) );

View File

@ -25,7 +25,7 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
// Grid // Grid
m_grid->CreateGrid( 5, 6 ); m_grid->CreateGrid( 6, 6 );
m_grid->EnableEditing( true ); m_grid->EnableEditing( true );
m_grid->EnableGridLines( true ); m_grid->EnableGridLines( true );
m_grid->EnableDragGridSize( false ); m_grid->EnableDragGridSize( false );
@ -56,7 +56,8 @@ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow
m_grid->SetRowLabelValue( 1, _("Copper Layers") ); m_grid->SetRowLabelValue( 1, _("Copper Layers") );
m_grid->SetRowLabelValue( 2, _("Edge Cuts") ); m_grid->SetRowLabelValue( 2, _("Edge Cuts") );
m_grid->SetRowLabelValue( 3, _("Courtyards") ); m_grid->SetRowLabelValue( 3, _("Courtyards") );
m_grid->SetRowLabelValue( 4, _("Other Layers") ); m_grid->SetRowLabelValue( 4, _("Fab Layers") );
m_grid->SetRowLabelValue( 5, _("Other Layers") );
m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER ); m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
// Label Appearance // Label Appearance

View File

@ -198,10 +198,10 @@
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_LEFT</property> <property name="row_label_horiz_alignment">wxALIGN_LEFT</property>
<property name="row_label_size">132</property> <property name="row_label_size">132</property>
<property name="row_label_values">&quot;Silk Layers&quot; &quot;Copper Layers&quot; &quot;Edge Cuts&quot; &quot;Courtyards&quot; &quot;Other Layers&quot;</property> <property name="row_label_values">&quot;Silk Layers&quot; &quot;Copper Layers&quot; &quot;Edge Cuts&quot; &quot;Courtyards&quot; &quot;Fab Layers&quot; &quot;Other Layers&quot;</property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property> <property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property> <property name="row_sizes"></property>
<property name="rows">5</property> <property name="rows">6</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property> <property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>

View File

@ -310,7 +310,7 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename,
for( auto item : footprint->GraphicalItems() ) for( auto item : footprint->GraphicalItems() )
{ {
if( item->Type() == PCB_MODULE_EDGE_T && item->GetLayer() == Edge_Cuts ) if( item->Type() == PCB_MODULE_EDGE_T && item->GetLayer() == Edge_Cuts )
brd_plotter.Plot_1_EdgeModule( (EDGE_MODULE*) item ); brd_plotter.PlotFootprintGraphicItem((EDGE_MODULE*) item );
} }
} }
} }

View File

@ -116,6 +116,26 @@ FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ), Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
MM_PER_IU ) ); MM_PER_IU ) );
m_params.emplace_back( new PARAM_SCALED<int>( "design_settings.fab_line_width",
&m_DesignSettings.m_LineThickness[ LAYER_CLASS_FAB ],
Millimeter2iu( DEFAULT_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
MM_PER_IU ) );
m_params.emplace_back( new PARAM_SCALED<int>( "design_settings.fab_text_size_h",
&m_DesignSettings.m_TextSize[ LAYER_CLASS_FAB ].x,
Millimeter2iu( DEFAULT_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE, MM_PER_IU ) );
m_params.emplace_back( new PARAM_SCALED<int>( "design_settings.fab_text_size_v",
&m_DesignSettings.m_TextSize[ LAYER_CLASS_FAB ].y,
Millimeter2iu( DEFAULT_TEXT_SIZE ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE, MM_PER_IU ) );
m_params.emplace_back( new PARAM_SCALED<int>( "design_settings.fab_text_thickness",
&m_DesignSettings.m_TextThickness[ LAYER_CLASS_FAB ],
Millimeter2iu( DEFAULT_TEXT_WIDTH ), 1, TEXTS_MAX_WIDTH, MM_PER_IU ) );
m_params.emplace_back( new PARAM<bool>( "design_settings.fab_text_italic",
&m_DesignSettings.m_TextItalic[ LAYER_CLASS_FAB ], false ) );
m_params.emplace_back( new PARAM_SCALED<int>( "design_settings.others_line_width", m_params.emplace_back( new PARAM_SCALED<int>( "design_settings.others_line_width",
&m_DesignSettings.m_LineThickness[ LAYER_CLASS_OTHERS ], &m_DesignSettings.m_LineThickness[ LAYER_CLASS_OTHERS ],
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ), Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),

View File

@ -627,6 +627,15 @@ void PCB_IO::formatDefaults( const BOARD_DESIGN_SETTINGS& aSettings, int aNestLe
aSettings.m_TextItalic[ LAYER_CLASS_SILK ] ? " italic" : "", aSettings.m_TextItalic[ LAYER_CLASS_SILK ] ? " italic" : "",
aSettings.m_TextUpright[ LAYER_CLASS_SILK ] ? " keep_upright" : "" ); aSettings.m_TextUpright[ LAYER_CLASS_SILK ] ? " keep_upright" : "" );
m_out->Print( aNestLevel+1, "(fab_layers_line_width %s)\n",
FormatInternalUnits( aSettings.m_LineThickness[ LAYER_CLASS_FAB ] ).c_str() );
m_out->Print( aNestLevel+1, "(fab_layers_text_dims (size %s %s) (thickness %s)%s%s)\n",
FormatInternalUnits( aSettings.m_TextSize[ LAYER_CLASS_FAB ].x ).c_str(),
FormatInternalUnits( aSettings.m_TextSize[ LAYER_CLASS_FAB ].y ).c_str(),
FormatInternalUnits( aSettings.m_TextThickness[ LAYER_CLASS_FAB ] ).c_str(),
aSettings.m_TextItalic[ LAYER_CLASS_OTHERS ] ? " italic" : "",
aSettings.m_TextUpright[ LAYER_CLASS_OTHERS ] ? " keep_upright" : "" );
m_out->Print( aNestLevel+1, "(other_layers_line_width %s)\n", m_out->Print( aNestLevel+1, "(other_layers_line_width %s)\n",
FormatInternalUnits( aSettings.m_LineThickness[ LAYER_CLASS_OTHERS ] ).c_str() ); FormatInternalUnits( aSettings.m_LineThickness[ LAYER_CLASS_OTHERS ] ).c_str() );
m_out->Print( aNestLevel+1, "(other_layers_text_dims (size %s %s) (thickness %s)%s%s)\n", m_out->Print( aNestLevel+1, "(other_layers_text_dims (size %s %s) (thickness %s)%s%s)\n",

View File

@ -1734,6 +1734,15 @@ void PCB_PARSER::parseDefaults( BOARD_DESIGN_SETTINGS& designSettings )
parseDefaultTextDims( designSettings, LAYER_CLASS_SILK ); parseDefaultTextDims( designSettings, LAYER_CLASS_SILK );
break; break;
case T_fab_layers_line_width:
designSettings.m_LineThickness[ LAYER_CLASS_FAB ] = parseBoardUnits( token );
NeedRIGHT();
break;
case T_fab_layers_text_dims:
parseDefaultTextDims( designSettings, LAYER_CLASS_FAB );
break;
case T_other_layers_line_width: case T_other_layers_line_width:
designSettings.m_LineThickness[ LAYER_CLASS_OTHERS ] = parseBoardUnits( token ); designSettings.m_LineThickness[ LAYER_CLASS_OTHERS ] = parseBoardUnits( token );
NeedRIGHT(); NeedRIGHT();

View File

@ -126,7 +126,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
m_plotReference = true; m_plotReference = true;
m_plotValue = true; m_plotValue = true;
m_plotInvisibleText = false; m_plotInvisibleText = false;
m_plotPadsOnSilkLayer = false; m_sketchPadsOnFabLayers = false;
m_subtractMaskFromSilk = false; m_subtractMaskFromSilk = false;
m_format = PLOT_FORMAT::GERBER; m_format = PLOT_FORMAT::GERBER;
m_mirror = false; m_mirror = false;
@ -248,8 +248,8 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
m_plotValue ? trueStr : falseStr ); m_plotValue ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotinvisibletext ), aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotinvisibletext ),
m_plotInvisibleText ? trueStr : falseStr ); m_plotInvisibleText ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_padsonsilk ), aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_sketchpadsonfab ),
m_plotPadsOnSilkLayer ? trueStr : falseStr ); m_sketchPadsOnFabLayers ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_subtractmaskfromsilk ), aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_subtractmaskfromsilk ),
m_subtractMaskFromSilk ? trueStr : falseStr ); m_subtractMaskFromSilk ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_outputformat ), aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_outputformat ),
@ -326,7 +326,7 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCom
return false; return false;
if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText ) if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText )
return false; return false;
if( m_plotPadsOnSilkLayer != aPcbPlotParams.m_plotPadsOnSilkLayer ) if( m_sketchPadsOnFabLayers != aPcbPlotParams.m_sketchPadsOnFabLayers )
return false; return false;
if( m_subtractMaskFromSilk != aPcbPlotParams.m_subtractMaskFromSilk ) if( m_subtractMaskFromSilk != aPcbPlotParams.m_subtractMaskFromSilk )
return false; return false;
@ -374,11 +374,6 @@ bool PCB_PLOT_PARAMS::SetHPGLPenSpeed( int aValue )
} }
bool PCB_PLOT_PARAMS::SetLineWidth( int aValue )
{
return setInt( &m_lineWidth, aValue, PLOT_LINEWIDTH_MIN, PLOT_LINEWIDTH_MAX );
}
// PCB_PLOT_PARAMS_PARSER // PCB_PLOT_PARAMS_PARSER
PCB_PLOT_PARAMS_PARSER::PCB_PLOT_PARAMS_PARSER( LINE_READER* aReader ) : PCB_PLOT_PARAMS_PARSER::PCB_PLOT_PARAMS_PARSER( LINE_READER* aReader ) :
@ -480,17 +475,6 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
aPcbPlotParams->m_excludeEdgeLayer = parseBool(); aPcbPlotParams->m_excludeEdgeLayer = parseBool();
break; break;
case T_linewidth:
{
// Due to a bug, this (minor) parameter was saved in biu
// and now is saved in mm
// If the read value is outside bounds, force a default value
double tmp = parseDouble();
if( !aPcbPlotParams->SetLineWidth( KiROUND( tmp * IU_PER_MM ) ) )
aPcbPlotParams->SetLineWidth( PLOT_LINEWIDTH_DEFAULT );
}
break;
case T_plotframeref: case T_plotframeref:
aPcbPlotParams->m_plotFrameRef = parseBool(); aPcbPlotParams->m_plotFrameRef = parseBool();
break; break;
@ -546,8 +530,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
aPcbPlotParams->m_plotInvisibleText = parseBool(); aPcbPlotParams->m_plotInvisibleText = parseBool();
break; break;
case T_padsonsilk: case T_sketchpadsonfab:
aPcbPlotParams->m_plotPadsOnSilkLayer= parseBool(); aPcbPlotParams->m_sketchPadsOnFabLayers= parseBool();
break; break;
case T_subtractmaskfromsilk: case T_subtractmaskfromsilk:

View File

@ -155,8 +155,9 @@ private:
/// Force plotting of fields marked invisible /// Force plotting of fields marked invisible
bool m_plotInvisibleText; bool m_plotInvisibleText;
/// Allows pads outlines on silkscreen layer (when pads are also on silk screen) /// Plots pads outlines on fab layers
bool m_plotPadsOnSilkLayer; bool m_sketchPadsOnFabLayers;
int m_sketchPadLineWidth;
/* These next two scale factors are intended to compensate plotters /* These next two scale factors are intended to compensate plotters
* (mainly printers) X and Y scale error. Therefore they are expected very * (mainly printers) X and Y scale error. Therefore they are expected very
@ -256,8 +257,10 @@ public:
void SetMirror( bool aFlag ) { m_mirror = aFlag; } void SetMirror( bool aFlag ) { m_mirror = aFlag; }
bool GetMirror() const { return m_mirror; } bool GetMirror() const { return m_mirror; }
void SetPlotPadsOnSilkLayer( bool aFlag ) { m_plotPadsOnSilkLayer = aFlag; } void SetSketchPadsOnFabLayers( bool aFlag ) { m_sketchPadsOnFabLayers = aFlag; }
bool GetPlotPadsOnSilkLayer() const { return m_plotPadsOnSilkLayer; } bool GetSketchPadsOnFabLayers() const { return m_sketchPadsOnFabLayers; }
void SetSketchPadLineWidth( int aWidth ) { m_sketchPadLineWidth = aWidth; }
int GetSketchPadLineWidth() const { return m_sketchPadLineWidth; }
void SetPlotInvisibleText( bool aFlag ) { m_plotInvisibleText = aFlag; } void SetPlotInvisibleText( bool aFlag ) { m_plotInvisibleText = aFlag; }
bool GetPlotInvisibleText() const { return m_plotInvisibleText; } bool GetPlotInvisibleText() const { return m_plotInvisibleText; }
@ -342,9 +345,6 @@ public:
void SetHPGLPenNum( int aVal ) { m_HPGLPenNum = aVal; } void SetHPGLPenNum( int aVal ) { m_HPGLPenNum = aVal; }
int GetHPGLPenNum() const { return m_HPGLPenNum; } int GetHPGLPenNum() const { return m_HPGLPenNum; }
int GetLineWidth() const { return m_lineWidth; };
bool SetLineWidth( int aValue );
}; };

View File

@ -90,18 +90,15 @@ public:
// Basic functions to plot a board item // Basic functions to plot a board item
void SetLayerSet( LSET aLayerMask ) { m_layerMask = aLayerMask; } void SetLayerSet( LSET aLayerMask ) { m_layerMask = aLayerMask; }
void Plot_Edges_Modules(); void PlotFootprintGraphicItems( MODULE* aModule );
void Plot_1_EdgeModule( EDGE_MODULE* aEdge ); void PlotFootprintGraphicItem( EDGE_MODULE* aEdge );
void PlotTextModule( TEXTE_MODULE* aTextMod, COLOR4D aColor ); void PlotFootprintTextItem( TEXTE_MODULE* aTextMod, COLOR4D aColor );
/* /*
* Plot field of a module (footprint) * Reference, Value, and other fields are plotted only if the corresponding option is enabled.
* Reference, Value, and other fields are plotted only if * Invisible text fields are plotted only if PlotInvisibleText option is set.
* the corresponding option is enabled
* Invisible text fields are plotted only if PlotInvisibleText option is set
* usually they are not plotted.
*/ */
bool PlotAllTextsModule( MODULE* aModule ); void PlotFootprintTextItems( MODULE* aModule );
void PlotDimension( DIMENSION* Dimension ); void PlotDimension( DIMENSION* Dimension );
void PlotPcbTarget( PCB_TARGET* PtMire ); void PlotPcbTarget( PCB_TARGET* PtMire );
@ -206,19 +203,6 @@ void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask,
void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter, void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter,
LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt ); LSET aLayerMask, const PCB_PLOT_PARAMS& aPlotOpt );
/**
* Function PlotSilkScreen
* plot silkscreen layers which have specific requirements, mainly for pads.
* Should not be used for other layers
* @param aBoard = the board to plot
* @param aPlotter = the plotter to use
* @param aLayerMask = the mask to define the layers to plot (silkscreen Front and/or Back)
* @param aPlotOpt = the plot options (files, sketch). Has meaning for some formats only
*/
void PlotSilkScreen( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask,
const PCB_PLOT_PARAMS& aPlotOpt );
/** /**
* Function BuildPlotFileName (helper function) * Function BuildPlotFileName (helper function)
* Complete a plot filename: forces the output directory, * Complete a plot filename: forces the output directory,

View File

@ -62,94 +62,6 @@
static void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask, static void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
const PCB_PLOT_PARAMS& aPlotOpt, int aMinThickness ); const PCB_PLOT_PARAMS& aPlotOpt, int aMinThickness );
/*
* Creates the plot for silkscreen layers. Silkscreen layers have specific requirement for
* pads (not filled) and texts (with option to remove them from some copper areas (pads...)
*/
void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
const PCB_PLOT_PARAMS& aPlotOpt )
{
BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt );
itemplotter.SetLayerSet( aLayerMask );
// Plot edge layer and graphic items
itemplotter.PlotBoardGraphicItems();
// Plot footprint outlines :
itemplotter.Plot_Edges_Modules();
// Plot pads (creates pads outlines, for pads on silkscreen layers)
LSET layersmask_plotpads = aLayerMask;
// Calculate the mask layers of allowed layers for pads
if( !aPlotOpt.GetPlotPadsOnSilkLayer() ) // Do not plot pads on silk screen layers
layersmask_plotpads.set( B_SilkS, false ).set( F_SilkS, false );
if( layersmask_plotpads.any() )
{
for( auto Module : aBoard->Modules() )
{
aPlotter->StartBlock( NULL );
for( auto pad : Module->Pads() )
{
// See if the pad is on this layer
LSET masklayer = pad->GetLayerSet();
if( !( masklayer & layersmask_plotpads ).any() )
continue;
COLOR4D color = COLOR4D::BLACK;
if( layersmask_plotpads[B_SilkS] )
color = aPlotter->RenderSettings()->GetLayerColor( B_SilkS );
else if( layersmask_plotpads[F_SilkS] )
color = aPlotter->RenderSettings()->GetLayerColor( F_SilkS );
itemplotter.PlotPad( pad, color, SKETCH );
}
aPlotter->EndBlock( NULL );
}
}
// Plot footprints fields (ref, value ...)
for( auto module : aBoard->Modules() )
{
if( ! itemplotter.PlotAllTextsModule( module ) )
{
wxLogMessage( _( "Your BOARD has a bad layer number for footprint %s" ),
module->GetReference() );
}
}
// Plot filled areas
aPlotter->StartBlock( NULL );
// Plot all zones together so we don't end up with divots where zones touch each other.
ZONE_CONTAINER* zone = nullptr;
SHAPE_POLY_SET aggregateArea;
for( ZONE_CONTAINER* candidate : aBoard->Zones() )
{
if( !aLayerMask[ candidate->GetLayer() ] )
continue;
if( !zone )
zone = candidate;
aggregateArea.BooleanAdd( candidate->GetFilledPolysList(), SHAPE_POLY_SET::PM_FAST );
}
if( zone )
{
aggregateArea.Fracture( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
itemplotter.PlotFilledAreas( zone, aggregateArea );
}
aPlotter->EndBlock( NULL );
}
void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, PCB_LAYER_ID aLayer, void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, PCB_LAYER_ID aLayer,
const PCB_PLOT_PARAMS& aPlotOpt ) const PCB_PLOT_PARAMS& aPlotOpt )
{ {
@ -227,7 +139,7 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, PCB_LAYER_ID aLayer,
// and must not be used for other plot formats // and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
else else
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt );
// Gerber: Subtract soldermask from silkscreen if enabled // Gerber: Subtract soldermask from silkscreen if enabled
if( aPlotter->GetPlotterType() == PLOT_FORMAT::GERBER if( aPlotter->GetPlotterType() == PLOT_FORMAT::GERBER
@ -270,7 +182,7 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, PCB_LAYER_ID aLayer,
// and must not be used for other plot formats // and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt ); PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
else else
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt ); PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt );
break; break;
default: default:
@ -300,58 +212,51 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
itemplotter.SetLayerSet( aLayerMask ); itemplotter.SetLayerSet( aLayerMask );
EDA_DRAW_MODE_T plotMode = aPlotOpt.GetPlotMode(); EDA_DRAW_MODE_T plotMode = aPlotOpt.GetPlotMode();
bool onCopperLayer = ( LSET::AllCuMask() & aLayerMask ).any();
bool onSolderMaskLayer = ( LSET( 2, F_Mask, B_Mask ) & aLayerMask ).any();
bool onSolderPasteLayer = ( LSET( 2, F_Paste, B_Paste ) & aLayerMask ).any();
bool onFabLayer = ( LSET( 2, F_Fab, B_Fab ) & aLayerMask ).any();
bool sketchPads = onFabLayer && aPlotOpt.GetSketchPadsOnFabLayers();
// Plot edge layer and graphic items // Plot edge layer and graphic items
itemplotter.PlotBoardGraphicItems(); itemplotter.PlotBoardGraphicItems();
// Draw footprint texts: // Draw footprint texts:
for( auto module : aBoard->Modules() ) for( MODULE* module : aBoard->Modules() )
{ itemplotter.PlotFootprintTextItems( module );
if( ! itemplotter.PlotAllTextsModule( module ) )
{
wxLogMessage( _( "Your BOARD has a bad layer number for footprint %s" ),
module->GetReference() );
}
}
// Draw footprint other graphic items: // Draw footprint other graphic items:
for( auto module : aBoard->Modules() ) for( MODULE* module : aBoard->Modules() )
{ itemplotter.PlotFootprintGraphicItems( module );
for( auto item : module->GraphicalItems() )
{
if( item->Type() == PCB_MODULE_EDGE_T && aLayerMask[ item->GetLayer() ] )
itemplotter.Plot_1_EdgeModule( (EDGE_MODULE*) item );
}
}
// Plot footprint pads // Plot footprint pads
for( auto module : aBoard->Modules() ) for( MODULE* module : aBoard->Modules() )
{ {
aPlotter->StartBlock( NULL ); aPlotter->StartBlock( NULL );
for( auto pad : module->Pads() ) for( D_PAD* pad : module->Pads() )
{ {
if( (pad->GetLayerSet() & aLayerMask) == 0 ) EDA_DRAW_MODE_T padPlotMode = plotMode;
continue;
if( !( pad->GetLayerSet() & aLayerMask ).any() )
{
if( sketchPads )
padPlotMode = SKETCH;
else
continue;
}
wxSize margin; wxSize margin;
double width_adj = 0; double width_adj = 0;
if( ( aLayerMask & LSET::AllCuMask() ).any() ) if( onCopperLayer )
width_adj = itemplotter.getFineWidthAdj(); width_adj = itemplotter.getFineWidthAdj();
static const LSET speed( 4, B_Mask, F_Mask, B_Paste, F_Paste ); if( onSolderMaskLayer )
LSET anded = ( speed & aLayerMask );
if( anded == LSET( F_Mask ) || anded == LSET( B_Mask ) )
{
margin.x = margin.y = pad->GetSolderMaskMargin(); margin.x = margin.y = pad->GetSolderMaskMargin();
}
else if( anded == LSET( F_Paste ) || anded == LSET( B_Paste ) ) if( onSolderPasteLayer )
{
margin = pad->GetSolderPasteMargin(); margin = pad->GetSolderPasteMargin();
}
// Now offset the pad size by margin + width_adj // Now offset the pad size by margin + width_adj
// this is easy for most shapes, but not for a trapezoid or a custom shape // this is easy for most shapes, but not for a trapezoid or a custom shape
@ -413,6 +318,11 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
if( pad->GetLayerSet()[F_Cu] ) if( pad->GetLayerSet()[F_Cu] )
color = color.LegacyMix( aPlotOpt.ColorSettings()->GetColor( LAYER_PAD_FR ) ); color = color.LegacyMix( aPlotOpt.ColorSettings()->GetColor( LAYER_PAD_FR ) );
if( sketchPads && aLayerMask[F_Fab] )
color = aPlotOpt.ColorSettings()->GetColor( F_Fab );
else if( sketchPads && aLayerMask[B_Fab] )
color = aPlotOpt.ColorSettings()->GetColor( B_Fab );
// Temporary set the pad size to the required plot size: // Temporary set the pad size to the required plot size:
wxSize tmppadsize = pad->GetSize(); wxSize tmppadsize = pad->GetSize();
@ -428,7 +338,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) ) ( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) )
break; break;
itemplotter.PlotPad( pad, color, plotMode ); itemplotter.PlotPad( pad, color, padPlotMode );
break; break;
case PAD_SHAPE_RECT: case PAD_SHAPE_RECT:
@ -444,7 +354,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
case PAD_SHAPE_ROUNDRECT: case PAD_SHAPE_ROUNDRECT:
case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_CHAMFERED_RECT:
pad->SetSize( padPlotsSize ); pad->SetSize( padPlotsSize );
itemplotter.PlotPad( pad, color, plotMode ); itemplotter.PlotPad( pad, color, padPlotMode );
break; break;
case PAD_SHAPE_CUSTOM: case PAD_SHAPE_CUSTOM:
@ -469,7 +379,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
if( margin.x < 0 ) // we expect margin.x = margin.y for custom pads if( margin.x < 0 ) // we expect margin.x = margin.y for custom pads
dummy.SetSize( padPlotsSize ); dummy.SetSize( padPlotsSize );
itemplotter.PlotPad( &dummy, color, plotMode ); itemplotter.PlotPad( &dummy, color, padPlotMode );
} }
break; break;
} }
@ -863,10 +773,10 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
{ {
for( auto item : module->GraphicalItems() ) for( auto item : module->GraphicalItems() )
{ {
itemplotter.PlotAllTextsModule( module ); itemplotter.PlotFootprintTextItems( module );
if( item->Type() == PCB_MODULE_EDGE_T && item->GetLayer() == layer ) if( item->Type() == PCB_MODULE_EDGE_T && item->GetLayer() == layer )
itemplotter.Plot_1_EdgeModule( (EDGE_MODULE*) item ); itemplotter.PlotFootprintGraphicItem((EDGE_MODULE*) item );
} }
} }
@ -1213,7 +1123,6 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts, int aLayer,
KIGFX::PCB_RENDER_SETTINGS* renderSettings = new KIGFX::PCB_RENDER_SETTINGS(); KIGFX::PCB_RENDER_SETTINGS* renderSettings = new KIGFX::PCB_RENDER_SETTINGS();
renderSettings->LoadColors( aPlotOpts->ColorSettings() ); renderSettings->LoadColors( aPlotOpts->ColorSettings() );
renderSettings->SetDefaultPenWidth( aPlotOpts->GetLineWidth() );
plotter->SetRenderSettings( renderSettings ); plotter->SetRenderSettings( renderSettings );
// Compute the viewport and set the other options // Compute the viewport and set the other options

View File

@ -212,6 +212,9 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPl
// the white items are not seen on a white paper or screen // the white items are not seen on a white paper or screen
m_plotter->SetColor( aColor != WHITE ? aColor : LIGHTGRAY); m_plotter->SetColor( aColor != WHITE ? aColor : LIGHTGRAY);
if( aPlotMode == SKETCH )
m_plotter->SetCurrentLineWidth( GetSketchPadLineWidth(), &gbr_metadata );
switch( aPad->GetShape() ) switch( aPad->GetShape() )
{ {
case PAD_SHAPE_CIRCLE: case PAD_SHAPE_CIRCLE:
@ -275,7 +278,7 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPl
} }
bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) void BRDITEMS_PLOTTER::PlotFootprintTextItems( MODULE* aModule )
{ {
TEXTE_MODULE* textModule = &aModule->Reference(); TEXTE_MODULE* textModule = &aModule->Reference();
LAYER_NUM textLayer = textModule->GetLayer(); LAYER_NUM textLayer = textModule->GetLayer();
@ -284,7 +287,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
if( GetPlotReference() && m_layerMask[textLayer] if( GetPlotReference() && m_layerMask[textLayer]
&& ( textModule->IsVisible() || GetPlotInvisibleText() ) ) && ( textModule->IsVisible() || GetPlotInvisibleText() ) )
{ {
PlotTextModule( textModule, getColor( textLayer ) ); PlotFootprintTextItem( textModule, getColor( textLayer ));
} }
textModule = &aModule->Value(); textModule = &aModule->Value();
@ -293,7 +296,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
if( GetPlotValue() && m_layerMask[textLayer] if( GetPlotValue() && m_layerMask[textLayer]
&& ( textModule->IsVisible() || GetPlotInvisibleText() ) ) && ( textModule->IsVisible() || GetPlotInvisibleText() ) )
{ {
PlotTextModule( textModule, getColor( textLayer ) ); PlotFootprintTextItem( textModule, getColor( textLayer ));
} }
for( auto item : aModule->GraphicalItems() ) for( auto item : aModule->GraphicalItems() )
@ -309,7 +312,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
textLayer = textModule->GetLayer(); textLayer = textModule->GetLayer();
if( textLayer >= PCB_LAYER_ID_COUNT ) if( textLayer >= PCB_LAYER_ID_COUNT )
return false; return;
if( !m_layerMask[textLayer] ) if( !m_layerMask[textLayer] )
continue; continue;
@ -320,10 +323,8 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
if( textModule->GetText() == wxT( "${VALUE}" ) && !GetPlotValue() ) if( textModule->GetText() == wxT( "${VALUE}" ) && !GetPlotValue() )
continue; continue;
PlotTextModule( textModule, getColor( textLayer ) ); PlotFootprintTextItem( textModule, getColor( textLayer ));
} }
return true;
} }
@ -343,44 +344,36 @@ void BRDITEMS_PLOTTER::PlotBoardGraphicItems()
} }
} }
void BRDITEMS_PLOTTER::PlotTextModule( TEXTE_MODULE* pt_texte, COLOR4D aColor ) void BRDITEMS_PLOTTER::PlotFootprintTextItem( TEXTE_MODULE* aTextMod, COLOR4D aColor )
{ {
wxSize size;
wxPoint pos;
double orient;
int thickness;
if( aColor == COLOR4D::WHITE ) if( aColor == COLOR4D::WHITE )
aColor = COLOR4D( LIGHTGRAY ); aColor = COLOR4D( LIGHTGRAY );
m_plotter->SetColor( aColor ); m_plotter->SetColor( aColor );
// calculate some text parameters : // calculate some text parameters :
size = pt_texte->GetTextSize(); wxSize size = aTextMod->GetTextSize();
pos = pt_texte->GetTextPos(); wxPoint pos = aTextMod->GetTextPos();
double orient = aTextMod->GetDrawRotation();
orient = pt_texte->GetDrawRotation(); if( aTextMod->IsMirrored() )
thickness = std::max( pt_texte->GetEffectiveTextPenWidth(),
m_plotter->RenderSettings()->GetDefaultPenWidth() );
if( pt_texte->IsMirrored() )
size.x = -size.x; // Text is mirrored size.x = -size.x; // Text is mirrored
// Non bold texts thickness is clamped at 1/6 char size by the low level draw function. // Non bold texts thickness is clamped at 1/6 char size by the low level draw function.
// but in Pcbnew we do not manage bold texts and thickness up to 1/4 char size // but in Pcbnew we do not manage bold texts and thickness up to 1/4 char size
// (like bold text) and we manage the thickness. // (like bold text) and we manage the thickness.
// So we set bold flag to true // So we set bold flag to true
bool allow_bold = pt_texte->IsBold() || thickness; bool allow_bold = true;
GBR_METADATA gbr_metadata; GBR_METADATA gbr_metadata;
gbr_metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP ); gbr_metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP );
MODULE* parent = static_cast<MODULE*> ( pt_texte->GetParent() ); MODULE* parent = static_cast<MODULE*> ( aTextMod->GetParent() );
gbr_metadata.SetCmpReference( parent->GetReference() ); gbr_metadata.SetCmpReference( parent->GetReference() );
m_plotter->Text( pos, aColor, pt_texte->GetShownText(), orient, size, m_plotter->Text( pos, aColor, aTextMod->GetShownText(), orient, size,
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(), thickness, aTextMod->GetHorizJustify(), aTextMod->GetVertJustify(),
pt_texte->IsItalic(), allow_bold, false, &gbr_metadata ); aTextMod->GetEffectiveTextPenWidth(), aTextMod->IsItalic(), allow_bold,
false, &gbr_metadata );
} }
@ -486,32 +479,27 @@ void BRDITEMS_PLOTTER::PlotPcbTarget( PCB_TARGET* aMire )
// Plot footprints graphic items (outlines) // Plot footprints graphic items (outlines)
void BRDITEMS_PLOTTER::Plot_Edges_Modules() void BRDITEMS_PLOTTER::PlotFootprintGraphicItems( MODULE* aModule )
{ {
for( auto module : m_board->Modules() ) for( BOARD_ITEM* item : aModule->GraphicalItems() )
{ {
for( auto item : module->GraphicalItems() ) EDGE_MODULE* edge = dynamic_cast<EDGE_MODULE*>( item );
{
EDGE_MODULE* edge = dyn_cast<EDGE_MODULE*>( item );
if( edge && m_layerMask[edge->GetLayer()] ) if( edge && m_layerMask[ edge->GetLayer() ] )
Plot_1_EdgeModule( edge ); PlotFootprintGraphicItem( edge );
}
} }
} }
//* Plot a graphic item (outline) relative to a footprint //* Plot a graphic item (outline) relative to a footprint
void BRDITEMS_PLOTTER::Plot_1_EdgeModule( EDGE_MODULE* aEdge ) void BRDITEMS_PLOTTER::PlotFootprintGraphicItem( EDGE_MODULE* aEdge )
{ {
if( aEdge->Type() != PCB_MODULE_EDGE_T ) if( aEdge->Type() != PCB_MODULE_EDGE_T )
return; return;
m_plotter->SetColor( getColor( aEdge->GetLayer() ) ); m_plotter->SetColor( getColor( aEdge->GetLayer() ) );
int thickness = std::max( aEdge->GetWidth(), int thickness = aEdge->GetWidth();
m_plotter->RenderSettings()->GetDefaultPenWidth() );
wxPoint pos( aEdge->GetStart() ); wxPoint pos( aEdge->GetStart() );
wxPoint end( aEdge->GetEnd() ); wxPoint end( aEdge->GetEnd() );
@ -632,10 +620,6 @@ void BRDITEMS_PLOTTER::Plot_1_EdgeModule( EDGE_MODULE* aEdge )
// Plot a PCB Text, i.e. a text found on a copper or technical layer // Plot a PCB Text, i.e. a text found on a copper or technical layer
void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte ) void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
{ {
double orient;
int thickness;
wxPoint pos;
wxSize size;
wxString shownText( pt_texte->GetShownText() ); wxString shownText( pt_texte->GetShownText() );
if( shownText.IsEmpty() ) if( shownText.IsEmpty() )
@ -652,11 +636,10 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
COLOR4D color = getColor( pt_texte->GetLayer() ); COLOR4D color = getColor( pt_texte->GetLayer() );
m_plotter->SetColor( color ); m_plotter->SetColor( color );
size = pt_texte->GetTextSize(); wxSize size = pt_texte->GetTextSize();
pos = pt_texte->GetTextPos(); wxPoint pos = pt_texte->GetTextPos();
orient = pt_texte->GetTextAngle(); double orient = pt_texte->GetTextAngle();
thickness = std::max( pt_texte->GetEffectiveTextPenWidth(), int thickness = pt_texte->GetEffectiveTextPenWidth();
m_plotter->RenderSettings()->GetDefaultPenWidth() );
if( pt_texte->IsMirrored() ) if( pt_texte->IsMirrored() )
size.x = -size.x; size.x = -size.x;
@ -665,7 +648,7 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
// but in Pcbnew we do not manage bold texts and thickness up to 1/4 char size // but in Pcbnew we do not manage bold texts and thickness up to 1/4 char size
// (like bold text) and we manage the thickness. // (like bold text) and we manage the thickness.
// So we set bold flag to true // So we set bold flag to true
bool allow_bold = pt_texte->IsBold() || thickness; bool allow_bold = true;
m_plotter->SetCurrentLineWidth( thickness ); m_plotter->SetCurrentLineWidth( thickness );
@ -785,8 +768,7 @@ void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg )
int radius = 0; int radius = 0;
double StAngle = 0, EndAngle = 0; double StAngle = 0, EndAngle = 0;
int thickness = std::max( aSeg->GetWidth(), int thickness = aSeg->GetWidth();
m_plotter->RenderSettings()->GetDefaultPenWidth() );
m_plotter->SetColor( getColor( aSeg->GetLayer() ) ); m_plotter->SetColor( getColor( aSeg->GetLayer() ) );
@ -824,9 +806,8 @@ void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg )
break; break;
case S_CURVE: case S_CURVE:
m_plotter->BezierCurve( aSeg->GetStart(), aSeg->GetBezControl1(), m_plotter->BezierCurve( aSeg->GetStart(), aSeg->GetBezControl1(), aSeg->GetBezControl2(),
aSeg->GetBezControl2(), aSeg->GetEnd(), aSeg->GetEnd(), 0, thickness );
0, thickness );
break; break;
case S_POLYGON: case S_POLYGON:
@ -837,7 +818,7 @@ void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg )
{ {
auto seg = it.Get(); auto seg = it.Get();
m_plotter->ThickSegment( wxPoint( seg.A ), wxPoint( seg.B ), m_plotter->ThickSegment( wxPoint( seg.A ), wxPoint( seg.B ),
thickness, GetPlotMode(), &gbr_metadata ); thickness, GetPlotMode(), &gbr_metadata );
} }
} }
else else