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:
parent
4a60b8a776
commit
10614a9ebc
|
@ -89,6 +89,8 @@ edge_width
|
|||
effects
|
||||
end
|
||||
epsilon_r
|
||||
fab_layers_line_width
|
||||
fab_layers_text_dims
|
||||
feature1
|
||||
feature2
|
||||
fill
|
||||
|
|
|
@ -13,7 +13,6 @@ mirror
|
|||
mode
|
||||
outputdirectory
|
||||
outputformat
|
||||
padsonsilk
|
||||
pcbplotparams
|
||||
plotframeref
|
||||
plotinvisibletext
|
||||
|
@ -23,6 +22,7 @@ psa4output
|
|||
pscolor
|
||||
psnegative
|
||||
scaleselection
|
||||
sketchpadsonfab
|
||||
subtractmaskfromsilk
|
||||
svgprecision
|
||||
svguseinch
|
||||
|
|
|
@ -731,8 +731,6 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_
|
|||
|
||||
if( trace_mode == SKETCH )
|
||||
{
|
||||
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH, gbr_metadata );
|
||||
|
||||
if( gbr_metadata )
|
||||
formatNetAttribute( &gbr_metadata->m_NetlistMetadata );
|
||||
|
||||
|
@ -825,8 +823,6 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
|
|||
case 1800:
|
||||
if( trace_mode == SKETCH )
|
||||
{
|
||||
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH, gbr_metadata );
|
||||
|
||||
if( gbr_metadata )
|
||||
formatNetAttribute( &gbr_metadata->m_NetlistMetadata );
|
||||
|
||||
|
@ -1113,8 +1109,7 @@ void GERBER_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCo
|
|||
metadata = *gbr_metadata;
|
||||
|
||||
if( aTrace_Mode == SKETCH )
|
||||
PlotPoly( cornerList, NO_FILL, USE_DEFAULT_LINE_WIDTH,
|
||||
&metadata );
|
||||
PlotPoly( cornerList, NO_FILL, DO_NOT_SET_LINE_WIDTH, &metadata );
|
||||
else
|
||||
PlotGerberRegion( cornerList, &metadata );
|
||||
}
|
||||
|
@ -1145,7 +1140,6 @@ void GERBER_PLOTTER::FlashRegularPolygon( const wxPoint& aShapePos,
|
|||
|
||||
cornerList.push_back( cornerList[0] ); // Close the shape
|
||||
|
||||
SetCurrentLineWidth( aDiameter/8, gbr_metadata );
|
||||
PlotPoly( cornerList, NO_FILL, GetCurrentLineWidth(), gbr_metadata );
|
||||
}
|
||||
else
|
||||
|
|
|
@ -168,6 +168,7 @@ enum
|
|||
LAYER_CLASS_COPPER,
|
||||
LAYER_CLASS_EDGES,
|
||||
LAYER_CLASS_COURTYARD,
|
||||
LAYER_CLASS_FAB,
|
||||
LAYER_CLASS_OTHERS,
|
||||
|
||||
LAYER_CLASS_COUNT
|
||||
|
|
|
@ -551,6 +551,13 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
|||
m_TextItalic[ 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_TextSize[ LAYER_CLASS_OTHERS ] = wxSize( 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 ),
|
||||
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" ),
|
||||
&m_LineThickness[ LAYER_CLASS_OTHERS ],
|
||||
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.
|
||||
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;
|
||||
else if( aLayer == F_CrtYd || aLayer == B_CrtYd )
|
||||
return LAYER_CLASS_COURTYARD;
|
||||
else if( aLayer == F_Fab || aLayer == B_Fab )
|
||||
return LAYER_CLASS_FAB;
|
||||
else
|
||||
return LAYER_CLASS_OTHERS;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ enum
|
|||
ROW_COPPER,
|
||||
ROW_EDGES,
|
||||
ROW_COURTYARD,
|
||||
ROW_FAB,
|
||||
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_EDGES, COL_CLASS_NAME, _( "Edge Cuts" ) );
|
||||
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_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_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_FAB, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_FAB ] );
|
||||
SET_INT_VALUE( ROW_OTHERS, COL_LINE_THICKNESS, bds.m_LineThickness[ LAYER_CLASS_OTHERS ] );
|
||||
|
||||
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_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 );
|
||||
|
||||
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_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 );
|
||||
|
||||
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_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 ] );
|
||||
|
||||
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_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 ] );
|
||||
|
||||
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_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 ] );
|
||||
|
||||
return true;
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
|
||||
DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* 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_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).
|
||||
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
|
||||
if( m_XScaleAdjust < PLOT_MIN_SCALE || m_YScaleAdjust < PLOT_MIN_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() );
|
||||
|
||||
// Option to exclude pads from silkscreen layers
|
||||
m_excludePadsFromSilkscreen->SetValue( !m_plotOpts.GetPlotPadsOnSilkLayer() );
|
||||
m_sketchPadsOnFabLayers->SetValue( m_plotOpts.GetSketchPadsOnFabLayers() );
|
||||
|
||||
// Option to tent vias
|
||||
m_subtractMaskFromSilk->SetValue( m_plotOpts.GetSubtractMaskFromSilk() );
|
||||
|
@ -412,7 +409,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( true );
|
||||
m_useAuxOriginCheckBox->Enable( false );
|
||||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_defaultLineWidth.Enable( true );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( false );
|
||||
|
@ -436,7 +432,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( true );
|
||||
m_useAuxOriginCheckBox->Enable( false );
|
||||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_defaultLineWidth.Enable( true );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( true );
|
||||
|
@ -461,7 +456,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( false );
|
||||
m_plotMirrorOpt->SetValue( false );
|
||||
m_useAuxOriginCheckBox->Enable( true );
|
||||
m_defaultLineWidth.Enable( true );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( false );
|
||||
|
@ -487,7 +481,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( true );
|
||||
m_useAuxOriginCheckBox->Enable( false );
|
||||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_defaultLineWidth.Enable( false );
|
||||
m_defaultPenSize.Enable( true );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( true );
|
||||
|
@ -512,7 +505,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_plotMirrorOpt->Enable( false );
|
||||
m_plotMirrorOpt->SetValue( false );
|
||||
m_useAuxOriginCheckBox->Enable( true );
|
||||
m_defaultLineWidth.Enable( false );
|
||||
m_defaultPenSize.Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_scaleOpt->Enable( false );
|
||||
|
@ -595,7 +587,7 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
tempOptions.SetExcludeEdgeLayer( m_excludeEdgeLayerOpt->GetValue() );
|
||||
tempOptions.SetSubtractMaskFromSilk( m_subtractMaskFromSilk->GetValue() );
|
||||
tempOptions.SetPlotFrameRef( m_plotSheetRef->GetValue() );
|
||||
tempOptions.SetPlotPadsOnSilkLayer( !m_excludePadsFromSilkscreen->GetValue() );
|
||||
tempOptions.SetSketchPadsOnFabLayers( m_sketchPadsOnFabLayers->GetValue());
|
||||
tempOptions.SetUseAuxOrigin( m_useAuxOriginCheckBox->GetValue() );
|
||||
tempOptions.SetPlotValue( m_plotModuleValueOpt->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)
|
||||
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
|
||||
double tmpDouble;
|
||||
msg = m_fineAdjustXCtrl->GetValue();
|
||||
|
@ -754,6 +738,8 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
|
|||
|
||||
applyPlotSettings();
|
||||
|
||||
m_plotOpts.SetSketchPadLineWidth( board->GetDesignSettings().GetLineThickness( F_Fab ) );
|
||||
|
||||
// If no layer selected, we have nothing plotted.
|
||||
// Prompt user if it happens because he could think there is a bug in Pcbnew.
|
||||
if( !m_plotOpts.GetLayerSelection().any() )
|
||||
|
|
|
@ -56,7 +56,6 @@ private:
|
|||
int m_widthAdjustMinValue; // Global track width limits
|
||||
int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
|
||||
// m_PSWidthAdjust to these limits.
|
||||
UNIT_BINDER m_defaultLineWidth;
|
||||
UNIT_BINDER m_defaultPenSize;
|
||||
UNIT_BINDER m_trackWidthCorrection;
|
||||
|
||||
|
|
|
@ -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/
|
||||
//
|
||||
// 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 );
|
||||
|
||||
m_excludePadsFromSilkscreen = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Exclude pads from silkscreen"), 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 = new wxCheckBox( sbOptionsSizer->GetStaticBox(), ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Sketch pads on fab layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
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->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->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->Wrap( -1 );
|
||||
|
@ -142,22 +142,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
m_plotModeOpt->SetSelection( 0 );
|
||||
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 );
|
||||
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 );
|
||||
|
||||
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 );
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<property name="file">dialog_plot_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">Dialog_Plot_base</property>
|
||||
|
@ -26,7 +25,6 @@
|
|||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -901,7 +899,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</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="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -909,7 +907,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></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_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1000,11 +998,11 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="border">30</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="row">7</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="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1460,201 +1458,6 @@
|
|||
<property name="window_style"></property>
|
||||
</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.
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">
|
||||
<property name="border">30</property>
|
||||
<property name="colspan">2</property>
|
||||
|
@ -1793,8 +1596,8 @@
|
|||
<property name="border">30</property>
|
||||
<property name="colspan">2</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="row">7</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="row">6</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
|
|
@ -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/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -72,7 +72,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
|
|||
wxCheckBox* m_plotModuleRefOpt;
|
||||
wxCheckBox* m_plotInvisibleText;
|
||||
wxCheckBox* m_excludeEdgeLayerOpt;
|
||||
wxCheckBox* m_excludePadsFromSilkscreen;
|
||||
wxCheckBox* m_sketchPadsOnFabLayers;
|
||||
wxCheckBox* m_plotNoViaOnMaskOpt;
|
||||
wxCheckBox* m_useAuxOriginCheckBox;
|
||||
wxStaticText* drillMarksLabel;
|
||||
|
@ -81,9 +81,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
|
|||
wxChoice* m_scaleOpt;
|
||||
wxStaticText* plotModeLabel;
|
||||
wxChoice* m_plotModeOpt;
|
||||
wxStaticText* m_lineWidthLabel;
|
||||
wxTextCtrl* m_lineWidthCtrl;
|
||||
wxStaticText* m_lineWidthUnits;
|
||||
wxCheckBox* m_plotMirrorOpt;
|
||||
wxCheckBox* m_plotPSNegativeOpt;
|
||||
wxCheckBox* m_zoneFillCheck;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include <fctsys.h>
|
||||
#include <pcbnew.h>
|
||||
#include <board_design_settings.h>
|
||||
#include <widgets/paged_dialog.h>
|
||||
#include <footprint_edit_frame.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
|
@ -48,6 +47,7 @@ enum
|
|||
ROW_COPPER,
|
||||
ROW_EDGES,
|
||||
ROW_COURTYARD,
|
||||
ROW_FAB,
|
||||
ROW_OTHERS,
|
||||
|
||||
ROW_COUNT
|
||||
|
@ -157,7 +157,7 @@ bool PANEL_MODEDIT_DEFAULTS::validateData()
|
|||
return false;
|
||||
|
||||
// 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 ),
|
||||
getGridValue( row, COL_TEXT_HEIGHT ) );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
// Grid
|
||||
m_grid->CreateGrid( 5, 5 );
|
||||
m_grid->CreateGrid( 6, 5 );
|
||||
m_grid->EnableEditing( true );
|
||||
m_grid->EnableGridLines( true );
|
||||
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( 2, _("Edge Cuts") );
|
||||
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 );
|
||||
|
||||
// Label Appearance
|
||||
|
|
|
@ -873,10 +873,10 @@
|
|||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="row_label_size">125</property>
|
||||
<property name="row_label_values">"Silk Layers" "Copper Layers" "Edge Cuts" "Courtyards" "Other Layers"</property>
|
||||
<property name="row_label_values">"Silk Layers" "Copper Layers" "Edge Cuts" "Courtyards" "Fab Layers" "Other Layers"</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">5</property>
|
||||
<property name="rows">6</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
|
|
|
@ -47,6 +47,7 @@ enum
|
|||
ROW_COPPER,
|
||||
ROW_EDGES,
|
||||
ROW_COURTYARD,
|
||||
ROW_FAB,
|
||||
ROW_OTHERS,
|
||||
|
||||
ROW_COUNT
|
||||
|
@ -150,7 +151,7 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::validateData()
|
|||
return false;
|
||||
|
||||
// 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 ),
|
||||
getGridValue( row, COL_TEXT_HEIGHT ) );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
// Grid
|
||||
m_grid->CreateGrid( 5, 6 );
|
||||
m_grid->CreateGrid( 6, 6 );
|
||||
m_grid->EnableEditing( true );
|
||||
m_grid->EnableGridLines( true );
|
||||
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( 2, _("Edge Cuts") );
|
||||
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 );
|
||||
|
||||
// Label Appearance
|
||||
|
|
|
@ -198,10 +198,10 @@
|
|||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="row_label_size">132</property>
|
||||
<property name="row_label_values">"Silk Layers" "Copper Layers" "Edge Cuts" "Courtyards" "Other Layers"</property>
|
||||
<property name="row_label_values">"Silk Layers" "Copper Layers" "Edge Cuts" "Courtyards" "Fab Layers" "Other Layers"</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">5</property>
|
||||
<property name="rows">6</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
|
|
|
@ -310,7 +310,7 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename,
|
|||
for( auto item : footprint->GraphicalItems() )
|
||||
{
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,6 +116,26 @@ FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
|
|||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
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_DesignSettings.m_LineThickness[ LAYER_CLASS_OTHERS ],
|
||||
Millimeter2iu( DEFAULT_SILK_LINE_WIDTH ), Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||
|
|
|
@ -627,6 +627,15 @@ void PCB_IO::formatDefaults( const BOARD_DESIGN_SETTINGS& aSettings, int aNestLe
|
|||
aSettings.m_TextItalic[ LAYER_CLASS_SILK ] ? " italic" : "",
|
||||
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",
|
||||
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",
|
||||
|
|
|
@ -1734,6 +1734,15 @@ void PCB_PARSER::parseDefaults( BOARD_DESIGN_SETTINGS& designSettings )
|
|||
parseDefaultTextDims( designSettings, LAYER_CLASS_SILK );
|
||||
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:
|
||||
designSettings.m_LineThickness[ LAYER_CLASS_OTHERS ] = parseBoardUnits( token );
|
||||
NeedRIGHT();
|
||||
|
|
|
@ -126,7 +126,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
|
|||
m_plotReference = true;
|
||||
m_plotValue = true;
|
||||
m_plotInvisibleText = false;
|
||||
m_plotPadsOnSilkLayer = false;
|
||||
m_sketchPadsOnFabLayers = false;
|
||||
m_subtractMaskFromSilk = false;
|
||||
m_format = PLOT_FORMAT::GERBER;
|
||||
m_mirror = false;
|
||||
|
@ -248,8 +248,8 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
|
|||
m_plotValue ? trueStr : falseStr );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotinvisibletext ),
|
||||
m_plotInvisibleText ? trueStr : falseStr );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_padsonsilk ),
|
||||
m_plotPadsOnSilkLayer ? trueStr : falseStr );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_sketchpadsonfab ),
|
||||
m_sketchPadsOnFabLayers ? trueStr : falseStr );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_subtractmaskfromsilk ),
|
||||
m_subtractMaskFromSilk ? trueStr : falseStr );
|
||||
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;
|
||||
if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText )
|
||||
return false;
|
||||
if( m_plotPadsOnSilkLayer != aPcbPlotParams.m_plotPadsOnSilkLayer )
|
||||
if( m_sketchPadsOnFabLayers != aPcbPlotParams.m_sketchPadsOnFabLayers )
|
||||
return false;
|
||||
if( m_subtractMaskFromSilk != aPcbPlotParams.m_subtractMaskFromSilk )
|
||||
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( LINE_READER* aReader ) :
|
||||
|
@ -480,17 +475,6 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
|
|||
aPcbPlotParams->m_excludeEdgeLayer = parseBool();
|
||||
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:
|
||||
aPcbPlotParams->m_plotFrameRef = parseBool();
|
||||
break;
|
||||
|
@ -546,8 +530,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
|
|||
aPcbPlotParams->m_plotInvisibleText = parseBool();
|
||||
break;
|
||||
|
||||
case T_padsonsilk:
|
||||
aPcbPlotParams->m_plotPadsOnSilkLayer= parseBool();
|
||||
case T_sketchpadsonfab:
|
||||
aPcbPlotParams->m_sketchPadsOnFabLayers= parseBool();
|
||||
break;
|
||||
|
||||
case T_subtractmaskfromsilk:
|
||||
|
|
|
@ -155,8 +155,9 @@ private:
|
|||
/// Force plotting of fields marked invisible
|
||||
bool m_plotInvisibleText;
|
||||
|
||||
/// Allows pads outlines on silkscreen layer (when pads are also on silk screen)
|
||||
bool m_plotPadsOnSilkLayer;
|
||||
/// Plots pads outlines on fab layers
|
||||
bool m_sketchPadsOnFabLayers;
|
||||
int m_sketchPadLineWidth;
|
||||
|
||||
/* These next two scale factors are intended to compensate plotters
|
||||
* (mainly printers) X and Y scale error. Therefore they are expected very
|
||||
|
@ -256,8 +257,10 @@ public:
|
|||
void SetMirror( bool aFlag ) { m_mirror = aFlag; }
|
||||
bool GetMirror() const { return m_mirror; }
|
||||
|
||||
void SetPlotPadsOnSilkLayer( bool aFlag ) { m_plotPadsOnSilkLayer = aFlag; }
|
||||
bool GetPlotPadsOnSilkLayer() const { return m_plotPadsOnSilkLayer; }
|
||||
void SetSketchPadsOnFabLayers( bool aFlag ) { m_sketchPadsOnFabLayers = aFlag; }
|
||||
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; }
|
||||
bool GetPlotInvisibleText() const { return m_plotInvisibleText; }
|
||||
|
@ -342,9 +345,6 @@ public:
|
|||
|
||||
void SetHPGLPenNum( int aVal ) { m_HPGLPenNum = aVal; }
|
||||
int GetHPGLPenNum() const { return m_HPGLPenNum; }
|
||||
|
||||
int GetLineWidth() const { return m_lineWidth; };
|
||||
bool SetLineWidth( int aValue );
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -90,18 +90,15 @@ public:
|
|||
|
||||
// Basic functions to plot a board item
|
||||
void SetLayerSet( LSET aLayerMask ) { m_layerMask = aLayerMask; }
|
||||
void Plot_Edges_Modules();
|
||||
void Plot_1_EdgeModule( EDGE_MODULE* aEdge );
|
||||
void PlotTextModule( TEXTE_MODULE* aTextMod, COLOR4D aColor );
|
||||
void PlotFootprintGraphicItems( MODULE* aModule );
|
||||
void PlotFootprintGraphicItem( EDGE_MODULE* aEdge );
|
||||
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
|
||||
* Invisible text fields are plotted only if PlotInvisibleText option is set
|
||||
* usually they are not plotted.
|
||||
* Reference, Value, and other fields are plotted only if the corresponding option is enabled.
|
||||
* Invisible text fields are plotted only if PlotInvisibleText option is set.
|
||||
*/
|
||||
bool PlotAllTextsModule( MODULE* aModule );
|
||||
void PlotFootprintTextItems( MODULE* aModule );
|
||||
|
||||
void PlotDimension( DIMENSION* Dimension );
|
||||
void PlotPcbTarget( PCB_TARGET* PtMire );
|
||||
|
@ -206,19 +203,6 @@ void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
|||
void PlotLayerOutlines( BOARD *aBoard, PLOTTER* aPlotter,
|
||||
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)
|
||||
* Complete a plot filename: forces the output directory,
|
||||
|
|
|
@ -62,94 +62,6 @@
|
|||
static void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
||||
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,
|
||||
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
|
||||
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
else
|
||||
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
|
||||
// Gerber: Subtract soldermask from silkscreen if enabled
|
||||
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
|
||||
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
else
|
||||
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -300,58 +212,51 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
|||
itemplotter.SetLayerSet( aLayerMask );
|
||||
|
||||
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
|
||||
itemplotter.PlotBoardGraphicItems();
|
||||
|
||||
// Draw footprint texts:
|
||||
for( auto module : aBoard->Modules() )
|
||||
{
|
||||
if( ! itemplotter.PlotAllTextsModule( module ) )
|
||||
{
|
||||
wxLogMessage( _( "Your BOARD has a bad layer number for footprint %s" ),
|
||||
module->GetReference() );
|
||||
}
|
||||
}
|
||||
for( MODULE* module : aBoard->Modules() )
|
||||
itemplotter.PlotFootprintTextItems( module );
|
||||
|
||||
// Draw footprint other graphic items:
|
||||
for( auto module : aBoard->Modules() )
|
||||
{
|
||||
for( auto item : module->GraphicalItems() )
|
||||
{
|
||||
if( item->Type() == PCB_MODULE_EDGE_T && aLayerMask[ item->GetLayer() ] )
|
||||
itemplotter.Plot_1_EdgeModule( (EDGE_MODULE*) item );
|
||||
}
|
||||
}
|
||||
for( MODULE* module : aBoard->Modules() )
|
||||
itemplotter.PlotFootprintGraphicItems( module );
|
||||
|
||||
// Plot footprint pads
|
||||
for( auto module : aBoard->Modules() )
|
||||
for( MODULE* module : aBoard->Modules() )
|
||||
{
|
||||
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;
|
||||
|
||||
if( !( pad->GetLayerSet() & aLayerMask ).any() )
|
||||
{
|
||||
if( sketchPads )
|
||||
padPlotMode = SKETCH;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
wxSize margin;
|
||||
double width_adj = 0;
|
||||
|
||||
if( ( aLayerMask & LSET::AllCuMask() ).any() )
|
||||
if( onCopperLayer )
|
||||
width_adj = itemplotter.getFineWidthAdj();
|
||||
|
||||
static const LSET speed( 4, B_Mask, F_Mask, B_Paste, F_Paste );
|
||||
|
||||
LSET anded = ( speed & aLayerMask );
|
||||
|
||||
if( anded == LSET( F_Mask ) || anded == LSET( B_Mask ) )
|
||||
{
|
||||
if( onSolderMaskLayer )
|
||||
margin.x = margin.y = pad->GetSolderMaskMargin();
|
||||
}
|
||||
else if( anded == LSET( F_Paste ) || anded == LSET( B_Paste ) )
|
||||
{
|
||||
|
||||
if( onSolderPasteLayer )
|
||||
margin = pad->GetSolderPasteMargin();
|
||||
}
|
||||
|
||||
// Now offset the pad size by margin + width_adj
|
||||
// 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] )
|
||||
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:
|
||||
wxSize tmppadsize = pad->GetSize();
|
||||
|
||||
|
@ -428,7 +338,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
|||
( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) )
|
||||
break;
|
||||
|
||||
itemplotter.PlotPad( pad, color, plotMode );
|
||||
itemplotter.PlotPad( pad, color, padPlotMode );
|
||||
break;
|
||||
|
||||
case PAD_SHAPE_RECT:
|
||||
|
@ -444,7 +354,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
|||
case PAD_SHAPE_ROUNDRECT:
|
||||
case PAD_SHAPE_CHAMFERED_RECT:
|
||||
pad->SetSize( padPlotsSize );
|
||||
itemplotter.PlotPad( pad, color, plotMode );
|
||||
itemplotter.PlotPad( pad, color, padPlotMode );
|
||||
break;
|
||||
|
||||
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
|
||||
dummy.SetSize( padPlotsSize );
|
||||
|
||||
itemplotter.PlotPad( &dummy, color, plotMode );
|
||||
itemplotter.PlotPad( &dummy, color, padPlotMode );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -863,10 +773,10 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
|
|||
{
|
||||
for( auto item : module->GraphicalItems() )
|
||||
{
|
||||
itemplotter.PlotAllTextsModule( module );
|
||||
itemplotter.PlotFootprintTextItems( module );
|
||||
|
||||
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();
|
||||
renderSettings->LoadColors( aPlotOpts->ColorSettings() );
|
||||
renderSettings->SetDefaultPenWidth( aPlotOpts->GetLineWidth() );
|
||||
plotter->SetRenderSettings( renderSettings );
|
||||
|
||||
// Compute the viewport and set the other options
|
||||
|
|
|
@ -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
|
||||
m_plotter->SetColor( aColor != WHITE ? aColor : LIGHTGRAY);
|
||||
|
||||
if( aPlotMode == SKETCH )
|
||||
m_plotter->SetCurrentLineWidth( GetSketchPadLineWidth(), &gbr_metadata );
|
||||
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
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();
|
||||
LAYER_NUM textLayer = textModule->GetLayer();
|
||||
|
@ -284,7 +287,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
|
|||
if( GetPlotReference() && m_layerMask[textLayer]
|
||||
&& ( textModule->IsVisible() || GetPlotInvisibleText() ) )
|
||||
{
|
||||
PlotTextModule( textModule, getColor( textLayer ) );
|
||||
PlotFootprintTextItem( textModule, getColor( textLayer ));
|
||||
}
|
||||
|
||||
textModule = &aModule->Value();
|
||||
|
@ -293,7 +296,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
|
|||
if( GetPlotValue() && m_layerMask[textLayer]
|
||||
&& ( textModule->IsVisible() || GetPlotInvisibleText() ) )
|
||||
{
|
||||
PlotTextModule( textModule, getColor( textLayer ) );
|
||||
PlotFootprintTextItem( textModule, getColor( textLayer ));
|
||||
}
|
||||
|
||||
for( auto item : aModule->GraphicalItems() )
|
||||
|
@ -309,7 +312,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
|
|||
textLayer = textModule->GetLayer();
|
||||
|
||||
if( textLayer >= PCB_LAYER_ID_COUNT )
|
||||
return false;
|
||||
return;
|
||||
|
||||
if( !m_layerMask[textLayer] )
|
||||
continue;
|
||||
|
@ -320,10 +323,8 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
|
|||
if( textModule->GetText() == wxT( "${VALUE}" ) && !GetPlotValue() )
|
||||
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 )
|
||||
aColor = COLOR4D( LIGHTGRAY );
|
||||
|
||||
m_plotter->SetColor( aColor );
|
||||
|
||||
// calculate some text parameters :
|
||||
size = pt_texte->GetTextSize();
|
||||
pos = pt_texte->GetTextPos();
|
||||
wxSize size = aTextMod->GetTextSize();
|
||||
wxPoint pos = aTextMod->GetTextPos();
|
||||
double orient = aTextMod->GetDrawRotation();
|
||||
|
||||
orient = pt_texte->GetDrawRotation();
|
||||
|
||||
thickness = std::max( pt_texte->GetEffectiveTextPenWidth(),
|
||||
m_plotter->RenderSettings()->GetDefaultPenWidth() );
|
||||
|
||||
if( pt_texte->IsMirrored() )
|
||||
if( aTextMod->IsMirrored() )
|
||||
size.x = -size.x; // Text is mirrored
|
||||
|
||||
// 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
|
||||
// (like bold text) and we manage the thickness.
|
||||
// So we set bold flag to true
|
||||
bool allow_bold = pt_texte->IsBold() || thickness;
|
||||
bool allow_bold = true;
|
||||
|
||||
GBR_METADATA gbr_metadata;
|
||||
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() );
|
||||
|
||||
m_plotter->Text( pos, aColor, pt_texte->GetShownText(), orient, size,
|
||||
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(), thickness,
|
||||
pt_texte->IsItalic(), allow_bold, false, &gbr_metadata );
|
||||
m_plotter->Text( pos, aColor, aTextMod->GetShownText(), orient, size,
|
||||
aTextMod->GetHorizJustify(), aTextMod->GetVertJustify(),
|
||||
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)
|
||||
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 = dyn_cast<EDGE_MODULE*>( item );
|
||||
EDGE_MODULE* edge = dynamic_cast<EDGE_MODULE*>( item );
|
||||
|
||||
if( edge && m_layerMask[ edge->GetLayer() ] )
|
||||
Plot_1_EdgeModule( edge );
|
||||
}
|
||||
PlotFootprintGraphicItem( edge );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//* 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 )
|
||||
return;
|
||||
|
||||
m_plotter->SetColor( getColor( aEdge->GetLayer() ) );
|
||||
|
||||
int thickness = std::max( aEdge->GetWidth(),
|
||||
m_plotter->RenderSettings()->GetDefaultPenWidth() );
|
||||
|
||||
int thickness = aEdge->GetWidth();
|
||||
wxPoint pos( aEdge->GetStart() );
|
||||
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
|
||||
void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
|
||||
{
|
||||
double orient;
|
||||
int thickness;
|
||||
wxPoint pos;
|
||||
wxSize size;
|
||||
wxString shownText( pt_texte->GetShownText() );
|
||||
|
||||
if( shownText.IsEmpty() )
|
||||
|
@ -652,11 +636,10 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
|
|||
COLOR4D color = getColor( pt_texte->GetLayer() );
|
||||
m_plotter->SetColor( color );
|
||||
|
||||
size = pt_texte->GetTextSize();
|
||||
pos = pt_texte->GetTextPos();
|
||||
orient = pt_texte->GetTextAngle();
|
||||
thickness = std::max( pt_texte->GetEffectiveTextPenWidth(),
|
||||
m_plotter->RenderSettings()->GetDefaultPenWidth() );
|
||||
wxSize size = pt_texte->GetTextSize();
|
||||
wxPoint pos = pt_texte->GetTextPos();
|
||||
double orient = pt_texte->GetTextAngle();
|
||||
int thickness = pt_texte->GetEffectiveTextPenWidth();
|
||||
|
||||
if( pt_texte->IsMirrored() )
|
||||
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
|
||||
// (like bold text) and we manage the thickness.
|
||||
// So we set bold flag to true
|
||||
bool allow_bold = pt_texte->IsBold() || thickness;
|
||||
bool allow_bold = true;
|
||||
|
||||
m_plotter->SetCurrentLineWidth( thickness );
|
||||
|
||||
|
@ -785,8 +768,7 @@ void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg )
|
|||
|
||||
int radius = 0;
|
||||
double StAngle = 0, EndAngle = 0;
|
||||
int thickness = std::max( aSeg->GetWidth(),
|
||||
m_plotter->RenderSettings()->GetDefaultPenWidth() );
|
||||
int thickness = aSeg->GetWidth();
|
||||
|
||||
m_plotter->SetColor( getColor( aSeg->GetLayer() ) );
|
||||
|
||||
|
@ -824,9 +806,8 @@ void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg )
|
|||
break;
|
||||
|
||||
case S_CURVE:
|
||||
m_plotter->BezierCurve( aSeg->GetStart(), aSeg->GetBezControl1(),
|
||||
aSeg->GetBezControl2(), aSeg->GetEnd(),
|
||||
0, thickness );
|
||||
m_plotter->BezierCurve( aSeg->GetStart(), aSeg->GetBezControl1(), aSeg->GetBezControl2(),
|
||||
aSeg->GetEnd(), 0, thickness );
|
||||
break;
|
||||
|
||||
case S_POLYGON:
|
||||
|
|
Loading…
Reference in New Issue