37#define PLOT_LINEWIDTH_DEFAULT    ( DEFAULT_TEXT_WIDTH * IU_PER_MM ) 
   39#define SVG_PRECISION_MIN         3U 
   40#define SVG_PRECISION_MAX         6U 
   41#define SVG_PRECISION_DEFAULT     4 
   49using namespace PCBPLOTPARAMS_T;
 
   54    return PCB_PLOT_PARAMS_LEXER::TokenName( aTok );
 
 
  142    aFormatter->
Print( 
"(pcbplotparams" );
 
  149        commonLayers.
set( commonLayer );
 
  151    aFormatter->
Print( 
"(plot_on_all_layers_selection 0x%s)", commonLayers.
FmtHex().c_str() );
 
  200    aFormatter->
Print( 
"(outputformat %d)", 
static_cast<int>( 
m_format ) );
 
  205    aFormatter->
Print( 
")" );
 
 
  211    aParser->
Parse( 
this );
 
 
  348    PCB_PLOT_PARAMS_LEXER( aReader ),
 
 
  355    PCB_PLOT_PARAMS_LEXER( aLine, aSource ),
 
 
  518        newLayers[newLayer] = aLegacyLSET[legacyLayer];
 
 
  528    while( ( token = NextTok() ) != T_RIGHT )
 
  533        if( token == T_LEFT )
 
  536        if( token == T_pcbplotparams )
 
  539        bool skip_right = 
false;
 
  543        case T_layerselection:
 
  545            token = NeedSYMBOLorNUMBER();
 
  547            const std::string& cur = CurStr();
 
  549            if( token == T_NUMBER ) 
 
  557            else if( cur.find_first_of( 
"0x" ) == 0 ) 
 
  566                    legacyLSET.
ParseHex( cur.c_str() + 2, cur.size() - 2 );
 
  577                Expecting( 
"integer or hex layerSelection" );
 
  583        case T_plot_on_all_layers_selection:
 
  585            token = NeedSYMBOLorNUMBER();
 
  587            const std::string& cur = CurStr();
 
  589            if( cur.find_first_of( 
"0x" ) == 0 )
 
  601                    legacyLSET.
ParseHex( cur.c_str() + 2, cur.size() - 2 );
 
  608                    layers.
ParseHex( cur.c_str() + 2, cur.size() - 2 );
 
  615                Expecting( 
"hex plot_on_all_layers_selection" );
 
  621        case T_disableapertmacros:
 
  625        case T_usegerberextensions:
 
  629        case T_usegerberattributes:
 
  633        case T_usegerberadvancedattributes:
 
  637        case T_creategerberjobfile:
 
  641        case T_gerberprecision:
 
  646        case T_dashed_line_dash_ratio:
 
  650        case T_dashed_line_gap_ratio:
 
  666        case T_excludeedgelayer:
 
  685        case T_hpglpennumber:
 
  687        case T_hpglpenoverlay:
 
  689            parseInt( std::numeric_limits<int>::min(), std::numeric_limits<int>::max() );
 
  692        case T_pdf_front_fp_property_popups:
 
  696        case T_pdf_back_fp_property_popups:
 
  704        case T_pdf_single_document:
 
  708        case T_dxfpolygonmode:
 
  712        case T_dxfimperialunits:
 
  716        case T_dxfusepcbnewfont:
 
  729        case T_plot_black_and_white:
 
  733        case T_plotinvisibletext:   
 
  737        case T_sketchpadsonfab:
 
  741        case T_plotpadnumbers:
 
  749        case T_sketchdnponfab:
 
  753        case T_crossoutdnponfab:
 
  757        case T_subtractmaskfromsilk:
 
  775        case T_scaleselection:
 
  779        case T_outputdirectory:
 
  780            NeedSYMBOLorNUMBER();   
 
 
  798    T token = NeedSYMBOL();
 
  811        Expecting( 
"true, false, yes, or no" );
 
 
  821    if( token != T_NUMBER )
 
  822        Expecting( T_NUMBER );
 
  824    int val = atoi( CurText() );
 
  828    else if( val > aMax )
 
 
  839    if( token != T_NUMBER )
 
  840        Expecting( T_NUMBER );
 
 
  851    while( ( token = NextTok() ) != T_EOF )
 
  853        if( token == T_LEFT )
 
  856        if( token == T_RIGHT )
 
 
constexpr EDA_IU_SCALE pcbIUScale
 
int ParseHex(const std::string &str)
Convert the output of FmtHex() and replaces this set's values with those given in the input string.
 
BASE_SET & set(size_t pos)
 
std::string FmtHex() const
Return a hex string showing contents of this set.
 
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
 
double parseDouble()
Parse the current token as an ASCII numeric string with possible leading whitespace into a double pre...
 
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
 
LSET is a set of PCB_LAYER_IDs.
 
LSEQ SeqStackupForPlotting() const
Return the sequence that is typical for a bottom-to-top stack-up.
 
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
 
void skipCurrent()
Skip the current token level.
 
PCB_PLOT_PARAMS_PARSER(LINE_READER *aReader, int aBoardFileVersion)
 
int parseInt(int aMin, int aMax)
Parse an integer and constrains it between two values.
 
double parseDouble()
Parse a double precision floating point number.
 
void Parse(PCB_PLOT_PARAMS *aPcbPlotParams)
 
Parameters and options when plotting/printing a board.
 
bool m_sketchPadsOnFabLayers
Plots pads outlines on fab layers.
 
bool m_crossoutDNPFPsOnFabLayers
 
double m_dashedLineGapRatio
 
std::optional< bool > m_plotViaOnMaskLayer
 
bool m_hideDNPFPsOnFabLayers
 
void SetLayerSelection(const LSET &aSelection)
 
int m_gerberPrecision
Precision of coordinates in Gerber: accepted 5 or 6 when units are in mm, 6 or 7 in inches (but Pcbne...
 
std::shared_ptr< COLOR_SETTINGS > m_default_colors
Pointer to color settings to be used for plotting.
 
bool m_A4Output
In polygon mode, each item to plot is converted to a polygon and all polygons are merged.
 
int m_scaleSelection
Scale ratio index (UI only)
 
DXF_UNITS m_DXFUnits
FILLED or SKETCH for filled objects.
 
PLOT_TEXT_MODE m_textMode
Holes can be not plotted, have a small mark, or be plotted in actual size.
 
void SetPlotOnAllLayersSequence(LSEQ aSeq)
 
bool m_plotValue
Enable plotting of part values.
 
LSEQ m_plotOnAllLayersSequence
 
wxString m_outputDirectory
Output directory for plot files (usually relative to the board file)
 
bool m_PDFMetadata
Generate PDF metadata for SUBJECT and AUTHOR.
 
bool m_autoScale
Autoscale the plot to fit an A4 (landscape?) sheet.
 
bool m_useGerberProtelExtensions
On gerbers 'scrape' away the solder mask from silkscreen (trim silks)
 
bool GetCreateGerberJobFile() const
 
bool m_useAuxOrigin
Plot gerbers using auxiliary (drill) origin instead of absolute coordinates.
 
double m_scale
When true set the scale to fit the board in the page.
 
int m_widthAdjust
Compensation for PS printers/plotters that do not strictly obey line width settings.
 
bool m_PDFFrontFPPropertyPopups
Generate PDF property popup menus for footprints.
 
double m_fineScaleAdjustX
Compensation for printer scale errors (and therefore.
 
friend class PCB_PLOT_PARAMS_PARSER
 
double m_dashedLineDashRatio
 
void SetGerberPrecision(int aPrecision)
 
bool m_blackAndWhite
Plot in negative color (supported only by some drivers)
 
DXF_OUTLINE_MODE GetDXFPlotMode() const override
 
bool m_createGerberJobFile
generate the auxiliary "job file" in gerber format
 
COLOR4D m_PDFBackgroundColor
Background color to use if m_PDFUseBackgroundColor is true.
 
bool m_plotReference
Enable plotting of part references.
 
double m_fineScaleAdjustY
expected to be very near 1.0).
 
bool m_gerberDisableApertMacros
Disable aperture macros in Gerber format (only for broken Gerber readers).
 
void Parse(PCB_PLOT_PARAMS_PARSER *aParser)
 
bool m_subtractMaskFromSilk
Deprecated; only used for reading legacy files.
 
COLOR_SETTINGS * m_colors
 
bool GetUseGerberX2format() const
 
bool m_mirror
Global scale factor, 1.0 plots a board at actual size.
 
bool IsSameAs(const PCB_PLOT_PARAMS &aPcbPlotParams) const
Compare current settings to aPcbPlotParams, including not saved parameters in brd file.
 
bool m_includeGerberNetlistInfo
Include netlist info (only in Gerber X2 format) (chapter ? in revision ?)
 
DXF_OUTLINE_MODE m_DXFPlotMode
 
unsigned m_svgPrecision
Precision of coordinates in SVG: accepted 3 - 6; 6 is the internal resolution of Pcbnew.
 
bool GetIncludeGerberNetlistInfo() const
 
bool m_PDFSingle
Generate a single PDF file for all layers.
 
double GetDashedLineGapRatio() const
 
bool m_PDFBackFPPropertyPopups
on front and/or back of board
 
bool m_sketchDNPFPsOnFabLayers
 
double GetDashedLineDashRatio() const
 
void SetSvgPrecision(unsigned aPrecision)
 
DRILL_MARKS m_drillMarks
Plot pad numbers when sketching pads on fab layers.
 
bool m_useGerberX2format
Include attributes from the Gerber X2 format (chapter 5 in revision J2)
 
bool m_negative
Mirror the plot around the X axis.
 
bool m_plotDrawingSheet
Plot in black and white only.
 
void Format(OUTPUTFORMATTER *aFormatter) const
 
LSET m_layerSelection
Plot format type (chooses the driver to be used)
 
bool m_plotPadNumbers
Used to disable NPTH pads plotting on copper layers.
 
static const char * getTokenName(T aTok)
 
PCB_LAYER_ID
A quick note on layer IDs:
 
#define SVG_PRECISION_MIN
 
static const char * getTokenName(T aTok)
 
static const std::map< LEGACY_PCB_LAYER_ID, PCB_LAYER_ID > s_legacyLayerIdMap
 
LEGACY_PCB_LAYER_ID
These are the layer IDs from before 5e0abadb23425765e164f49ee2f893e94ddb97fc, and are needed for mapp...
 
@ LEGACY_UNSELECTED_LAYER
 
@ LEGACY_PCB_LAYER_ID_COUNT
 
static const int gbrDefaultPrecision
 
#define SVG_PRECISION_MAX
 
#define SVG_PRECISION_DEFAULT
 
LSET remapLegacyLayerLSET(const BASE_SET &aLegacyLSET)
 
DRILL_MARKS
Plots and prints can show holes in pads and vias 3 options are available:
 
PLOT_FORMAT
The set of supported output plot formats.
 
wxString From_UTF8(const char *cstring)
 
std::string FormatDouble2Str(double aValue)
Print a float number without using scientific notation and no trailing 0 This function is intended in...