KiCad PCB EDA Suite
BRDITEMS_PLOTTER Class Reference

#include <pcbplot.h>

Inheritance diagram for BRDITEMS_PLOTTER:
PCB_PLOT_PARAMS

Public Types

enum  DrillMarksType { NO_DRILL_SHAPE = 0, SMALL_DRILL_SHAPE = 1, FULL_DRILL_SHAPE = 2 }
 

Public Member Functions

 BRDITEMS_PLOTTER (PLOTTER *aPlotter, BOARD *aBoard, const PCB_PLOT_PARAMS &aPlotOpts)
 
int getFineWidthAdj ()
 
void SetLayerSet (LSET aLayerMask)
 
void Plot_Edges_Modules ()
 
void Plot_1_EdgeModule (EDGE_MODULE *aEdge)
 
void PlotTextModule (TEXTE_MODULE *aTextMod, COLOR4D aColor)
 
bool PlotAllTextsModule (MODULE *aModule)
 
void PlotDimension (DIMENSION *Dimension)
 
void PlotPcbTarget (PCB_TARGET *PtMire)
 
void PlotFilledAreas (ZONE_CONTAINER *aZone, SHAPE_POLY_SET &aPolysList)
 
void PlotTextePcb (TEXTE_PCB *pt_texte)
 
void PlotDrawSegment (DRAWSEGMENT *PtSegm)
 
void PlotPad (D_PAD *aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPlotMode)
 Plot a pad. More...
 
void PlotBoardGraphicItems ()
 plot items like text and graphics, but not tracks and modules More...
 
void PlotDrillMarks ()
 Function PlotDrillMarks Draw a drill mark for pads and vias. More...
 
COLOR4D getColor (LAYER_NUM aLayer)
 Function getColor. More...
 
void SetSkipPlotNPTH_Pads (bool aSkip)
 
bool GetSkipPlotNPTH_Pads () const
 
void Format (OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControl=0) const
 
void Parse (PCB_PLOT_PARAMS_PARSER *aParser)
 
bool IsSameAs (const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCompareOnlySavedPrms) const
 Compare current settings to aPcbPlotParams, including not saved parameters in brd file. More...
 
void SetColor (COLOR4D aVal)
 
COLOR4D GetColor () const
 
void SetTextMode (PLOT_TEXT_MODE aVal)
 
PLOT_TEXT_MODE GetTextMode () const
 
void SetPlotMode (EDA_DRAW_MODE_T aPlotMode)
 
EDA_DRAW_MODE_T GetPlotMode () const
 
void SetDXFPlotPolygonMode (bool aFlag)
 
bool GetDXFPlotPolygonMode () const
 
void SetDXFPlotUnits (DXF_PLOTTER::DXF_UNITS aUnit)
 
DXF_PLOTTER::DXF_UNITS GetDXFPlotUnits () const
 
void SetDrillMarksType (DrillMarksType aVal)
 
DrillMarksType GetDrillMarksType () const
 
void SetScale (double aVal)
 
double GetScale () const
 
void SetFineScaleAdjustX (double aVal)
 
double GetFineScaleAdjustX () const
 
void SetFineScaleAdjustY (double aVal)
 
double GetFineScaleAdjustY () const
 
void SetWidthAdjust (int aVal)
 
int GetWidthAdjust () const
 
void SetAutoScale (bool aFlag)
 
bool GetAutoScale () const
 
void SetMirror (bool aFlag)
 
bool GetMirror () const
 
void SetPlotPadsOnSilkLayer (bool aFlag)
 
bool GetPlotPadsOnSilkLayer () const
 
void SetPlotInvisibleText (bool aFlag)
 
bool GetPlotInvisibleText () const
 
void SetPlotValue (bool aFlag)
 
bool GetPlotValue () const
 
void SetPlotReference (bool aFlag)
 
bool GetPlotReference () const
 
void SetNegative (bool aFlag)
 
bool GetNegative () const
 
void SetPlotViaOnMaskLayer (bool aFlag)
 
bool GetPlotViaOnMaskLayer () const
 
void SetPlotFrameRef (bool aFlag)
 
bool GetPlotFrameRef () const
 
void SetExcludeEdgeLayer (bool aFlag)
 
bool GetExcludeEdgeLayer () const
 
void SetFormat (PLOT_FORMAT aFormat)
 
PLOT_FORMAT GetFormat () const
 
void SetOutputDirectory (wxString aDir)
 
wxString GetOutputDirectory () const
 
void SetUseGerberX2format (bool aUse)
 
bool GetUseGerberX2format () const
 
void SetIncludeGerberNetlistInfo (bool aUse)
 
bool GetIncludeGerberNetlistInfo () const
 
void SetCreateGerberJobFile (bool aCreate)
 
bool GetCreateGerberJobFile () const
 
void SetUseGerberProtelExtensions (bool aUse)
 
bool GetUseGerberProtelExtensions () const
 
void SetGerberPrecision (int aPrecision)
 
int GetGerberPrecision () const
 
void SetSubtractMaskFromSilk (bool aSubtract)
 
bool GetSubtractMaskFromSilk () const
 
void SetLayerSelection (LSET aSelection)
 
LSET GetLayerSelection () const
 
void SetUseAuxOrigin (bool aAux)
 
bool GetUseAuxOrigin () const
 
void SetScaleSelection (int aSelection)
 
int GetScaleSelection () const
 
void SetA4Output (int aForce)
 
bool GetA4Output () const
 
double GetHPGLPenDiameter () const
 
bool SetHPGLPenDiameter (double aValue)
 
int GetHPGLPenSpeed () const
 
bool SetHPGLPenSpeed (int aValue)
 
void SetHPGLPenNum (int aVal)
 
int GetHPGLPenNum () const
 
int GetLineWidth () const
 
bool SetLineWidth (int aValue)
 

Static Public Member Functions

static int GetGerberDefaultPrecision ()
 Default precision of coordinates in Gerber files. More...
 

Private Member Functions

void plotOneDrillMark (PAD_DRILL_SHAPE_T aDrillShape, const wxPoint &aDrillPos, wxSize aDrillSize, const wxSize &aPadSize, double aOrientation, int aSmallDrill)
 Helper function to plot a single drill mark. More...
 

Private Attributes

PLOTTERm_plotter
 
BOARDm_board
 
LSET m_layerMask
 

Detailed Description

Definition at line 77 of file pcbplot.h.

Member Enumeration Documentation

◆ DrillMarksType

Enumerator
NO_DRILL_SHAPE 
SMALL_DRILL_SHAPE 
FULL_DRILL_SHAPE 

Definition at line 41 of file pcb_plot_params.h.

Constructor & Destructor Documentation

◆ BRDITEMS_PLOTTER()

BRDITEMS_PLOTTER::BRDITEMS_PLOTTER ( PLOTTER aPlotter,
BOARD aBoard,
const PCB_PLOT_PARAMS aPlotOpts 
)
inline

Definition at line 84 of file pcbplot.h.

84  :
85  PCB_PLOT_PARAMS( aPlotOpts )
86  {
87  m_plotter = aPlotter;
88  m_board = aBoard;
89  }
PLOTTER * m_plotter
Definition: pcbplot.h:79
BOARD * m_board
Definition: pcbplot.h:80

References m_board, and m_plotter.

Member Function Documentation

◆ Format()

void PCB_PLOT_PARAMS::Format ( OUTPUTFORMATTER aFormatter,
int  aNestLevel,
int  aControl = 0 
) const
inherited

Definition at line 152 of file pcb_plot_params.cpp.

154 {
155  const char* falseStr = getTokenName( T_false );
156  const char* trueStr = getTokenName( T_true );
157 
158  aFormatter->Print( aNestLevel, "(%s\n", getTokenName( T_pcbplotparams ) );
159 
160  aFormatter->Print( aNestLevel+1, "(%s 0x%s)\n", getTokenName( T_layerselection ),
161  m_layerSelection.FmtHex().c_str() );
162 
163  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
164  m_useGerberProtelExtensions ? trueStr : falseStr );
165 
166  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberattributes ),
167  GetUseGerberX2format() ? trueStr : falseStr );
168 
169  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberadvancedattributes ),
170  GetIncludeGerberNetlistInfo() ? trueStr : falseStr );
171 
172  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_creategerberjobfile ),
173  GetCreateGerberJobFile() ? trueStr : falseStr );
174 
175  if( m_gerberPrecision != gbrDefaultPrecision ) // save this option only if it is not the default value,
176  // to avoid incompatibility with older Pcbnew version
177  aFormatter->Print( aNestLevel+1, "(%s %d)\n",
178  getTokenName( T_gerberprecision ), m_gerberPrecision );
179 
180  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_excludeedgelayer ),
181  m_excludeEdgeLayer ? trueStr : falseStr );
182  aFormatter->Print( aNestLevel+1, "(%s %f)\n", getTokenName( T_linewidth ),
183  m_lineWidth / IU_PER_MM );
184  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotframeref ),
185  m_plotFrameRef ? trueStr : falseStr );
186  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_viasonmask ),
187  m_plotViaOnMaskLayer ? trueStr : falseStr );
188  aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_mode ),
189  GetPlotMode() == SKETCH ? 2 : 1 ); // Value 0 (LINE mode) no more used
190  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_useauxorigin ),
191  m_useAuxOrigin ? trueStr : falseStr );
192  aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpennumber ),
193  m_HPGLPenNum );
194 
195  // Obsolete parameter, pen speed is no more managed, because hpgl format
196  // is now an export format, and for this, pen speed has no meaning
197  // aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ),
198  // m_HPGLPenSpeed );
199 
200  aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ),
201  m_HPGLPenSpeed );
202  aFormatter->Print( aNestLevel+1, "(%s %f)\n", getTokenName( T_hpglpendiameter ),
203  m_HPGLPenDiam );
204  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psnegative ),
205  m_negative ? trueStr : falseStr );
206  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psa4output ),
207  m_A4Output ? trueStr : falseStr );
208  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotreference ),
209  m_plotReference ? trueStr : falseStr );
210  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotvalue ),
211  m_plotValue ? trueStr : falseStr );
212  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotinvisibletext ),
213  m_plotInvisibleText ? trueStr : falseStr );
214  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_padsonsilk ),
215  m_plotPadsOnSilkLayer ? trueStr : falseStr );
216  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_subtractmaskfromsilk ),
217  m_subtractMaskFromSilk ? trueStr : falseStr );
218  aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_outputformat ),
219  static_cast<int>( m_format ) );
220  aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_mirror ),
221  m_mirror ? trueStr : falseStr );
222  aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_drillshape ),
223  m_drillMarks );
224  aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_scaleselection ),
226  aFormatter->Print( aNestLevel+1, "(%s \"%s\")", getTokenName( T_outputdirectory ),
227  (const char*) m_outputDirectory.utf8_str() );
228  aFormatter->Print( 0, "\n" );
229  aFormatter->Print( aNestLevel, ")\n" );
230 }
bool m_plotValue
Enable plotting of part values.
bool GetCreateGerberJobFile() const
wxString m_outputDirectory
Output directory for plot files (usually relative to the board file)
bool m_mirror
Mirror the plot around the X axis.
bool m_excludeEdgeLayer
If false always plot (merge) the pcb edge layer on other layers.
static const int gbrDefaultPrecision
bool m_plotPadsOnSilkLayer
Allows pads outlines on silkscreen layer (when pads are also on silk screen)
bool m_plotReference
Enable plotting of part references.
bool m_useGerberProtelExtensions
When plotting gerber files, use a conventional set of Protel extensions instead of ....
int m_scaleSelection
Scale ratio index (UI only)
bool m_negative
Plot in negative color (supported only by some drivers)
bool GetUseGerberX2format() const
bool m_plotFrameRef
True to plot/print frame references.
double m_HPGLPenDiam
HPGL only: pen diameter in MILS, useful to fill areas However, it is in mm in hpgl files.
bool m_plotInvisibleText
Force plotting of fields marked invisible.
bool m_A4Output
Autoscale the plot to fit an A4 (landscape?) sheet.
bool m_subtractMaskFromSilk
On gerbers 'scrape' away the solder mask from silkscreen (trim silks)
bool GetIncludeGerberNetlistInfo() const
bool m_plotViaOnMaskLayer
True if vias are drawn on Mask layer (ie untented, exposed by mask)
static const char * getTokenName(T aTok)
bool m_useAuxOrigin
Plot gerbers using auxiliary (drill) origin instead of absolue coordinates.
PLOT_FORMAT m_format
Plot format type (chooses the driver to be used)
int m_HPGLPenNum
HPGL only: pen number selection(1 to 9)
LSET m_layerSelection
Set of layers to plot.
std::string FmtHex() const
Function FmtHex returns a hex string showing contents of this LSEQ.
Definition: lset.cpp:288
int m_HPGLPenSpeed
HPGL only: pen speed, always in cm/s (1 to 99 cm/s)
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Function Print formats and writes text to the output stream.
Definition: richio.cpp:404
DrillMarksType m_drillMarks
Holes can be not plotted, have a small mark or plotted in actual size.
int m_lineWidth
The default line width (used to draw items having no defined width)
int m_gerberPrecision
precision of coordinates in Gerber files: accepted 5 or 6 when units are in mm (6 or 7 in inches,...
EDA_DRAW_MODE_T GetPlotMode() const

References gbrDefaultPrecision, getTokenName(), OUTPUTFORMATTER::Print(), and SKETCH.

Referenced by PCB_IO::formatSetup().

◆ GetA4Output()

bool PCB_PLOT_PARAMS::GetA4Output ( ) const
inlineinherited

Definition at line 309 of file pcb_plot_params.h.

309 { return m_A4Output; };
bool m_A4Output
Autoscale the plot to fit an A4 (landscape?) sheet.

References PCB_PLOT_PARAMS::m_A4Output.

Referenced by DIALOG_PLOT::init_Dialog(), and initializePlotter().

◆ GetAutoScale()

bool PCB_PLOT_PARAMS::GetAutoScale ( ) const
inlineinherited

Definition at line 235 of file pcb_plot_params.h.

235 { return m_autoScale; }
bool m_autoScale
When true set the scale to fit the board in the page.

References PCB_PLOT_PARAMS::m_autoScale.

Referenced by initializePlotter().

◆ getColor()

COLOR4D BRDITEMS_PLOTTER::getColor ( LAYER_NUM  aLayer)

Function getColor.

Returns
the layer color
Parameters
aLayer= the layer id White color is special: cannot be seen on a white paper and in B&W mode, is plotted as white but other colors are plotted in BLACK so the returned color is LIGHTGRAY when the layer color is WHITE

Definition at line 75 of file plot_brditems_plotter.cpp.

76 {
77  COLOR4D color = m_board->Colors().GetLayerColor( aLayer );
78 
79  // A hack to avoid plotting ahite itmen in white color, expecting the paper
80  // is also white: use a non white color:
81  if( color == COLOR4D::WHITE )
82  color = COLOR4D( LIGHTGRAY );
83 
84  return color;
85 }
int color
Definition: DXF_plotter.cpp:61
BOARD * m_board
Definition: pcbplot.h:80
COLOR4D GetLayerColor(LAYER_NUM aLayer) const
Function GetLayerColor.
const COLORS_DESIGN_SETTINGS & Colors() const
Function GetColorSettings.
Definition: class_board.h:560
Definition: colors.h:49
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39

References color, BOARD::Colors(), COLORS_DESIGN_SETTINGS::GetLayerColor(), LIGHTGRAY, m_board, and WHITE.

Referenced by Plot_1_EdgeModule(), PlotAllTextsModule(), PlotDrawSegment(), PlotFilledAreas(), PlotPcbTarget(), PlotStandardLayer(), and PlotTextePcb().

◆ GetColor()

COLOR4D PCB_PLOT_PARAMS::GetColor ( ) const
inlineinherited

Definition at line 193 of file pcb_plot_params.h.

193 { return m_color; }
COLOR4D m_color
Color for plotting the current layer. Provided, but not really used.

References PCB_PLOT_PARAMS::m_color.

Referenced by PlotDrillMarks(), and PlotOneBoardLayer().

◆ GetCreateGerberJobFile()

bool PCB_PLOT_PARAMS::GetCreateGerberJobFile ( ) const
inlineinherited

Definition at line 282 of file pcb_plot_params.h.

282 { return m_createGerberJobFile; }
bool m_createGerberJobFile
generate the auxiliary "job file" in gerber format

References PCB_PLOT_PARAMS::m_createGerberJobFile.

Referenced by DIALOG_PLOT::init_Dialog(), and DIALOG_PLOT::Plot().

◆ GetDrillMarksType()

DrillMarksType PCB_PLOT_PARAMS::GetDrillMarksType ( ) const
inlineinherited

Definition at line 222 of file pcb_plot_params.h.

222 { return m_drillMarks; }
DrillMarksType m_drillMarks
Holes can be not plotted, have a small mark or plotted in actual size.

References PCB_PLOT_PARAMS::m_drillMarks.

Referenced by DIALOG_PLOT::init_Dialog(), PlotDrillMarks(), PlotLayerOutlines(), and PlotStandardLayer().

◆ GetDXFPlotPolygonMode()

bool PCB_PLOT_PARAMS::GetDXFPlotPolygonMode ( ) const
inlineinherited

Definition at line 209 of file pcb_plot_params.h.

209 { return m_DXFplotPolygonMode; }
bool m_DXFplotPolygonMode
DXF format: Plot items in outline (polygon) mode In polygon mode, each item to plot is converted to a...

References PCB_PLOT_PARAMS::m_DXFplotPolygonMode.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotOneBoardLayer().

◆ GetDXFPlotUnits()

DXF_PLOTTER::DXF_UNITS PCB_PLOT_PARAMS::GetDXFPlotUnits ( ) const
inlineinherited

Definition at line 216 of file pcb_plot_params.h.

217  {
218  return m_DXFplotUnits;
219  }
DXF_PLOTTER::DXF_UNITS m_DXFplotUnits
DXF format: Units to use when plotting the DXF.

References PCB_PLOT_PARAMS::m_DXFplotUnits.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetExcludeEdgeLayer()

bool PCB_PLOT_PARAMS::GetExcludeEdgeLayer ( ) const
inlineinherited

Definition at line 260 of file pcb_plot_params.h.

260 { return m_excludeEdgeLayer; }
bool m_excludeEdgeLayer
If false always plot (merge) the pcb edge layer on other layers.

References PCB_PLOT_PARAMS::m_excludeEdgeLayer.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotOneBoardLayer().

◆ GetFineScaleAdjustX()

double PCB_PLOT_PARAMS::GetFineScaleAdjustX ( ) const
inlineinherited

Definition at line 228 of file pcb_plot_params.h.

228 { return m_fineScaleAdjustX; }
double m_fineScaleAdjustX
fine scale adjust X axis

References PCB_PLOT_PARAMS::m_fineScaleAdjustX.

Referenced by StartPlotBoard().

◆ GetFineScaleAdjustY()

double PCB_PLOT_PARAMS::GetFineScaleAdjustY ( ) const
inlineinherited

Definition at line 230 of file pcb_plot_params.h.

230 { return m_fineScaleAdjustY; }
double m_fineScaleAdjustY
fine scale adjust Y axis

References PCB_PLOT_PARAMS::m_fineScaleAdjustY.

Referenced by StartPlotBoard().

◆ getFineWidthAdj()

int BRDITEMS_PLOTTER::getFineWidthAdj ( )
inline
Returns
a 'width adjustment' for the postscript engine (useful for controlling toner bleeding during direct transfer) added to track width and via/pads size

Definition at line 96 of file pcbplot.h.

97  {
98  if( GetFormat() == PLOT_FORMAT::POST )
99  return GetWidthAdjust();
100  else
101  return 0;
102  }
int GetWidthAdjust() const
PLOT_FORMAT GetFormat() const

References PCB_PLOT_PARAMS::GetFormat(), PCB_PLOT_PARAMS::GetWidthAdjust(), and POST.

Referenced by plotOneDrillMark(), and PlotStandardLayer().

◆ GetFormat()

PLOT_FORMAT PCB_PLOT_PARAMS::GetFormat ( ) const
inlineinherited

Definition at line 267 of file pcb_plot_params.h.

268  {
269  return m_format;
270  }
PLOT_FORMAT m_format
Plot format type (chooses the driver to be used)

References PCB_PLOT_PARAMS::m_format.

Referenced by getFineWidthAdj(), DIALOG_PLOT::init_Dialog(), DIALOG_PLOT::Plot(), PlotOneBoardLayer(), and StartPlotBoard().

◆ GetGerberDefaultPrecision()

static int PCB_PLOT_PARAMS::GetGerberDefaultPrecision ( )
inlinestaticinherited

Default precision of coordinates in Gerber files.

when units are in mm (7 in inches, but Pcbnew uses mm). 6 is the internal resolution of Pcbnew, so the default is 6

Definition at line 294 of file pcb_plot_params.h.

294 { return 6; }

◆ GetGerberPrecision()

int PCB_PLOT_PARAMS::GetGerberPrecision ( ) const
inlineinherited

Definition at line 288 of file pcb_plot_params.h.

288 { return m_gerberPrecision; }
int m_gerberPrecision
precision of coordinates in Gerber files: accepted 5 or 6 when units are in mm (6 or 7 in inches,...

References PCB_PLOT_PARAMS::m_gerberPrecision.

Referenced by DIALOG_GENDRILL::GenDrillAndMapFiles(), DIALOG_PLOT::init_Dialog(), initializePlotter(), and DIALOG_GENDRILL::onFileFormatSelection().

◆ GetHPGLPenDiameter()

double PCB_PLOT_PARAMS::GetHPGLPenDiameter ( ) const
inlineinherited

Definition at line 313 of file pcb_plot_params.h.

313 { return m_HPGLPenDiam; };
double m_HPGLPenDiam
HPGL only: pen diameter in MILS, useful to fill areas However, it is in mm in hpgl files.

References PCB_PLOT_PARAMS::m_HPGLPenDiam.

Referenced by DIALOG_PLOT::applyPlotSettings(), ConfigureHPGLPenSizes(), and DIALOG_PLOT::init_Dialog().

◆ GetHPGLPenNum()

int PCB_PLOT_PARAMS::GetHPGLPenNum ( ) const
inlineinherited

Definition at line 321 of file pcb_plot_params.h.

321 { return m_HPGLPenNum; }
int m_HPGLPenNum
HPGL only: pen number selection(1 to 9)

References PCB_PLOT_PARAMS::m_HPGLPenNum.

Referenced by ConfigureHPGLPenSizes(), and GENDRILL_WRITER_BASE::genDrillMapFile().

◆ GetHPGLPenSpeed()

int PCB_PLOT_PARAMS::GetHPGLPenSpeed ( ) const
inlineinherited

Definition at line 317 of file pcb_plot_params.h.

317 { return m_HPGLPenSpeed; };
int m_HPGLPenSpeed
HPGL only: pen speed, always in cm/s (1 to 99 cm/s)

References PCB_PLOT_PARAMS::m_HPGLPenSpeed.

Referenced by ConfigureHPGLPenSizes(), and GENDRILL_WRITER_BASE::genDrillMapFile().

◆ GetIncludeGerberNetlistInfo()

bool PCB_PLOT_PARAMS::GetIncludeGerberNetlistInfo ( ) const
inlineinherited

Definition at line 279 of file pcb_plot_params.h.

279 { return m_includeGerberNetlistInfo; }
bool m_includeGerberNetlistInfo
Include netlist info (only in Gerber X2 format) (chapter ? in revision ?)

References PCB_PLOT_PARAMS::m_includeGerberNetlistInfo.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetLayerSelection()

LSET PCB_PLOT_PARAMS::GetLayerSelection ( ) const
inlineinherited

Definition at line 300 of file pcb_plot_params.h.

300 { return m_layerSelection; };
LSET m_layerSelection
Set of layers to plot.

References PCB_PLOT_PARAMS::m_layerSelection.

Referenced by DIALOG_PLOT::init_Dialog(), and DIALOG_PLOT::Plot().

◆ GetLineWidth()

int PCB_PLOT_PARAMS::GetLineWidth ( ) const
inlineinherited

Definition at line 323 of file pcb_plot_params.h.

323 { return m_lineWidth; };
int m_lineWidth
The default line width (used to draw items having no defined width)

References PCB_PLOT_PARAMS::m_lineWidth.

Referenced by DIALOG_PLOT::applyPlotSettings(), DIALOG_PLOT::init_Dialog(), and initializePlotter().

◆ GetMirror()

bool PCB_PLOT_PARAMS::GetMirror ( ) const
inlineinherited

Definition at line 238 of file pcb_plot_params.h.

238 { return m_mirror; }
bool m_mirror
Mirror the plot around the X axis.

References PCB_PLOT_PARAMS::m_mirror.

Referenced by DIALOG_PLOT::init_Dialog(), initializePlotter(), and StartPlotBoard().

◆ GetNegative()

bool PCB_PLOT_PARAMS::GetNegative ( ) const
inlineinherited

Definition at line 251 of file pcb_plot_params.h.

251 { return m_negative; }
bool m_negative
Plot in negative color (supported only by some drivers)

References PCB_PLOT_PARAMS::m_negative.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetOutputDirectory()

◆ GetPlotFrameRef()

bool PCB_PLOT_PARAMS::GetPlotFrameRef ( ) const
inlineinherited

Definition at line 257 of file pcb_plot_params.h.

257 { return m_plotFrameRef; }
bool m_plotFrameRef
True to plot/print frame references.

References PCB_PLOT_PARAMS::m_plotFrameRef.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetPlotInvisibleText()

bool PCB_PLOT_PARAMS::GetPlotInvisibleText ( ) const
inlineinherited

Definition at line 244 of file pcb_plot_params.h.

244 { return m_plotInvisibleText; }
bool m_plotInvisibleText
Force plotting of fields marked invisible.

References PCB_PLOT_PARAMS::m_plotInvisibleText.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotAllTextsModule().

◆ GetPlotMode()

EDA_DRAW_MODE_T PCB_PLOT_PARAMS::GetPlotMode ( ) const
inlineinherited

Definition at line 206 of file pcb_plot_params.h.

206 { return m_plotMode; }
EDA_DRAW_MODE_T m_plotMode
FILLED or SKETCH selects how to plot filled objects.

References PCB_PLOT_PARAMS::m_plotMode.

Referenced by DIALOG_PLOT::init_Dialog(), Plot_1_EdgeModule(), PlotDrawSegment(), PlotDrillMarks(), PlotFilledAreas(), plotOneDrillMark(), and PlotStandardLayer().

◆ GetPlotPadsOnSilkLayer()

bool PCB_PLOT_PARAMS::GetPlotPadsOnSilkLayer ( ) const
inlineinherited

Definition at line 241 of file pcb_plot_params.h.

241 { return m_plotPadsOnSilkLayer; }
bool m_plotPadsOnSilkLayer
Allows pads outlines on silkscreen layer (when pads are also on silk screen)

References PCB_PLOT_PARAMS::m_plotPadsOnSilkLayer.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotSilkScreen().

◆ GetPlotReference()

bool PCB_PLOT_PARAMS::GetPlotReference ( ) const
inlineinherited

Definition at line 248 of file pcb_plot_params.h.

248 { return m_plotReference; }
bool m_plotReference
Enable plotting of part references.

References PCB_PLOT_PARAMS::m_plotReference.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotAllTextsModule().

◆ GetPlotValue()

bool PCB_PLOT_PARAMS::GetPlotValue ( ) const
inlineinherited

Definition at line 246 of file pcb_plot_params.h.

246 { return m_plotValue; }
bool m_plotValue
Enable plotting of part values.

References PCB_PLOT_PARAMS::m_plotValue.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotAllTextsModule().

◆ GetPlotViaOnMaskLayer()

bool PCB_PLOT_PARAMS::GetPlotViaOnMaskLayer ( ) const
inlineinherited

Definition at line 254 of file pcb_plot_params.h.

254 { return m_plotViaOnMaskLayer; }
bool m_plotViaOnMaskLayer
True if vias are drawn on Mask layer (ie untented, exposed by mask)

References PCB_PLOT_PARAMS::m_plotViaOnMaskLayer.

Referenced by DIALOG_PLOT::init_Dialog(), PlotSolderMaskLayer(), and PlotStandardLayer().

◆ GetScale()

double PCB_PLOT_PARAMS::GetScale ( ) const
inlineinherited

Definition at line 225 of file pcb_plot_params.h.

225 { return m_scale; }
double m_scale
Global scale factor, 1.0 plots a board with its actual size.

References PCB_PLOT_PARAMS::m_scale.

Referenced by ConfigureHPGLPenSizes(), initializePlotter(), and DIALOG_PLOT::Plot().

◆ GetScaleSelection()

int PCB_PLOT_PARAMS::GetScaleSelection ( ) const
inlineinherited

Definition at line 306 of file pcb_plot_params.h.

306 { return m_scaleSelection; };
int m_scaleSelection
Scale ratio index (UI only)

References PCB_PLOT_PARAMS::m_scaleSelection.

Referenced by DIALOG_PLOT::init_Dialog(), and DIALOG_PLOT::Plot().

◆ GetSkipPlotNPTH_Pads()

bool PCB_PLOT_PARAMS::GetSkipPlotNPTH_Pads ( ) const
inlineinherited

Definition at line 178 of file pcb_plot_params.h.

178 { return m_skipNPTH_Pads; }

References PCB_PLOT_PARAMS::m_skipNPTH_Pads.

Referenced by PlotStandardLayer().

◆ GetSubtractMaskFromSilk()

bool PCB_PLOT_PARAMS::GetSubtractMaskFromSilk ( ) const
inlineinherited

Definition at line 297 of file pcb_plot_params.h.

297 { return m_subtractMaskFromSilk; }
bool m_subtractMaskFromSilk
On gerbers 'scrape' away the solder mask from silkscreen (trim silks)

References PCB_PLOT_PARAMS::m_subtractMaskFromSilk.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotOneBoardLayer().

◆ GetTextMode()

PLOT_TEXT_MODE PCB_PLOT_PARAMS::GetTextMode ( ) const
inlineinherited

Definition at line 200 of file pcb_plot_params.h.

201  {
202  return m_textMode;
203  }
PLOT_TEXT_MODE m_textMode
Choose how represent text with PS, PDF and DXF drivers.

References PCB_PLOT_PARAMS::m_textMode.

Referenced by DIALOG_PLOT::init_Dialog(), initializePlotter(), and PlotOneBoardLayer().

◆ GetUseAuxOrigin()

bool PCB_PLOT_PARAMS::GetUseAuxOrigin ( ) const
inlineinherited

Definition at line 303 of file pcb_plot_params.h.

303 { return m_useAuxOrigin; };
bool m_useAuxOrigin
Plot gerbers using auxiliary (drill) origin instead of absolue coordinates.

References PCB_PLOT_PARAMS::m_useAuxOrigin.

Referenced by AddGerberX2Header(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), DIALOG_PLOT::init_Dialog(), DIALOG_GENDRILL::initDialog(), initializePlotter(), and DIALOG_PLOT::reInitDialog().

◆ GetUseGerberProtelExtensions()

bool PCB_PLOT_PARAMS::GetUseGerberProtelExtensions ( ) const
inlineinherited

Definition at line 285 of file pcb_plot_params.h.

285 { return m_useGerberProtelExtensions; }
bool m_useGerberProtelExtensions
When plotting gerber files, use a conventional set of Protel extensions instead of ....

References PCB_PLOT_PARAMS::m_useGerberProtelExtensions.

Referenced by DIALOG_PLOT::init_Dialog().

◆ GetUseGerberX2format()

bool PCB_PLOT_PARAMS::GetUseGerberX2format ( ) const
inlineinherited

Definition at line 276 of file pcb_plot_params.h.

276 { return m_useGerberX2format; }
bool m_useGerberX2format
Include attributes from the Gerber X2 format (chapter 5 in revision J2)

References PCB_PLOT_PARAMS::m_useGerberX2format.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetWidthAdjust()

int PCB_PLOT_PARAMS::GetWidthAdjust ( ) const
inlineinherited

Definition at line 232 of file pcb_plot_params.h.

232 { return m_widthAdjust; }
int m_widthAdjust
This width factor is intended to compensate PS printers/ plotters that do not strictly obey line widt...

References PCB_PLOT_PARAMS::m_widthAdjust.

Referenced by getFineWidthAdj().

◆ IsSameAs()

bool PCB_PLOT_PARAMS::IsSameAs ( const PCB_PLOT_PARAMS aPcbPlotParams,
bool  aCompareOnlySavedPrms 
) const
inherited

Compare current settings to aPcbPlotParams, including not saved parameters in brd file.

Parameters
aPcbPlotParams= the PCB_PLOT_PARAMS to compare
aCompareOnlySavedPrms= true to compare only saved in file parameters, and false to compare the full set of parameters.
Returns
true is parameters are same, false if one (or more) parameter does not match

Definition at line 239 of file pcb_plot_params.cpp.

240 {
241  if( m_layerSelection != aPcbPlotParams.m_layerSelection )
242  return false;
244  return false;
245  if( m_useGerberX2format != aPcbPlotParams.m_useGerberX2format )
246  return false;
248  return false;
249  if( m_createGerberJobFile != aPcbPlotParams.m_createGerberJobFile )
250  return false;
251  if( m_gerberPrecision != aPcbPlotParams.m_gerberPrecision )
252  return false;
253  if( m_excludeEdgeLayer != aPcbPlotParams.m_excludeEdgeLayer )
254  return false;
255  if( m_lineWidth != aPcbPlotParams.m_lineWidth )
256  return false;
257  if( m_plotFrameRef != aPcbPlotParams.m_plotFrameRef )
258  return false;
259  if( m_plotViaOnMaskLayer != aPcbPlotParams.m_plotViaOnMaskLayer )
260  return false;
261  if( m_plotMode != aPcbPlotParams.m_plotMode )
262  return false;
263  if( !aCompareOnlySavedPrms )
264  {
265  if( m_DXFplotPolygonMode != aPcbPlotParams.m_DXFplotPolygonMode )
266  return false;
267  if( m_DXFplotUnits != aPcbPlotParams.m_DXFplotUnits )
268  return false;
269  }
270  if( m_useAuxOrigin != aPcbPlotParams.m_useAuxOrigin )
271  return false;
272  if( m_HPGLPenNum != aPcbPlotParams.m_HPGLPenNum )
273  return false;
274  if( m_HPGLPenSpeed != aPcbPlotParams.m_HPGLPenSpeed )
275  return false;
276  if( m_HPGLPenDiam != aPcbPlotParams.m_HPGLPenDiam )
277  return false;
278  if( m_negative != aPcbPlotParams.m_negative )
279  return false;
280  if( m_A4Output != aPcbPlotParams.m_A4Output )
281  return false;
282  if( m_plotReference != aPcbPlotParams.m_plotReference )
283  return false;
284  if( m_plotValue != aPcbPlotParams.m_plotValue )
285  return false;
286  if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText )
287  return false;
288  if( m_plotPadsOnSilkLayer != aPcbPlotParams.m_plotPadsOnSilkLayer )
289  return false;
290  if( m_subtractMaskFromSilk != aPcbPlotParams.m_subtractMaskFromSilk )
291  return false;
292  if( m_format != aPcbPlotParams.m_format )
293  return false;
294  if( m_mirror != aPcbPlotParams.m_mirror )
295  return false;
296  if( m_drillMarks != aPcbPlotParams.m_drillMarks )
297  return false;
298  if( m_scaleSelection != aPcbPlotParams.m_scaleSelection )
299  return false;
300  if( m_autoScale != aPcbPlotParams.m_autoScale )
301  return false;
302  if( m_scale != aPcbPlotParams.m_scale )
303  return false;
304  if( m_fineScaleAdjustX != aPcbPlotParams.m_fineScaleAdjustX )
305  return false;
306  if( m_fineScaleAdjustY != aPcbPlotParams.m_fineScaleAdjustY )
307  return false;
308  if( m_widthAdjust != aPcbPlotParams.m_widthAdjust )
309  return false;
310  if( !aCompareOnlySavedPrms )
311  {
312  if( m_color != aPcbPlotParams.m_color )
313  return false;
314  }
315  if( m_textMode != aPcbPlotParams.m_textMode )
316  return false;
317  if( !m_outputDirectory.IsSameAs( aPcbPlotParams.m_outputDirectory ) )
318  return false;
319 
320  return true;
321 }
double m_fineScaleAdjustX
fine scale adjust X axis
DXF_PLOTTER::DXF_UNITS m_DXFplotUnits
DXF format: Units to use when plotting the DXF.
bool m_plotValue
Enable plotting of part values.
wxString m_outputDirectory
Output directory for plot files (usually relative to the board file)
bool m_mirror
Mirror the plot around the X axis.
bool m_excludeEdgeLayer
If false always plot (merge) the pcb edge layer on other layers.
bool m_plotPadsOnSilkLayer
Allows pads outlines on silkscreen layer (when pads are also on silk screen)
bool m_useGerberX2format
Include attributes from the Gerber X2 format (chapter 5 in revision J2)
double m_scale
Global scale factor, 1.0 plots a board with its actual size.
bool m_plotReference
Enable plotting of part references.
bool m_useGerberProtelExtensions
When plotting gerber files, use a conventional set of Protel extensions instead of ....
int m_scaleSelection
Scale ratio index (UI only)
bool m_negative
Plot in negative color (supported only by some drivers)
bool m_plotFrameRef
True to plot/print frame references.
double m_HPGLPenDiam
HPGL only: pen diameter in MILS, useful to fill areas However, it is in mm in hpgl files.
bool m_includeGerberNetlistInfo
Include netlist info (only in Gerber X2 format) (chapter ? in revision ?)
bool m_plotInvisibleText
Force plotting of fields marked invisible.
bool m_DXFplotPolygonMode
DXF format: Plot items in outline (polygon) mode In polygon mode, each item to plot is converted to a...
bool m_autoScale
When true set the scale to fit the board in the page.
bool m_A4Output
Autoscale the plot to fit an A4 (landscape?) sheet.
bool m_subtractMaskFromSilk
On gerbers 'scrape' away the solder mask from silkscreen (trim silks)
double m_fineScaleAdjustY
fine scale adjust Y axis
bool m_plotViaOnMaskLayer
True if vias are drawn on Mask layer (ie untented, exposed by mask)
int m_widthAdjust
This width factor is intended to compensate PS printers/ plotters that do not strictly obey line widt...
bool m_useAuxOrigin
Plot gerbers using auxiliary (drill) origin instead of absolue coordinates.
PLOT_FORMAT m_format
Plot format type (chooses the driver to be used)
bool m_createGerberJobFile
generate the auxiliary "job file" in gerber format
int m_HPGLPenNum
HPGL only: pen number selection(1 to 9)
COLOR4D m_color
Color for plotting the current layer. Provided, but not really used.
LSET m_layerSelection
Set of layers to plot.
EDA_DRAW_MODE_T m_plotMode
FILLED or SKETCH selects how to plot filled objects.
PLOT_TEXT_MODE m_textMode
Choose how represent text with PS, PDF and DXF drivers.
int m_HPGLPenSpeed
HPGL only: pen speed, always in cm/s (1 to 99 cm/s)
DrillMarksType m_drillMarks
Holes can be not plotted, have a small mark or plotted in actual size.
int m_lineWidth
The default line width (used to draw items having no defined width)
int m_gerberPrecision
precision of coordinates in Gerber files: accepted 5 or 6 when units are in mm (6 or 7 in inches,...

References PCB_PLOT_PARAMS::m_A4Output, PCB_PLOT_PARAMS::m_autoScale, PCB_PLOT_PARAMS::m_color, PCB_PLOT_PARAMS::m_createGerberJobFile, PCB_PLOT_PARAMS::m_drillMarks, PCB_PLOT_PARAMS::m_DXFplotPolygonMode, PCB_PLOT_PARAMS::m_DXFplotUnits, PCB_PLOT_PARAMS::m_excludeEdgeLayer, PCB_PLOT_PARAMS::m_fineScaleAdjustX, PCB_PLOT_PARAMS::m_fineScaleAdjustY, PCB_PLOT_PARAMS::m_format, PCB_PLOT_PARAMS::m_gerberPrecision, PCB_PLOT_PARAMS::m_HPGLPenDiam, PCB_PLOT_PARAMS::m_HPGLPenNum, PCB_PLOT_PARAMS::m_HPGLPenSpeed, PCB_PLOT_PARAMS::m_includeGerberNetlistInfo, PCB_PLOT_PARAMS::m_layerSelection, PCB_PLOT_PARAMS::m_lineWidth, PCB_PLOT_PARAMS::m_mirror, PCB_PLOT_PARAMS::m_negative, PCB_PLOT_PARAMS::m_outputDirectory, PCB_PLOT_PARAMS::m_plotFrameRef, PCB_PLOT_PARAMS::m_plotInvisibleText, PCB_PLOT_PARAMS::m_plotMode, PCB_PLOT_PARAMS::m_plotPadsOnSilkLayer, PCB_PLOT_PARAMS::m_plotReference, PCB_PLOT_PARAMS::m_plotValue, PCB_PLOT_PARAMS::m_plotViaOnMaskLayer, PCB_PLOT_PARAMS::m_scale, PCB_PLOT_PARAMS::m_scaleSelection, PCB_PLOT_PARAMS::m_subtractMaskFromSilk, PCB_PLOT_PARAMS::m_textMode, PCB_PLOT_PARAMS::m_useAuxOrigin, PCB_PLOT_PARAMS::m_useGerberProtelExtensions, PCB_PLOT_PARAMS::m_useGerberX2format, and PCB_PLOT_PARAMS::m_widthAdjust.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ Parse()

void PCB_PLOT_PARAMS::Parse ( PCB_PLOT_PARAMS_PARSER aParser)
inherited

Definition at line 233 of file pcb_plot_params.cpp.

234 {
235  aParser->Parse( this );
236 }
void Parse(PCB_PLOT_PARAMS *aPcbPlotParams)

References PCB_PLOT_PARAMS_PARSER::Parse().

Referenced by LEGACY_PLUGIN::loadSETUP(), and PCB_PARSER::parseSetup().

◆ Plot_1_EdgeModule()

void BRDITEMS_PLOTTER::Plot_1_EdgeModule ( EDGE_MODULE aEdge)

Definition at line 505 of file plot_brditems_plotter.cpp.

506 {
507  if( aEdge->Type() != PCB_MODULE_EDGE_T )
508  return;
509 
510  m_plotter->SetColor( getColor( aEdge->GetLayer() ) );
511 
512  int thickness = aEdge->GetWidth();
513 
514  wxPoint pos( aEdge->GetStart() );
515  wxPoint end( aEdge->GetEnd() );
516 
517  GBR_METADATA gbr_metadata;
519  MODULE* parent = static_cast<MODULE*> ( aEdge->GetParent() );
520  gbr_metadata.SetCmpReference( parent->GetReference() );
521 
522  bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
523 
524  if( isOnCopperLayer )
525  {
526  gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_ETCHEDCMP );
527  gbr_metadata.SetCopper( true );
528  }
529  else if( aEdge->GetLayer() == Edge_Cuts ) // happens also when plotting copper layers
530  {
531  gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT );
532  }
533 
534  int radius; // Circle/arc radius.
535 
536  switch( aEdge->GetShape() )
537  {
538  case S_SEGMENT:
539  m_plotter->ThickSegment( pos, end, thickness, GetPlotMode(), &gbr_metadata );
540  break;
541 
542  case S_CIRCLE:
543  radius = KiROUND( GetLineLength( end, pos ) );
544  m_plotter->ThickCircle( pos, radius * 2, thickness, GetPlotMode(), &gbr_metadata );
545  break;
546 
547  case S_ARC:
548  {
549  radius = KiROUND( GetLineLength( end, pos ) );
550  double startAngle = ArcTangente( end.y - pos.y, end.x - pos.x );
551  double endAngle = startAngle + aEdge->GetAngle();
552 
553  // when startAngle == endAngle ThickArc() doesn't know whether it's 0 deg and 360 deg
554  if( std::abs( aEdge->GetAngle() ) == 3600.0 )
555  m_plotter->ThickCircle( pos, radius * 2, thickness, GetPlotMode(), &gbr_metadata );
556  else
557  m_plotter->ThickArc( pos, -endAngle, -startAngle, radius, thickness, GetPlotMode(), &gbr_metadata );
558  }
559  break;
560 
561  case S_POLYGON:
562  if( aEdge->IsPolyShapeValid() )
563  {
564  const std::vector<wxPoint> &polyPoints = aEdge->BuildPolyPointsList();
565 
566  // We must compute true coordinates from m_PolyList
567  // which are relative to module position, orientation 0
568  MODULE *module = aEdge->GetParentModule();
569 
570  std::vector<wxPoint> cornerList;
571 
572  cornerList.reserve( polyPoints.size() );
573 
574  for( wxPoint corner : polyPoints )
575  {
576  if( module )
577  {
578  RotatePoint( &corner, module->GetOrientation() );
579  corner += module->GetPosition();
580  }
581 
582  cornerList.push_back( corner );
583  }
584 
585  if( !aEdge->IsPolygonFilled() )
586  {
587  for( size_t i = 1; i < cornerList.size(); i++ )
588  {
589  m_plotter->ThickSegment( cornerList[i - 1], cornerList[i], thickness,
590  GetPlotMode(), &gbr_metadata );
591  }
592 
593  m_plotter->ThickSegment( cornerList.back(), cornerList.front(), thickness,
594  GetPlotMode(), &gbr_metadata );
595 
596  }
597  else
598  {
599  // This must be simplified and fractured to prevent overlapping polygons
600  // from generating invalid Gerber files
601 
602  SHAPE_LINE_CHAIN line( cornerList );
603  SHAPE_POLY_SET tmpPoly;
604 
605  line.SetClosed( true );
606  tmpPoly.AddOutline( line );
608 
609  for( int jj = 0; jj < tmpPoly.OutlineCount(); ++jj )
610  {
611  SHAPE_LINE_CHAIN &poly = tmpPoly.Outline( jj );
612  m_plotter->PlotPoly( poly, FILLED_SHAPE, thickness, &gbr_metadata );
613  }
614  }
615  }
616  break;
617 
618  case S_CURVE:
619  m_plotter->BezierCurve( aEdge->GetStart(), aEdge->GetBezControl1(),
620  aEdge->GetBezControl2(), aEdge->GetEnd(),
621  0, thickness );
622  break;
623 
624  default:
625  wxASSERT_MSG( false, "Unhandled EDGE_MODULE shape" );
626  break;
627  }
628 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:686
double GetOrientation() const
Definition: class_module.h:215
aperture used for etched components
Definition: gbr_metadata.h:83
int OutlineCount() const
Returns the number of outlines in the set
double GetLineLength(const wxPoint &aPointA, const wxPoint &aPointB)
Function GetLineLength returns the length of a line segment defined by aPointA and aPointB.
Definition: trigo.h:202
print info associated to a component (TO.C attribute)
virtual void SetColor(COLOR4D color)=0
virtual void ThickCircle(const wxPoint &pos, int diametre, int width, EDA_DRAW_MODE_T tracemode, void *aData)
Definition: plotter.cpp:561
STROKE_T GetShape() const
void SetNetAttribType(int aNetAttribType)
Definition: gbr_metadata.h:170
polygon (not yet used for tracks, but could be in microwave apps)
PLOTTER * m_plotter
Definition: pcbplot.h:79
usual segment : line with rounded ends
virtual void BezierCurve(const wxPoint &aStart, const wxPoint &aControl1, const wxPoint &aControl2, const wxPoint &aEnd, int aTolerance, int aLineThickness=USE_DEFAULT_LINE_WIDTH)
Generic fallback: Cubic Bezier curve rendered as a polyline In Kicad the bezier curves have 4 control...
Definition: plotter.cpp:203
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:208
const std::vector< wxPoint > BuildPolyPointsList() const
Build and return the list of corners in a std::vector<wxPoint> It must be used only to convert the SH...
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL)=0
Function PlotPoly.
const wxPoint & GetEnd() const
Function GetEnd returns the ending point of the graphic.
class EDGE_MODULE, a footprint edge
Definition: typeinfo.h:94
virtual void ThickArc(const wxPoint &centre, double StAngle, double EndAngle, int rayon, int width, EDA_DRAW_MODE_T tracemode, void *aData)
Definition: plotter.cpp:523
const wxString GetReference() const
Function GetReference.
Definition: class_module.h:436
SHAPE_POLY_SET.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Returns the reference to aIndex-th outline in the set
Arcs (with rounded ends)
MODULE * GetParentModule() const
Function GetParentModule returns a pointer to the parent module, or NULL if DRAWSEGMENT does not belo...
Bezier Curve.
void Fracture(POLYGON_MODE aFastMode)
Converts a set of polygons with holes to a singe outline with "slits"/"fractures" connecting the oute...
int GetWidth() const
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index
double GetAngle() const
SHAPE_LINE_CHAIN.
virtual void ThickSegment(const wxPoint &start, const wxPoint &end, int width, EDA_DRAW_MODE_T tracemode, void *aData)
Definition: plotter.cpp:506
LSET m_layerMask
Definition: pcbplot.h:81
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:61
const wxPoint & GetBezControl2() const
bool IsPolyShapeValid() const
const wxPoint & GetBezControl1() const
const wxPoint & GetStart() const
Function GetStart returns the starting point of the graphic.
double ArcTangente(int dy, int dx)
Definition: trigo.cpp:162
BOARD_ITEM_CONTAINER * GetParent() const
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
bool IsPolygonFilled() const
Polygonal shape is not always filled.
const wxPoint GetPosition() const override
Definition: class_module.h:210
COLOR4D getColor(LAYER_NUM aLayer)
Function getColor.
KICAD_T Type() const
Function Type()
Definition: base_struct.h:207
EDA_DRAW_MODE_T GetPlotMode() const

References SHAPE_POLY_SET::AddOutline(), LSET::AllCuMask(), ArcTangente(), PLOTTER::BezierCurve(), DRAWSEGMENT::BuildPolyPointsList(), Edge_Cuts, FILLED_SHAPE, SHAPE_POLY_SET::Fracture(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_ETCHEDCMP, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, DRAWSEGMENT::GetAngle(), DRAWSEGMENT::GetBezControl1(), DRAWSEGMENT::GetBezControl2(), getColor(), DRAWSEGMENT::GetEnd(), BOARD_ITEM::GetLayer(), GetLineLength(), MODULE::GetOrientation(), BOARD_ITEM::GetParent(), DRAWSEGMENT::GetParentModule(), PCB_PLOT_PARAMS::GetPlotMode(), MODULE::GetPosition(), MODULE::GetReference(), DRAWSEGMENT::GetShape(), DRAWSEGMENT::GetStart(), DRAWSEGMENT::GetWidth(), DRAWSEGMENT::IsPolygonFilled(), DRAWSEGMENT::IsPolyShapeValid(), KiROUND(), m_layerMask, m_plotter, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PCB_MODULE_EDGE_T, PLOTTER::PlotPoly(), SHAPE_POLY_SET::PM_FAST, RotatePoint(), S_ARC, S_CIRCLE, S_CURVE, S_POLYGON, S_SEGMENT, SHAPE_LINE_CHAIN::SetClosed(), PLOTTER::SetColor(), GBR_METADATA::SetNetAttribType(), PLOTTER::ThickArc(), PLOTTER::ThickCircle(), PLOTTER::ThickSegment(), and EDA_ITEM::Type().

Referenced by PLACEFILE_GERBER_WRITER::CreatePlaceFile(), Plot_Edges_Modules(), PlotSolderMaskLayer(), and PlotStandardLayer().

◆ Plot_Edges_Modules()

void BRDITEMS_PLOTTER::Plot_Edges_Modules ( )

Definition at line 489 of file plot_brditems_plotter.cpp.

490 {
491  for( auto module : m_board->Modules() )
492  {
493  for( auto item : module->GraphicalItems() )
494  {
495  EDGE_MODULE* edge = dyn_cast<EDGE_MODULE*>( item );
496 
497  if( edge && m_layerMask[edge->GetLayer()] )
498  Plot_1_EdgeModule( edge );
499  }
500  }
501 }
BOARD * m_board
Definition: pcbplot.h:80
MODULES & Modules()
Definition: class_board.h:226
void Plot_1_EdgeModule(EDGE_MODULE *aEdge)
LSET m_layerMask
Definition: pcbplot.h:81
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.

References BOARD_ITEM::GetLayer(), m_board, m_layerMask, BOARD::Modules(), and Plot_1_EdgeModule().

Referenced by PlotSilkScreen().

◆ PlotAllTextsModule()

bool BRDITEMS_PLOTTER::PlotAllTextsModule ( MODULE aModule)

Definition at line 279 of file plot_brditems_plotter.cpp.

280 {
281  TEXTE_MODULE* textModule = &aModule->Reference();
282  LAYER_NUM textLayer = textModule->GetLayer();
283 
284  // Reference and value are specfic items, not in graphic items list
285  if( GetPlotReference() && m_layerMask[textLayer]
286  && ( textModule->IsVisible() || GetPlotInvisibleText() ) )
287  {
288  PlotTextModule( textModule, getColor( textLayer ) );
289  }
290 
291  textModule = &aModule->Value();
292  textLayer = textModule->GetLayer();
293 
294  if( GetPlotValue() && m_layerMask[textLayer]
295  && ( textModule->IsVisible() || GetPlotInvisibleText() ) )
296  {
297  PlotTextModule( textModule, getColor( textLayer ) );
298  }
299 
300  for( auto item : aModule->GraphicalItems() )
301  {
302  textModule = dyn_cast<TEXTE_MODULE*>( item );
303 
304  if( !textModule )
305  continue;
306 
307  if( !textModule->IsVisible() )
308  continue;
309 
310  textLayer = textModule->GetLayer();
311 
312  if( textLayer >= PCB_LAYER_ID_COUNT )
313  return false;
314 
315  if( !m_layerMask[textLayer] )
316  continue;
317 
318  if( textModule->GetText() == wxT( "%R" ) && !GetPlotReference() )
319  continue;
320 
321  if( textModule->GetText() == wxT( "%V" ) && !GetPlotValue() )
322  continue;
323 
324  PlotTextModule( textModule, getColor( textLayer ) );
325  }
326 
327  return true;
328 }
TEXTE_MODULE & Reference()
Definition: class_module.h:477
bool IsVisible() const
Definition: eda_text.h:170
DRAWINGS & GraphicalItems()
Definition: class_module.h:183
TEXTE_MODULE & Value()
read/write accessors:
Definition: class_module.h:476
int LAYER_NUM
Type LAYER_NUM can be replaced with int and removed.
bool GetPlotValue() const
LSET m_layerMask
Definition: pcbplot.h:81
bool GetPlotInvisibleText() const
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
bool GetPlotReference() const
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:123
COLOR4D getColor(LAYER_NUM aLayer)
Function getColor.
void PlotTextModule(TEXTE_MODULE *aTextMod, COLOR4D aColor)

References getColor(), BOARD_ITEM::GetLayer(), PCB_PLOT_PARAMS::GetPlotInvisibleText(), PCB_PLOT_PARAMS::GetPlotReference(), PCB_PLOT_PARAMS::GetPlotValue(), EDA_TEXT::GetText(), MODULE::GraphicalItems(), EDA_TEXT::IsVisible(), m_layerMask, PCB_LAYER_ID_COUNT, PlotTextModule(), MODULE::Reference(), and MODULE::Value().

Referenced by PlotSilkScreen(), PlotSolderMaskLayer(), and PlotStandardLayer().

◆ PlotBoardGraphicItems()

void BRDITEMS_PLOTTER::PlotBoardGraphicItems ( )

plot items like text and graphics, but not tracks and modules

Definition at line 332 of file plot_brditems_plotter.cpp.

333 {
334  for( auto item : m_board->Drawings() )
335  {
336  switch( item->Type() )
337  {
338  case PCB_LINE_T: PlotDrawSegment( (DRAWSEGMENT*) item); break;
339  case PCB_TEXT_T: PlotTextePcb( (TEXTE_PCB*) item ); break;
340  case PCB_DIMENSION_T: PlotDimension( (DIMENSION*) item ); break;
341  case PCB_TARGET_T: PlotPcbTarget( (PCB_TARGET*) item ); break;
342  default: break;
343  }
344  }
345 }
void PlotDimension(DIMENSION *Dimension)
class TEXTE_PCB, text on a layer
Definition: typeinfo.h:92
BOARD * m_board
Definition: pcbplot.h:80
void PlotPcbTarget(PCB_TARGET *PtMire)
class DIMENSION, a dimension (graphic item)
Definition: typeinfo.h:99
class PCB_TARGET, a target (graphic item)
Definition: typeinfo.h:100
void PlotTextePcb(TEXTE_PCB *pt_texte)
class DRAWSEGMENT, a segment not on copper layers
Definition: typeinfo.h:91
DRAWINGS & Drawings()
Definition: class_board.h:235
DIMENSION.
void PlotDrawSegment(DRAWSEGMENT *PtSegm)

References BOARD::Drawings(), m_board, PCB_DIMENSION_T, PCB_LINE_T, PCB_TARGET_T, PCB_TEXT_T, PlotDimension(), PlotDrawSegment(), PlotPcbTarget(), and PlotTextePcb().

Referenced by PLACEFILE_GERBER_WRITER::CreatePlaceFile(), PlotSilkScreen(), PlotSolderMaskLayer(), and PlotStandardLayer().

◆ PlotDimension()

void BRDITEMS_PLOTTER::PlotDimension ( DIMENSION Dimension)

Definition at line 387 of file plot_brditems_plotter.cpp.

388 {
389  if( !m_layerMask[aDim->GetLayer()] )
390  return;
391 
392  DRAWSEGMENT draw;
393 
394  draw.SetWidth( aDim->GetWidth() );
395  draw.SetLayer( aDim->GetLayer() );
396 
397  COLOR4D color = m_board->Colors().GetLayerColor( aDim->GetLayer() );
398 
399  // Set plot color (change WHITE to LIGHTGRAY because
400  // the white items are not seen on a white paper or screen
402 
403  PlotTextePcb( &aDim->Text() );
404 
405  draw.SetStart( aDim->m_crossBarO );
406  draw.SetEnd( aDim->m_crossBarF );
407  PlotDrawSegment( &draw );
408 
409  draw.SetStart( aDim->m_featureLineGO);
410  draw.SetEnd( aDim->m_featureLineGF );
411  PlotDrawSegment( &draw );
412 
413  draw.SetStart( aDim->m_featureLineDO );
414  draw.SetEnd( aDim->m_featureLineDF );
415  PlotDrawSegment( &draw );
416 
417  draw.SetStart( aDim->m_crossBarF );
418  draw.SetEnd( aDim->m_arrowD1F );
419  PlotDrawSegment( &draw );
420 
421  draw.SetStart( aDim->m_crossBarF );
422  draw.SetEnd( aDim->m_arrowD2F );
423  PlotDrawSegment( &draw );
424 
425  draw.SetStart( aDim->m_crossBarO );
426  draw.SetEnd( aDim->m_arrowG1F );
427  PlotDrawSegment( &draw );
428 
429  draw.SetStart( aDim->m_crossBarO );
430  draw.SetEnd( aDim->m_arrowG2F );
431  PlotDrawSegment( &draw );
432 }
virtual void SetLayer(PCB_LAYER_ID aLayer)
Function SetLayer sets the layer this item is on.
virtual void SetColor(COLOR4D color)=0
int color
Definition: DXF_plotter.cpp:61
PLOTTER * m_plotter
Definition: pcbplot.h:79
BOARD * m_board
Definition: pcbplot.h:80
COLOR4D GetLayerColor(LAYER_NUM aLayer) const
Function GetLayerColor.
void SetStart(const wxPoint &aStart)
const COLORS_DESIGN_SETTINGS & Colors() const
Function GetColorSettings.
Definition: class_board.h:560
LSET m_layerMask
Definition: pcbplot.h:81
void PlotTextePcb(TEXTE_PCB *pt_texte)
Definition: colors.h:49
void SetEnd(const wxPoint &aEnd)
void PlotDrawSegment(DRAWSEGMENT *PtSegm)
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
void SetWidth(int aWidth)

References color, BOARD::Colors(), BOARD_ITEM::GetLayer(), COLORS_DESIGN_SETTINGS::GetLayerColor(), DIMENSION::GetWidth(), LIGHTGRAY, DIMENSION::m_arrowD1F, DIMENSION::m_arrowD2F, DIMENSION::m_arrowG1F, DIMENSION::m_arrowG2F, m_board, DIMENSION::m_crossBarF, DIMENSION::m_crossBarO, DIMENSION::m_featureLineDF, DIMENSION::m_featureLineDO, DIMENSION::m_featureLineGF, DIMENSION::m_featureLineGO, m_layerMask, m_plotter, PlotDrawSegment(), PlotTextePcb(), PLOTTER::SetColor(), DRAWSEGMENT::SetEnd(), BOARD_ITEM::SetLayer(), DRAWSEGMENT::SetStart(), DRAWSEGMENT::SetWidth(), DIMENSION::Text(), and WHITE.

Referenced by PlotBoardGraphicItems().

◆ PlotDrawSegment()

void BRDITEMS_PLOTTER::PlotDrawSegment ( DRAWSEGMENT PtSegm)

Definition at line 777 of file plot_brditems_plotter.cpp.

778 {
779  if( !m_layerMask[aSeg->GetLayer()] )
780  return;
781 
782  int radius = 0;
783  double StAngle = 0, EndAngle = 0;
784  int thickness = aSeg->GetWidth();
785 
786  m_plotter->SetColor( getColor( aSeg->GetLayer() ) );
787 
788  wxPoint start( aSeg->GetStart() );
789  wxPoint end( aSeg->GetEnd() );
790 
791  GBR_METADATA gbr_metadata;
792 
793  if( aSeg->GetLayer() == Edge_Cuts )
795 
796  switch( aSeg->GetShape() )
797  {
798  case S_CIRCLE:
799  radius = KiROUND( GetLineLength( end, start ) );
800  m_plotter->ThickCircle( start, radius * 2, thickness, GetPlotMode(), &gbr_metadata );
801  break;
802 
803  case S_ARC:
804  radius = KiROUND( GetLineLength( end, start ) );
805  StAngle = ArcTangente( end.y - start.y, end.x - start.x );
806  EndAngle = StAngle + aSeg->GetAngle();
807 
808  // when startAngle == endAngle ThickArc() doesn't know whether it's 0 deg and 360 deg
809  if( std::abs( aSeg->GetAngle() ) == 3600.0 )
810  m_plotter->ThickCircle( start, radius * 2, thickness, GetPlotMode(), &gbr_metadata );
811  else
812  m_plotter->ThickArc( start, -EndAngle, -StAngle, radius, thickness, GetPlotMode(), &gbr_metadata );
813  break;
814 
815  case S_CURVE:
816  m_plotter->BezierCurve( aSeg->GetStart(), aSeg->GetBezControl1(),
817  aSeg->GetBezControl2(), aSeg->GetEnd(),
818  0, thickness );
819  break;
820 
821  case S_POLYGON:
822  {
823  if( !aSeg->IsPolygonFilled() )
824  {
825  for( auto it = aSeg->GetPolyShape().CIterateSegments( 0 ); it; it++ )
826  {
827  auto seg = it.Get();
828  m_plotter->ThickSegment( wxPoint( seg.A ), wxPoint( seg.B ),
829  thickness, GetPlotMode(), &gbr_metadata );
830  }
831  }
832  else
833  {
834  m_plotter->SetCurrentLineWidth( thickness, &gbr_metadata );
835  // Draw the polygon: only one polygon is expected
836  // However we provide a multi polygon shape drawing
837  // ( for the future or to show a non expected shape )
838  // This must be simplified and fractured to prevent overlapping polygons
839  // from generating invalid Gerber files
840  auto tmpPoly = SHAPE_POLY_SET( aSeg->GetPolyShape() );
842 
843  for( int jj = 0; jj < tmpPoly.OutlineCount(); ++jj )
844  {
845  SHAPE_LINE_CHAIN& poly = tmpPoly.Outline( jj );
846  m_plotter->PlotPoly( poly, FILLED_SHAPE, thickness, &gbr_metadata );
847  }
848  }
849  }
850  break;
851 
852  default:
853  m_plotter->ThickSegment( start, end, thickness, GetPlotMode(), &gbr_metadata );
854  }
855 }
double GetLineLength(const wxPoint &aPointA, const wxPoint &aPointB)
Function GetLineLength returns the length of a line segment defined by aPointA and aPointB.
Definition: trigo.h:202
virtual void SetColor(COLOR4D color)=0
virtual void ThickCircle(const wxPoint &pos, int diametre, int width, EDA_DRAW_MODE_T tracemode, void *aData)
Definition: plotter.cpp:561
polygon (not yet used for tracks, but could be in microwave apps)
PLOTTER * m_plotter
Definition: pcbplot.h:79
virtual void BezierCurve(const wxPoint &aStart, const wxPoint &aControl1, const wxPoint &aControl2, const wxPoint &aEnd, int aTolerance, int aLineThickness=USE_DEFAULT_LINE_WIDTH)
Generic fallback: Cubic Bezier curve rendered as a polyline In Kicad the bezier curves have 4 control...
Definition: plotter.cpp:203
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL)=0
Function PlotPoly.
virtual void ThickArc(const wxPoint &centre, double StAngle, double EndAngle, int rayon, int width, EDA_DRAW_MODE_T tracemode, void *aData)
Definition: plotter.cpp:523
SHAPE_POLY_SET.
Arcs (with rounded ends)
Bezier Curve.
void Fracture(POLYGON_MODE aFastMode)
Converts a set of polygons with holes to a singe outline with "slits"/"fractures" connecting the oute...
SHAPE_LINE_CHAIN.
virtual void ThickSegment(const wxPoint &start, const wxPoint &end, int width, EDA_DRAW_MODE_T tracemode, void *aData)
Definition: plotter.cpp:506
LSET m_layerMask
Definition: pcbplot.h:81
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:61
void SetApertureAttrib(GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB aApertAttribute)
Definition: gbr_metadata.h:160
double ArcTangente(int dy, int dx)
Definition: trigo.cpp:162
COLOR4D getColor(LAYER_NUM aLayer)
Function getColor.
EDA_DRAW_MODE_T GetPlotMode() const
virtual void SetCurrentLineWidth(int width, void *aData=NULL)=0
Set the line width for the next drawing.

References ArcTangente(), PLOTTER::BezierCurve(), SHAPE_POLY_SET::CIterateSegments(), Edge_Cuts, FILLED_SHAPE, SHAPE_POLY_SET::Fracture(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT, DRAWSEGMENT::GetAngle(), DRAWSEGMENT::GetBezControl1(), DRAWSEGMENT::GetBezControl2(), getColor(), DRAWSEGMENT::GetEnd(), BOARD_ITEM::GetLayer(), GetLineLength(), PCB_PLOT_PARAMS::GetPlotMode(), DRAWSEGMENT::GetPolyShape(), DRAWSEGMENT::GetShape(), DRAWSEGMENT::GetStart(), DRAWSEGMENT::GetWidth(), DRAWSEGMENT::IsPolygonFilled(), KiROUND(), m_layerMask, m_plotter, PLOTTER::PlotPoly(), SHAPE_POLY_SET::PM_FAST, S_ARC, S_CIRCLE, S_CURVE, S_POLYGON, GBR_METADATA::SetApertureAttrib(), PLOTTER::SetColor(), PLOTTER::SetCurrentLineWidth(), PLOTTER::ThickArc(), PLOTTER::ThickCircle(), and PLOTTER::ThickSegment().

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), PlotBoardGraphicItems(), PlotDimension(), and PlotPcbTarget().

◆ PlotDrillMarks()

void BRDITEMS_PLOTTER::PlotDrillMarks ( )

Function PlotDrillMarks Draw a drill mark for pads and vias.

Must be called after all drawings, because it redraw the drill mark on a pad or via, as a negative (i.e. white) shape in FILLED plot mode (for PS and PDF outputs)

Definition at line 884 of file plot_brditems_plotter.cpp.

885 {
886  /* If small drills marks were requested prepare a clamp value to pass
887  to the helper function */
888  int small_drill = (GetDrillMarksType() == PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE) ?
889  SMALL_DRILL : 0;
890 
891  /* In the filled trace mode drill marks are drawn white-on-black to scrape
892  the underlying pad. This works only for drivers supporting color change,
893  obviously... it means that:
894  - PS, SVG and PDF output is correct (i.e. you have a 'donut' pad)
895  - In HPGL you can't see them
896  - In gerbers you can't see them, too. This is arguably the right thing to
897  do since having drill marks and high speed drill stations is a sure
898  recipe for broken tools and angry manufacturers. If you *really* want them
899  you could start a layer with negative polarity to scrape the film.
900  - In DXF they go into the 'WHITE' layer. This could be useful.
901  */
902  if( GetPlotMode() == FILLED )
904 
905  for( auto pts : m_board->Tracks() )
906  {
907  const VIA* via = dyn_cast<const VIA*>( pts );
908 
909  if( via )
910  {
912  wxSize( via->GetDrillValue(), 0 ),
913  wxSize( via->GetWidth(), 0 ), 0, small_drill );
914  }
915  }
916 
917  for( auto Module : m_board->Modules() )
918  {
919  for( auto pad : Module->Pads() )
920  {
921  if( pad->GetDrillSize().x == 0 )
922  continue;
923 
924  plotOneDrillMark( pad->GetDrillShape(),
925  pad->GetPosition(), pad->GetDrillSize(),
926  pad->GetSize(), pad->GetOrientation(),
927  small_drill );
928  }
929  }
930 
931  if( GetPlotMode() == FILLED )
933 }
#define SMALL_DRILL
Definition: pcbplot.h:73
virtual void SetColor(COLOR4D color)=0
const wxPoint & GetStart() const
Definition: class_track.h:109
PLOTTER * m_plotter
Definition: pcbplot.h:79
BOARD * m_board
Definition: pcbplot.h:80
int GetDrillValue() const
Function GetDrillValue "calculates" the drill value for vias (m-Drill if > 0, or default drill value ...
MODULES & Modules()
Definition: class_board.h:226
COLOR4D GetColor() const
int GetWidth() const
Definition: class_track.h:103
void plotOneDrillMark(PAD_DRILL_SHAPE_T aDrillShape, const wxPoint &aDrillPos, wxSize aDrillSize, const wxSize &aPadSize, double aOrientation, int aSmallDrill)
Helper function to plot a single drill mark.
Definition: colors.h:49
DrillMarksType GetDrillMarksType() const
TRACKS & Tracks()
Definition: class_board.h:217
EDA_DRAW_MODE_T GetPlotMode() const

References FILLED, PCB_PLOT_PARAMS::GetColor(), PCB_PLOT_PARAMS::GetDrillMarksType(), VIA::GetDrillValue(), PCB_PLOT_PARAMS::GetPlotMode(), TRACK::GetStart(), TRACK::GetWidth(), m_board, m_plotter, BOARD::Modules(), PAD_DRILL_SHAPE_CIRCLE, plotOneDrillMark(), PLOTTER::SetColor(), SMALL_DRILL, PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE, BOARD::Tracks(), and WHITE.

Referenced by PlotStandardLayer().

◆ PlotFilledAreas()

void BRDITEMS_PLOTTER::PlotFilledAreas ( ZONE_CONTAINER aZone,
SHAPE_POLY_SET aPolysList 
)

Definition at line 694 of file plot_brditems_plotter.cpp.

695 {
696  if( polysList.IsEmpty() )
697  return;
698 
699  GBR_METADATA gbr_metadata;
700 
701  bool isOnCopperLayer = aZone->IsOnCopperLayer();
702 
703  if( isOnCopperLayer )
704  {
705  gbr_metadata.SetNetName( aZone->GetNetname() );
706  gbr_metadata.SetCopper( true );
707 
708  // Zones with no net name can exist.
709  // they are not used to connect items, so the aperture attribute cannot
710  // be set as conductor
711  if( aZone->GetNetname().IsEmpty() )
713  else
714  {
717  }
718  }
719 
720  // We need a buffer to store corners coordinates:
721  std::vector< wxPoint > cornerList;
722 
723  m_plotter->SetColor( getColor( aZone->GetLayer() ) );
724 
725  /* Plot all filled areas: filled areas have a filled area and a thick
726  * outline (depending on the fill area option we must plot the filled area itself
727  * and plot the thick outline itself, if the thickness has meaning (at least is > 1)
728  *
729  * in non filled mode the outline is plotted, but not the filling items
730  */
731  int outline_thickness = aZone->GetFilledPolysUseThickness() ? aZone->GetMinThickness() : 0;
732 
733  for( int idx = 0; idx < polysList.OutlineCount(); ++idx )
734  {
735  SHAPE_LINE_CHAIN& outline = polysList.Outline( idx );
736 
737  cornerList.clear();
738  cornerList.reserve( outline.PointCount() );
739 
740  for( int ic = 0; ic < outline.PointCount(); ++ic )
741  {
742  cornerList.emplace_back( wxPoint( outline.CPoint( ic ) ) );
743  }
744 
745  if( cornerList.size() ) // Plot the current filled area outline
746  {
747  // First, close the outline
748  if( cornerList[0] != cornerList[cornerList.size() - 1] )
749  cornerList.push_back( cornerList[0] );
750 
751  // Plot the current filled area and its outline
752  if( GetPlotMode() == FILLED )
753  {
754  m_plotter->PlotPoly( cornerList, FILLED_SHAPE, outline_thickness, &gbr_metadata );
755  }
756  else
757  {
758  if( outline_thickness )
759  {
760  for( unsigned jj = 1; jj < cornerList.size(); jj++ )
761  {
762  m_plotter->ThickSegment( cornerList[jj -1], cornerList[jj],
763  outline_thickness,
764  GetPlotMode(), &gbr_metadata );
765  }
766  }
767 
769  }
770  }
771  }
772 }
virtual void SetColor(COLOR4D color)=0
void SetNetAttribType(int aNetAttribType)
Definition: gbr_metadata.h:170
virtual PCB_LAYER_ID GetLayer() const override
Function GetLayer returns the primary layer this item is on.
Definition: class_zone.cpp:204
PLOTTER * m_plotter
Definition: pcbplot.h:79
bool GetFilledPolysUseThickness() const
Definition: class_zone.h:599
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL)=0
Function PlotPoly.
int PointCount() const
Function PointCount()
const VECTOR2I & CPoint(int aIndex) const
Function Point()
const wxString & GetNetname() const
Function GetNetname.
aperture used for connected items like tracks (not vias)
Definition: gbr_metadata.h:84
void SetNetName(const wxString &aNetname)
Definition: gbr_metadata.h:180
SHAPE_LINE_CHAIN.
virtual void ThickSegment(const wxPoint &start, const wxPoint &end, int width, EDA_DRAW_MODE_T tracemode, void *aData)
Definition: plotter.cpp:506
int GetMinThickness() const
Definition: class_zone.h:186
void SetApertureAttrib(GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB aApertAttribute)
Definition: gbr_metadata.h:160
aperture used for not connected items (texts, outlines on copper)
Definition: gbr_metadata.h:86
void SetCopper(bool aValue)
Definition: gbr_metadata.h:202
print info associated to a net (TO.N attribute)
COLOR4D getColor(LAYER_NUM aLayer)
Function getColor.
bool IsOnCopperLayer() const override
Function IsOnCopperLayer.
Definition: class_zone.cpp:210
EDA_DRAW_MODE_T GetPlotMode() const
virtual void SetCurrentLineWidth(int width, void *aData=NULL)=0
Set the line width for the next drawing.

References SHAPE_LINE_CHAIN::CPoint(), FILLED, FILLED_SHAPE, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONDUCTOR, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR, GBR_NETLIST_METADATA::GBR_NETINFO_NET, getColor(), ZONE_CONTAINER::GetFilledPolysUseThickness(), ZONE_CONTAINER::GetLayer(), ZONE_CONTAINER::GetMinThickness(), BOARD_CONNECTED_ITEM::GetNetname(), PCB_PLOT_PARAMS::GetPlotMode(), SHAPE_POLY_SET::IsEmpty(), ZONE_CONTAINER::IsOnCopperLayer(), m_plotter, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PLOTTER::PlotPoly(), SHAPE_LINE_CHAIN::PointCount(), GBR_METADATA::SetApertureAttrib(), PLOTTER::SetColor(), GBR_METADATA::SetCopper(), PLOTTER::SetCurrentLineWidth(), GBR_METADATA::SetNetAttribType(), GBR_METADATA::SetNetName(), and PLOTTER::ThickSegment().

Referenced by PlotSilkScreen(), PlotSolderMaskLayer(), and PlotStandardLayer().

◆ plotOneDrillMark()

void BRDITEMS_PLOTTER::plotOneDrillMark ( PAD_DRILL_SHAPE_T  aDrillShape,
const wxPoint aDrillPos,
wxSize  aDrillSize,
const wxSize &  aPadSize,
double  aOrientation,
int  aSmallDrill 
)
private

Helper function to plot a single drill mark.

It compensate and clamp the drill mark size depending on the current plot options

Definition at line 861 of file plot_brditems_plotter.cpp.

864 {
865  // Small drill marks have no significance when applied to slots
866  if( aSmallDrill && aDrillShape == PAD_DRILL_SHAPE_CIRCLE )
867  aDrillSize.x = std::min( aSmallDrill, aDrillSize.x );
868 
869  // Round holes only have x diameter, slots have both
870  aDrillSize.x -= getFineWidthAdj();
871  aDrillSize.x = Clamp( 1, aDrillSize.x, aPadSize.x - 1 );
872 
873  if( aDrillShape == PAD_DRILL_SHAPE_OBLONG )
874  {
875  aDrillSize.y -= getFineWidthAdj();
876  aDrillSize.y = Clamp( 1, aDrillSize.y, aPadSize.y - 1 );
877  m_plotter->FlashPadOval( aDrillPos, aDrillSize, aOrientation, GetPlotMode(), NULL );
878  }
879  else
880  m_plotter->FlashPadCircle( aDrillPos, aDrillSize.x, GetPlotMode(), NULL );
881 }
PLOTTER * m_plotter
Definition: pcbplot.h:79
virtual void FlashPadCircle(const wxPoint &aPadPos, int aDiameter, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadCircle
#define NULL
virtual void FlashPadOval(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadOval
const T & Clamp(const T &lower, const T &value, const T &upper)
Function Clamp limits value within the range lower <= value <= upper.
Definition: util.h:45
int getFineWidthAdj()
Definition: pcbplot.h:96
EDA_DRAW_MODE_T GetPlotMode() const

References Clamp(), PLOTTER::FlashPadCircle(), PLOTTER::FlashPadOval(), getFineWidthAdj(), PCB_PLOT_PARAMS::GetPlotMode(), m_plotter, NULL, PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG, and wxPoint::x.

Referenced by PlotDrillMarks().

◆ PlotPad()

void BRDITEMS_PLOTTER::PlotPad ( D_PAD aPad,
COLOR4D  aColor,
EDA_DRAW_MODE_T  aPlotMode 
)

Plot a pad.

unlike other items, a pad had not a specific color, and be drawn as a non filled item although the plot mode is filled color and plot mode are needed by this function

Definition at line 88 of file plot_brditems_plotter.cpp.

89 {
90  wxPoint shape_pos = aPad->ShapePos();
91  GBR_METADATA gbr_metadata;
92 
93  bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
94  bool isOnExternalCopperLayer = ( m_layerMask & LSET::ExternalCuMask() ).any();
95  bool isPadOnBoardTechLayers = ( aPad->GetLayerSet() & LSET::AllBoardTechMask() ).any();
96 
97  gbr_metadata.SetCmpReference( aPad->GetParent()->GetReference() );
98 
99  if( isOnCopperLayer )
100  {
101  gbr_metadata.SetNetAttribType( GBR_NETINFO_ALL );
102  gbr_metadata.SetCopper( true );
103 
104  if( isOnExternalCopperLayer )
105  {
106  const bool useUTF8 = false;
107  const bool useQuoting = false;
108  gbr_metadata.SetPadName( aPad->GetName(), useUTF8, useQuoting );
109 
110  if( !aPad->GetName().IsEmpty() )
111  gbr_metadata.SetPadPinFunction( aPad->GetPinFunction(), useUTF8, useQuoting );
112  }
113 
114  gbr_metadata.SetNetName( aPad->GetNetname() );
115 
116  // Some pads are mechanical pads ( through hole or smd )
117  // when this is the case, they have no pad name and/or are not plated.
118  // In this case gerber files have slightly different attributes.
119  if( aPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED || aPad->GetName().IsEmpty() )
120  gbr_metadata.m_NetlistMetadata.m_NotInNet = true;
121 
122  if( !isOnExternalCopperLayer || !isPadOnBoardTechLayers )
123  {
124  // On internal layers one cannot use the GBR_NETLIST_METADATA::GBR_INFO_FLASHED_PAD
125  // attribute when the component is on an external layer (most of the case)
126  // Also, if a SMD pad is not on a tech layer (masks) use also net+cmp attribute, because
127  // it is not really a pad (can be a "pad", actually a node in a virtual component)
130 
131  if( !isPadOnBoardTechLayers )
132  // such a pad is not soldered and is not a connecting point.
133  // Just set aperture attribute as conductor
134  // If it is a through hole pad, it will be adjusted later
136 
137  switch( aPad->GetAttribute() )
138  {
139  case PAD_ATTRIB_HOLE_NOT_PLATED: // Mechanical pad through hole
141  break;
142 
143  case PAD_ATTRIB_STANDARD : // Pad through hole, a hole is also expected
145  break;
146 
147  default:
148  break;
149  }
150  }
151  else // Some attributes are reserved to the external copper layers
152  {
153  switch( aPad->GetAttribute() )
154  {
155  case PAD_ATTRIB_HOLE_NOT_PLATED: // Mechanical pad through hole
157  break;
158 
159  case PAD_ATTRIB_STANDARD : // Pad through hole, a hole is also expected
161  break;
162 
163  case PAD_ATTRIB_CONN: // Connector pads have no solder paste.
165  break;
166 
167  case PAD_ATTRIB_SMD: // SMD pads (One external copper layer only) with solder paste
169  break;
170  }
171 
172  // Fabrication properties can have specific GBR_APERTURE_METADATA options:
173  switch( aPad->GetProperty() )
174  {
175  case PAD_PROP_BGA:
177  break;
178 
181  break;
182 
185  break;
186 
187  case PAD_PROP_TESTPOINT: // Only on outer layers
189  break;
190 
191  case PAD_PROP_HEATSINK:
193  break;
194 
197  break;
198 
199  case PAD_PROP_NONE:
200  break;
201  }
202  }
203 
206  }
207  else
208  {
210  }
211 
212  // Set plot color (change WHITE to LIGHTGRAY because
213  // the white items are not seen on a white paper or screen
214  m_plotter->SetColor( aColor != WHITE ? aColor : LIGHTGRAY);
215 
216  switch( aPad->GetShape() )
217  {
218  case PAD_SHAPE_CIRCLE:
219  m_plotter->FlashPadCircle( shape_pos, aPad->GetSize().x, aPlotMode, &gbr_metadata );
220  break;
221 
222  case PAD_SHAPE_OVAL:
223  m_plotter->FlashPadOval( shape_pos, aPad->GetSize(),
224  aPad->GetOrientation(), aPlotMode, &gbr_metadata );
225  break;
226 
227  case PAD_SHAPE_TRAPEZOID:
228  {
229  wxPoint coord[4];
230  aPad->BuildPadPolygon( coord, wxSize(0,0), 0 );
231  m_plotter->FlashPadTrapez( shape_pos, coord,
232  aPad->GetOrientation(), aPlotMode, &gbr_metadata );
233  }
234  break;
235 
236  case PAD_SHAPE_ROUNDRECT:
237  m_plotter->FlashPadRoundRect( shape_pos, aPad->GetSize(), aPad->GetRoundRectCornerRadius(),
238  aPad->GetOrientation(), aPlotMode, &gbr_metadata );
239  break;
240 
242  {
243  SHAPE_POLY_SET polygons;
244  const int corner_radius = aPad->GetRoundRectCornerRadius( aPad->GetSize() );
245  TransformRoundChamferedRectToPolygon( polygons, shape_pos, aPad->GetSize(),
246  aPad->GetOrientation(), corner_radius, aPad->GetChamferRectRatio(),
248 
249  if( polygons.OutlineCount() == 0 )
250  break;
251 
252  int min_dim = std::min( aPad->GetSize().x, aPad->GetSize().y ) /2;
253  m_plotter->FlashPadCustom( shape_pos,wxSize( min_dim, min_dim ), &polygons, aPlotMode, &gbr_metadata );
254  }
255  break;
256 
257  case PAD_SHAPE_CUSTOM:
258  {
259  SHAPE_POLY_SET polygons;
260  aPad->MergePrimitivesAsPolygon( &polygons );
261 
262  if( polygons.OutlineCount() == 0 )
263  break;
264 
265  aPad->CustomShapeAsPolygonToBoardPosition( &polygons, shape_pos, aPad->GetOrientation() );
266  m_plotter->FlashPadCustom( shape_pos, aPad->GetSize(), &polygons, aPlotMode, &gbr_metadata );
267  }
268  break;
269 
270  case PAD_SHAPE_RECT:
271  default:
272  m_plotter->FlashPadRect( shape_pos, aPad->GetSize(),
273  aPad->GetOrientation(), aPlotMode, &gbr_metadata );
274  break;
275  }
276 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:686
int OutlineCount() const
Returns the number of outlines in the set
aperture used for edge connector pad (outer layers)
Definition: gbr_metadata.h:94
aperture used for heat sink pad (typically for SMDs)
Definition: gbr_metadata.h:99
no special fabrication property
Definition: pad_shapes.h:78
like PAD_STANDARD, but not plated mechanical use only, no connection allowed
Definition: pad_shapes.h:66
print info associated to a component (TO.C attribute)
virtual void SetColor(COLOR4D color)=0
void SetNetAttribType(int aNetAttribType)
Definition: gbr_metadata.h:170
a fiducial (usually a smd) for the full board
Definition: pad_shapes.h:80
Smd pad, appears on the solder paste layer (default)
Definition: pad_shapes.h:62
PLOTTER * m_plotter
Definition: pcbplot.h:79
aperture used for through hole component on outer layer
Definition: gbr_metadata.h:89
Smd pad, used in BGA footprints.
Definition: pad_shapes.h:79
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:530
aperture used for castellated pads in copper layer files
Definition: gbr_metadata.h:100
a pad used as heat sink, usually in SMD footprints
Definition: pad_shapes.h:83
const wxString & GetPinFunction() const
Definition: class_pad.h:211
BOARD * m_board
Definition: pcbplot.h:80
PAD_ATTR_T GetAttribute() const
Definition: class_pad.h:445
virtual void FlashPadCustom(const wxPoint &aPadPos, const wxSize &aSize, SHAPE_POLY_SET *aPolygons, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadCustom
const wxString GetReference() const
Function GetReference.
Definition: class_module.h:436
int GetChamferPositions() const
has meaning only for chamfered rect pads
Definition: class_pad.h:720
a pad with a castellated through hole
Definition: pad_shapes.h:84
void SetPadPinFunction(const wxString &aPadPinFunction, bool aUseUTF8, bool aEscapeString)
Definition: gbr_metadata.h:187
aperture used for BGA pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:93
virtual void FlashPadCircle(const wxPoint &aPadPos, int aDiameter, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadCircle
aperture used for fiducial pad (outer layers), at board level
Definition: gbr_metadata.h:97
bool MergePrimitivesAsPolygon(SHAPE_POLY_SET *aMergedPolygon=NULL)
Merge all basic shapes, converted to a polygon in one polygon, in m_customShapeAsPolygon.
SHAPE_POLY_SET.
void SetPadName(const wxString &aPadname, bool aUseUTF8=false, bool aEscapeString=false)
Definition: gbr_metadata.h:182
double GetChamferRectRatio() const
has meaning only for chamfered rect pads
Definition: class_pad.h:697
virtual void FlashPadRoundRect(const wxPoint &aPadPos, const wxSize &aSize, int aCornerRadius, double aOrient, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadRoundRect
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
Definition: class_pad.h:442
static LSET ExternalCuMask()
Function ExternalCuMask returns a mask holding the Front and Bottom layers.
Definition: lset.cpp:716
const wxString & GetName() const
Definition: class_pad.h:203
aperture used for mechanical pads (NPTH)
Definition: gbr_metadata.h:95
PAD_PROP_T GetProperty() const
Definition: class_pad.h:448
const wxString & GetNetname() const
Function GetNetname.
Like smd, does not appear on the solder paste layer (default) note also has a special attribute in Ge...
Definition: pad_shapes.h:63
aperture used for connected items like tracks (not vias)
Definition: gbr_metadata.h:84
aperture used for test point pad (outer layers)
Definition: gbr_metadata.h:96
void TransformRoundChamferedRectToPolygon(SHAPE_POLY_SET &aCornerBuffer, const wxPoint &aPosition, const wxSize &aSize, double aRotation, int aCornerRadius, double aChamferRatio, int aChamferCorners, int aApproxErrorMax, int aMinSegPerCircleCount=16)
convert a rectangle with rounded corners and/or chamfered corners to a polygon Convert rounded corner...
MODULE * GetParent() const
Definition: class_pad.h:167
void BuildPadPolygon(wxPoint aCoord[4], wxSize aInflateValue, double aRotation) const
Function BuildPadPolygon Has meaning only for polygonal pads (trapezoid and rectangular) Build the Co...
void SetNetName(const wxString &aNetname)
Definition: gbr_metadata.h:180
virtual void FlashPadRect(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadRect
a fiducial (usually a smd) local to the parent footprint
Definition: pad_shapes.h:81
virtual void FlashPadOval(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadOval
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in tenths of degrees,...
Definition: class_pad.h:422
void CustomShapeAsPolygonToBoardPosition(SHAPE_POLY_SET *aMergedPolygon, wxPoint aPosition, double aRotation) const
When created, the corners coordinates are relative to the pad position, orientation 0,...
LSET m_layerMask
Definition: pcbplot.h:81
wxPoint ShapePos() const
Definition: class_pad.cpp:570
aperture used for fiducial pad (outer layers), at footprint level
Definition: gbr_metadata.h:98
aperture used for SMD pad with a solder mask defined by the solder mask
Definition: gbr_metadata.h:91
Definition: colors.h:49
int GetRoundRectCornerRadius() const
Function GetRoundRectCornerRadius Has meaning only for rounded rect pads.
Definition: class_pad.h:573
static LSET AllBoardTechMask()
Function AllTechMask returns a mask holding board technical layers (no CU layer) on both side.
Definition: lset.cpp:763
void SetApertureAttrib(GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB aApertAttribute)
Definition: gbr_metadata.h:160
bool m_NotInNet
true if a pad of a footprint cannot be connected (for instance a mechanical NPTH, ot a not named pad)...
GBR_NETLIST_METADATA m_NetlistMetadata
a item to handle object attribute:
Definition: gbr_metadata.h:212
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:237
const wxSize & GetSize() const
Definition: class_pad.h:300
void SetCopper(bool aValue)
Definition: gbr_metadata.h:202
virtual void FlashPadTrapez(const wxPoint &aPadPos, const wxPoint *aCorners, double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void *aData)=0
virtual function FlashPadTrapez flash a trapezoidal pad
a test point pad
Definition: pad_shapes.h:82
print info associated to a net (TO.N attribute)
void SetCmpReference(const wxString &aComponentRef)
Definition: gbr_metadata.h:192
#define GBR_NETINFO_ALL

References LSET::AllBoardTechMask(), LSET::AllCuMask(), D_PAD::BuildPadPolygon(), D_PAD::CustomShapeAsPolygonToBoardPosition(), LSET::ExternalCuMask(), PLOTTER::FlashPadCircle(), PLOTTER::FlashPadCustom(), PLOTTER::FlashPadOval(), PLOTTER::FlashPadRect(), PLOTTER::FlashPadRoundRect(), PLOTTER::FlashPadTrapez(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_BGAPAD_CUDEF, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CASTELLATEDPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_COMPONENTPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONDUCTOR, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONNECTORPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_FIDUCIAL_GLBL, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_FIDUCIAL_LOCAL, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_HEATSINKPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_SMDPAD_CUDEF, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_TESTPOINT, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_VIAPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_WASHERPAD, GBR_NETINFO_ALL, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, GBR_NETLIST_METADATA::GBR_NETINFO_NET, D_PAD::GetAttribute(), D_PAD::GetChamferPositions(), D_PAD::GetChamferRectRatio(), BOARD::GetDesignSettings(), D_PAD::GetLayerSet(), D_PAD::GetName(), BOARD_CONNECTED_ITEM::GetNetname(), D_PAD::GetOrientation(), D_PAD::GetParent(), D_PAD::GetPinFunction(), D_PAD::GetProperty(), MODULE::GetReference(), D_PAD::GetRoundRectCornerRadius(), D_PAD::GetShape(), D_PAD::GetSize(), LIGHTGRAY, m_board, m_layerMask, BOARD_DESIGN_SETTINGS::m_MaxError, GBR_METADATA::m_NetlistMetadata, GBR_NETLIST_METADATA::m_NotInNet, m_plotter, D_PAD::MergePrimitivesAsPolygon(), SHAPE_POLY_SET::OutlineCount(), PAD_ATTRIB_CONN, PAD_ATTRIB_HOLE_NOT_PLATED, PAD_ATTRIB_SMD, PAD_ATTRIB_STANDARD, PAD_PROP_BGA, PAD_PROP_CASTELLATED, PAD_PROP_FIDUCIAL_GLBL, PAD_PROP_FIDUCIAL_LOCAL, PAD_PROP_HEATSINK, PAD_PROP_NONE, PAD_PROP_TESTPOINT, PAD_SHAPE_CHAMFERED_RECT, PAD_SHAPE_CIRCLE, PAD_SHAPE_CUSTOM, PAD_SHAPE_OVAL, PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT, PAD_SHAPE_TRAPEZOID, GBR_METADATA::SetApertureAttrib(), GBR_METADATA::SetCmpReference(), PLOTTER::SetColor(), GBR_METADATA::SetCopper(), GBR_METADATA::SetNetAttribType(), GBR_METADATA::SetNetName(), GBR_METADATA::SetPadName(), GBR_METADATA::SetPadPinFunction(), D_PAD::ShapePos(), TransformRoundChamferedRectToPolygon(), and WHITE.

Referenced by PlotSilkScreen(), and PlotStandardLayer().

◆ PlotPcbTarget()

void BRDITEMS_PLOTTER::PlotPcbTarget ( PCB_TARGET PtMire)

Definition at line 435 of file plot_brditems_plotter.cpp.

436 {
437  int dx1, dx2, dy1, dy2, radius;
438 
439  if( !m_layerMask[aMire->GetLayer()] )
440  return;
441 
442  m_plotter->SetColor( getColor( aMire->GetLayer() ) );
443 
444  DRAWSEGMENT draw;
445 
446  draw.SetShape( S_CIRCLE );
447  draw.SetWidth( aMire->GetWidth() );
448  draw.SetLayer( aMire->GetLayer() );
449  draw.SetStart( aMire->GetPosition() );
450  radius = aMire->GetSize() / 3;
451 
452  if( aMire->GetShape() ) // shape X
453  radius = aMire->GetSize() / 2;
454 
455  // Draw the circle
456  draw.SetEnd( wxPoint( draw.GetStart().x + radius, draw.GetStart().y ));
457 
458  PlotDrawSegment( &draw );
459 
460  draw.SetShape( S_SEGMENT );
461 
462  radius = aMire->GetSize() / 2;
463  dx1 = radius;
464  dy1 = 0;
465  dx2 = 0;
466  dy2 = radius;
467 
468  if( aMire->GetShape() ) // Shape X
469  {
470  dx1 = dy1 = radius;
471  dx2 = dx1;
472  dy2 = -dy1;
473  }
474 
475  wxPoint mirePos( aMire->GetPosition() );
476 
477  // Draw the X or + shape:
478  draw.SetStart( wxPoint( mirePos.x - dx1, mirePos.y - dy1 ));
479  draw.SetEnd( wxPoint( mirePos.x + dx1, mirePos.y + dy1 ));
480  PlotDrawSegment( &draw );
481 
482  draw.SetStart( wxPoint( mirePos.x - dx2, mirePos.y - dy2 ));
483  draw.SetEnd( wxPoint( mirePos.x + dx2, mirePos.y + dy2 ));
484  PlotDrawSegment( &draw );
485 }
void SetShape(STROKE_T aShape)
virtual void SetLayer(PCB_LAYER_ID aLayer)
Function SetLayer sets the layer this item is on.
virtual void SetColor(COLOR4D color)=0
PLOTTER * m_plotter
Definition: pcbplot.h:79
usual segment : line with rounded ends
void SetStart(const wxPoint &aStart)
LSET m_layerMask
Definition: pcbplot.h:81
void SetEnd(const wxPoint &aEnd)
const wxPoint & GetStart() const
Function GetStart returns the starting point of the graphic.
COLOR4D getColor(LAYER_NUM aLayer)
Function getColor.
void PlotDrawSegment(DRAWSEGMENT *PtSegm)
void SetWidth(int aWidth)

References getColor(), BOARD_ITEM::GetLayer(), PCB_TARGET::GetPosition(), PCB_TARGET::GetShape(), PCB_TARGET::GetSize(), DRAWSEGMENT::GetStart(), PCB_TARGET::GetWidth(), m_layerMask, m_plotter, PlotDrawSegment(), S_CIRCLE, S_SEGMENT, PLOTTER::SetColor(), DRAWSEGMENT::SetEnd(), BOARD_ITEM::SetLayer(), DRAWSEGMENT::SetShape(), DRAWSEGMENT::SetStart(), DRAWSEGMENT::SetWidth(), wxPoint::x, and wxPoint::y.

Referenced by PlotBoardGraphicItems().

◆ PlotTextePcb()

void BRDITEMS_PLOTTER::PlotTextePcb ( TEXTE_PCB pt_texte)

Definition at line 632 of file plot_brditems_plotter.cpp.

633 {
634  double orient;
635  int thickness;
636  wxPoint pos;
637  wxSize size;
638  wxString shownText( pt_texte->GetShownText() );
639 
640  if( shownText.IsEmpty() )
641  return;
642 
643  if( !m_layerMask[pt_texte->GetLayer()] )
644  return;
645 
646  GBR_METADATA gbr_metadata;
647 
648  if( IsCopperLayer( pt_texte->GetLayer() ) )
650 
651  COLOR4D color = getColor( pt_texte->GetLayer() );
653 
654  size = pt_texte->GetTextSize();
655  pos = pt_texte->GetTextPos();
656  orient = pt_texte->GetTextAngle();
657  thickness = pt_texte->GetThickness();
658 
659  if( pt_texte->IsMirrored() )
660  size.x = -size.x;
661 
662  // Non bold texts thickness is clamped at 1/6 char size by the low level draw function.
663  // but in Pcbnew we do not manage bold texts and thickness up to 1/4 char size
664  // (like bold text) and we manage the thickness.
665  // So we set bold flag to true
666  bool allow_bold = pt_texte->IsBold() || thickness;
667 
668  if( pt_texte->IsMultilineAllowed() )
669  {
670  std::vector<wxPoint> positions;
671  wxArrayString strings_list;
672  wxStringSplit( shownText, strings_list, '\n' );
673  positions.reserve( strings_list.Count() );
674 
675  pt_texte->GetPositionsOfLinesOfMultilineText( positions, strings_list.Count() );
676 
677  for( unsigned ii = 0; ii < strings_list.Count(); ii++ )
678  {
679  wxString& txt = strings_list.Item( ii );
680  m_plotter->Text( positions[ii], color, txt, orient, size,
681  pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
682  thickness, pt_texte->IsItalic(), allow_bold, false, &gbr_metadata );
683  }
684  }
685  else
686  {
687  m_plotter->Text( pos, color, shownText, orient, size,
688  pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
689  thickness, pt_texte->IsItalic(), allow_bold, false, &gbr_metadata );
690  }
691 }
void wxStringSplit(const wxString &aText, wxArrayString &aStrings, wxChar aSplitter)
Split aString to a string list separated at aSplitter.
Definition: common.cpp:186
bool IsBold() const
Definition: eda_text.h:167
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
Definition: eda_text.h:184
bool IsMirrored() const
Definition: eda_text.h:173
virtual void SetColor(COLOR4D color)=0
int color
Definition: DXF_plotter.cpp:61
PLOTTER * m_plotter
Definition: pcbplot.h:79
double GetTextAngle() const
Definition: eda_text.h:158
int GetThickness() const
Return the pen width.
Definition: eda_text.h:148
virtual void Text(const wxPoint &aPos, const COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, bool aMultilineAllowed=false, void *aData=NULL)
Draws text with the plotter.
Definition: gr_text.cpp:232
bool IsItalic() const
Definition: eda_text.h:164
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
Definition: eda_text.h:183
const wxSize & GetTextSize() const
Definition: eda_text.h:223
bool IsMultilineAllowed() const
Definition: eda_text.h:181
LSET m_layerMask
Definition: pcbplot.h:81
bool IsCopperLayer(LAYER_NUM aLayerId)
Function IsCopperLayer tests whether a layer is a copper layer.
const wxPoint & GetTextPos() const
Definition: eda_text.h:232
void GetPositionsOfLinesOfMultilineText(std::vector< wxPoint > &aPositions, int aLineCount) const
Populate aPositions with the position of each line of a multiline text, according to the vertical jus...
Definition: eda_text.cpp:384
void SetApertureAttrib(GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB aApertAttribute)
Definition: gbr_metadata.h:160
virtual wxString GetShownText() const
Return the string actually shown after processing of the base text.
Definition: eda_text.h:129
aperture used for not connected items (texts, outlines on copper)
Definition: gbr_metadata.h:86
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
COLOR4D getColor(LAYER_NUM aLayer)
Function getColor.
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39

References color, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR, getColor(), EDA_TEXT::GetHorizJustify(), BOARD_ITEM::GetLayer(), EDA_TEXT::GetPositionsOfLinesOfMultilineText(), EDA_TEXT::GetShownText(), EDA_TEXT::GetTextAngle(), EDA_TEXT::GetTextPos(), EDA_TEXT::GetTextSize(), EDA_TEXT::GetThickness(), EDA_TEXT::GetVertJustify(), EDA_TEXT::IsBold(), IsCopperLayer(), EDA_TEXT::IsItalic(), EDA_TEXT::IsMirrored(), EDA_TEXT::IsMultilineAllowed(), m_layerMask, m_plotter, GBR_METADATA::SetApertureAttrib(), PLOTTER::SetColor(), PLOTTER::Text(), and wxStringSplit().

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), PlotBoardGraphicItems(), and PlotDimension().

◆ PlotTextModule()

void BRDITEMS_PLOTTER::PlotTextModule ( TEXTE_MODULE aTextMod,
COLOR4D  aColor 
)

Definition at line 347 of file plot_brditems_plotter.cpp.

348 {
349  wxSize size;
350  wxPoint pos;
351  double orient;
352  int thickness;
353 
354  if( aColor == COLOR4D::WHITE )
355  aColor = COLOR4D( LIGHTGRAY );
356 
357  m_plotter->SetColor( aColor );
358 
359  // calculate some text parameters :
360  size = pt_texte->GetTextSize();
361  pos = pt_texte->GetTextPos();
362 
363  orient = pt_texte->GetDrawRotation();
364 
365  thickness = pt_texte->GetThickness();
366 
367  if( pt_texte->IsMirrored() )
368  size.x = -size.x; // Text is mirrored
369 
370  // Non bold texts thickness is clamped at 1/6 char size by the low level draw function.
371  // but in Pcbnew we do not manage bold texts and thickness up to 1/4 char size
372  // (like bold text) and we manage the thickness.
373  // So we set bold flag to true
374  bool allow_bold = pt_texte->IsBold() || thickness;
375 
376  GBR_METADATA gbr_metadata;
378  MODULE* parent = static_cast<MODULE*> ( pt_texte->GetParent() );
379  gbr_metadata.SetCmpReference( parent->GetReference() );
380 
381  m_plotter->Text( pos, aColor, pt_texte->GetShownText(), orient, size,
382  pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
383  thickness, pt_texte->IsItalic(), allow_bold, false, &gbr_metadata );
384 }
print info associated to a component (TO.C attribute)
virtual void SetColor(COLOR4D color)=0
void SetNetAttribType(int aNetAttribType)
Definition: gbr_metadata.h:170
PLOTTER * m_plotter
Definition: pcbplot.h:79
const wxString GetReference() const
Function GetReference.
Definition: class_module.h:436
virtual void Text(const wxPoint &aPos, const COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, bool aMultilineAllowed=false, void *aData=NULL)
Draws text with the plotter.
Definition: gr_text.cpp:232
Definition: colors.h:49
void SetCmpReference(const wxString &aComponentRef)
Definition: gbr_metadata.h:192
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39

References GBR_NETLIST_METADATA::GBR_NETINFO_CMP, TEXTE_MODULE::GetDrawRotation(), EDA_TEXT::GetHorizJustify(), BOARD_ITEM::GetParent(), MODULE::GetReference(), TEXTE_MODULE::GetShownText(), EDA_TEXT::GetTextPos(), EDA_TEXT::GetTextSize(), EDA_TEXT::GetThickness(), EDA_TEXT::GetVertJustify(), EDA_TEXT::IsBold(), EDA_TEXT::IsItalic(), EDA_TEXT::IsMirrored(), LIGHTGRAY, m_plotter, GBR_METADATA::SetCmpReference(), PLOTTER::SetColor(), GBR_METADATA::SetNetAttribType(), PLOTTER::Text(), and WHITE.

Referenced by PlotAllTextsModule().

◆ SetA4Output()

void PCB_PLOT_PARAMS::SetA4Output ( int  aForce)
inlineinherited

Definition at line 308 of file pcb_plot_params.h.

308 { m_A4Output = aForce; };
bool m_A4Output
Autoscale the plot to fit an A4 (landscape?) sheet.

References PCB_PLOT_PARAMS::m_A4Output.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetAutoScale()

void PCB_PLOT_PARAMS::SetAutoScale ( bool  aFlag)
inlineinherited

Definition at line 234 of file pcb_plot_params.h.

234 { m_autoScale = aFlag; }
bool m_autoScale
When true set the scale to fit the board in the page.

References PCB_PLOT_PARAMS::m_autoScale.

Referenced by DIALOG_PLOT::Plot().

◆ SetColor()

void PCB_PLOT_PARAMS::SetColor ( COLOR4D  aVal)
inlineinherited

Definition at line 192 of file pcb_plot_params.h.

192 { m_color = aVal; }
COLOR4D m_color
Color for plotting the current layer. Provided, but not really used.

References PCB_PLOT_PARAMS::m_color.

◆ SetCreateGerberJobFile()

void PCB_PLOT_PARAMS::SetCreateGerberJobFile ( bool  aCreate)
inlineinherited

Definition at line 281 of file pcb_plot_params.h.

281 { m_createGerberJobFile = aCreate; }
bool m_createGerberJobFile
generate the auxiliary "job file" in gerber format

References PCB_PLOT_PARAMS::m_createGerberJobFile.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetDrillMarksType()

void PCB_PLOT_PARAMS::SetDrillMarksType ( DrillMarksType  aVal)
inlineinherited

Definition at line 221 of file pcb_plot_params.h.

221 { m_drillMarks = aVal; }
DrillMarksType m_drillMarks
Holes can be not plotted, have a small mark or plotted in actual size.

References PCB_PLOT_PARAMS::m_drillMarks.

Referenced by DIALOG_PLOT::applyPlotSettings(), DIALOG_EXPORT_SVG::CreateSVGFile(), and PlotOneBoardLayer().

◆ SetDXFPlotPolygonMode()

void PCB_PLOT_PARAMS::SetDXFPlotPolygonMode ( bool  aFlag)
inlineinherited

Definition at line 208 of file pcb_plot_params.h.

208 { m_DXFplotPolygonMode = aFlag; }
bool m_DXFplotPolygonMode
DXF format: Plot items in outline (polygon) mode In polygon mode, each item to plot is converted to a...

References PCB_PLOT_PARAMS::m_DXFplotPolygonMode.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetDXFPlotUnits()

void PCB_PLOT_PARAMS::SetDXFPlotUnits ( DXF_PLOTTER::DXF_UNITS  aUnit)
inlineinherited

Definition at line 211 of file pcb_plot_params.h.

212  {
213  m_DXFplotUnits = aUnit;
214  }
DXF_PLOTTER::DXF_UNITS m_DXFplotUnits
DXF format: Units to use when plotting the DXF.

References PCB_PLOT_PARAMS::m_DXFplotUnits.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetExcludeEdgeLayer()

void PCB_PLOT_PARAMS::SetExcludeEdgeLayer ( bool  aFlag)
inlineinherited

Definition at line 259 of file pcb_plot_params.h.

259 { m_excludeEdgeLayer = aFlag; }
bool m_excludeEdgeLayer
If false always plot (merge) the pcb edge layer on other layers.

References PCB_PLOT_PARAMS::m_excludeEdgeLayer.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetFineScaleAdjustX()

void PCB_PLOT_PARAMS::SetFineScaleAdjustX ( double  aVal)
inlineinherited

Definition at line 227 of file pcb_plot_params.h.

227 { m_fineScaleAdjustX = aVal; }
double m_fineScaleAdjustX
fine scale adjust X axis

References PCB_PLOT_PARAMS::m_fineScaleAdjustX.

Referenced by DIALOG_PLOT::Plot().

◆ SetFineScaleAdjustY()

void PCB_PLOT_PARAMS::SetFineScaleAdjustY ( double  aVal)
inlineinherited

Definition at line 229 of file pcb_plot_params.h.

229 { m_fineScaleAdjustY = aVal; }
double m_fineScaleAdjustY
fine scale adjust Y axis

References PCB_PLOT_PARAMS::m_fineScaleAdjustY.

Referenced by DIALOG_PLOT::Plot().

◆ SetFormat()

void PCB_PLOT_PARAMS::SetFormat ( PLOT_FORMAT  aFormat)
inlineinherited

Definition at line 262 of file pcb_plot_params.h.

263  {
264  m_format = aFormat;
265  }
PLOT_FORMAT m_format
Plot format type (chooses the driver to be used)

References PCB_PLOT_PARAMS::m_format.

Referenced by DIALOG_PLOT::applyPlotSettings(), DIALOG_EXPORT_SVG::CreateSVGFile(), PLOT_CONTROLLER::OpenPlotfile(), and PCB_EDIT_FRAME::ToPlotter().

◆ SetGerberPrecision()

void PCB_PLOT_PARAMS::SetGerberPrecision ( int  aPrecision)
inherited

Definition at line 139 of file pcb_plot_params.cpp.

140 {
141  // Currently geber files use mm.
142  // accepted precision is only 6 (max value, this is the resolution of Pcbnew)
143  // or 5, min value for professional boards, when 6 creates problems
144  // to board makers.
145 
148 }
static const int gbrDefaultPrecision
int m_gerberPrecision
precision of coordinates in Gerber files: accepted 5 or 6 when units are in mm (6 or 7 in inches,...

References gbrDefaultPrecision.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetHPGLPenDiameter()

bool PCB_PLOT_PARAMS::SetHPGLPenDiameter ( double  aValue)
inherited

Definition at line 324 of file pcb_plot_params.cpp.

325 {
327 }
static bool setDouble(double *aTarget, double aValue, double aMin, double aMax)
double m_HPGLPenDiam
HPGL only: pen diameter in MILS, useful to fill areas However, it is in mm in hpgl files.
#define HPGL_PEN_DIAMETER_MAX
#define HPGL_PEN_DIAMETER_MIN

References HPGL_PEN_DIAMETER_MAX, HPGL_PEN_DIAMETER_MIN, and setDouble().

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetHPGLPenNum()

void PCB_PLOT_PARAMS::SetHPGLPenNum ( int  aVal)
inlineinherited

Definition at line 320 of file pcb_plot_params.h.

320 { m_HPGLPenNum = aVal; }
int m_HPGLPenNum
HPGL only: pen number selection(1 to 9)

References PCB_PLOT_PARAMS::m_HPGLPenNum.

◆ SetHPGLPenSpeed()

bool PCB_PLOT_PARAMS::SetHPGLPenSpeed ( int  aValue)
inherited

Definition at line 330 of file pcb_plot_params.cpp.

331 {
333 }
#define HPGL_PEN_SPEED_MAX
static bool setInt(int *aTarget, int aValue, int aMin, int aMax)
#define HPGL_PEN_SPEED_MIN
int m_HPGLPenSpeed
HPGL only: pen speed, always in cm/s (1 to 99 cm/s)

References HPGL_PEN_SPEED_MAX, HPGL_PEN_SPEED_MIN, and setInt().

◆ SetIncludeGerberNetlistInfo()

void PCB_PLOT_PARAMS::SetIncludeGerberNetlistInfo ( bool  aUse)
inlineinherited

Definition at line 278 of file pcb_plot_params.h.

278 { m_includeGerberNetlistInfo = aUse; }
bool m_includeGerberNetlistInfo
Include netlist info (only in Gerber X2 format) (chapter ? in revision ?)

References PCB_PLOT_PARAMS::m_includeGerberNetlistInfo.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetLayerSelection()

void PCB_PLOT_PARAMS::SetLayerSelection ( LSET  aSelection)
inlineinherited

Definition at line 299 of file pcb_plot_params.h.

299 { m_layerSelection = aSelection; };
LSET m_layerSelection
Set of layers to plot.

References PCB_PLOT_PARAMS::m_layerSelection.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetLayerSet()

void BRDITEMS_PLOTTER::SetLayerSet ( LSET  aLayerMask)
inline

◆ SetLineWidth()

bool PCB_PLOT_PARAMS::SetLineWidth ( int  aValue)
inherited

Definition at line 336 of file pcb_plot_params.cpp.

337 {
339 }
#define PLOT_LINEWIDTH_MAX
static bool setInt(int *aTarget, int aValue, int aMin, int aMax)
#define PLOT_LINEWIDTH_MIN
int m_lineWidth
The default line width (used to draw items having no defined width)

References PLOT_LINEWIDTH_MAX, PLOT_LINEWIDTH_MIN, and setInt().

Referenced by DIALOG_PLOT::applyPlotSettings(), and PCB_PLOT_PARAMS_PARSER::Parse().

◆ SetMirror()

void PCB_PLOT_PARAMS::SetMirror ( bool  aFlag)
inlineinherited

Definition at line 237 of file pcb_plot_params.h.

237 { m_mirror = aFlag; }
bool m_mirror
Mirror the plot around the X axis.

References PCB_PLOT_PARAMS::m_mirror.

Referenced by DIALOG_PLOT::applyPlotSettings(), DIALOG_EXPORT_SVG::CreateSVGFile(), and StartPlotBoard().

◆ SetNegative()

void PCB_PLOT_PARAMS::SetNegative ( bool  aFlag)
inlineinherited

Definition at line 250 of file pcb_plot_params.h.

250 { m_negative = aFlag; }
bool m_negative
Plot in negative color (supported only by some drivers)

References PCB_PLOT_PARAMS::m_negative.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetOutputDirectory()

void PCB_PLOT_PARAMS::SetOutputDirectory ( wxString  aDir)
inlineinherited

Definition at line 272 of file pcb_plot_params.h.

272 { m_outputDirectory = aDir; }
wxString m_outputDirectory
Output directory for plot files (usually relative to the board file)

References PCB_PLOT_PARAMS::m_outputDirectory.

Referenced by DIALOG_PLOT::applyPlotSettings(), DIALOG_GEN_FOOTPRINT_POSITION::OnGenerate(), and DIALOG_GENDRILL::UpdateDrillParams().

◆ SetPlotFrameRef()

void PCB_PLOT_PARAMS::SetPlotFrameRef ( bool  aFlag)
inlineinherited

Definition at line 256 of file pcb_plot_params.h.

256 { m_plotFrameRef = aFlag; }
bool m_plotFrameRef
True to plot/print frame references.

References PCB_PLOT_PARAMS::m_plotFrameRef.

Referenced by DIALOG_PLOT::applyPlotSettings(), and DIALOG_EXPORT_SVG::CreateSVGFile().

◆ SetPlotInvisibleText()

void PCB_PLOT_PARAMS::SetPlotInvisibleText ( bool  aFlag)
inlineinherited

Definition at line 243 of file pcb_plot_params.h.

243 { m_plotInvisibleText = aFlag; }
bool m_plotInvisibleText
Force plotting of fields marked invisible.

References PCB_PLOT_PARAMS::m_plotInvisibleText.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetPlotMode()

void PCB_PLOT_PARAMS::SetPlotMode ( EDA_DRAW_MODE_T  aPlotMode)
inlineinherited

Definition at line 205 of file pcb_plot_params.h.

205 { m_plotMode = aPlotMode; }
EDA_DRAW_MODE_T m_plotMode
FILLED or SKETCH selects how to plot filled objects.

References PCB_PLOT_PARAMS::m_plotMode.

Referenced by DIALOG_PLOT::applyPlotSettings(), and PCB_PLOT_PARAMS_PARSER::Parse().

◆ SetPlotPadsOnSilkLayer()

void PCB_PLOT_PARAMS::SetPlotPadsOnSilkLayer ( bool  aFlag)
inlineinherited

Definition at line 240 of file pcb_plot_params.h.

240 { m_plotPadsOnSilkLayer = aFlag; }
bool m_plotPadsOnSilkLayer
Allows pads outlines on silkscreen layer (when pads are also on silk screen)

References PCB_PLOT_PARAMS::m_plotPadsOnSilkLayer.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetPlotReference()

void PCB_PLOT_PARAMS::SetPlotReference ( bool  aFlag)
inlineinherited

Definition at line 247 of file pcb_plot_params.h.

247 { m_plotReference = aFlag; }
bool m_plotReference
Enable plotting of part references.

References PCB_PLOT_PARAMS::m_plotReference.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetPlotValue()

void PCB_PLOT_PARAMS::SetPlotValue ( bool  aFlag)
inlineinherited

Definition at line 245 of file pcb_plot_params.h.

245 { m_plotValue = aFlag; }
bool m_plotValue
Enable plotting of part values.

References PCB_PLOT_PARAMS::m_plotValue.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetPlotViaOnMaskLayer()

void PCB_PLOT_PARAMS::SetPlotViaOnMaskLayer ( bool  aFlag)
inlineinherited

Definition at line 253 of file pcb_plot_params.h.

253 { m_plotViaOnMaskLayer = aFlag; }
bool m_plotViaOnMaskLayer
True if vias are drawn on Mask layer (ie untented, exposed by mask)

References PCB_PLOT_PARAMS::m_plotViaOnMaskLayer.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetScale()

void PCB_PLOT_PARAMS::SetScale ( double  aVal)
inlineinherited

Definition at line 224 of file pcb_plot_params.h.

224 { m_scale = aVal; }
double m_scale
Global scale factor, 1.0 plots a board with its actual size.

References PCB_PLOT_PARAMS::m_scale.

Referenced by DIALOG_PLOT::Plot().

◆ SetScaleSelection()

void PCB_PLOT_PARAMS::SetScaleSelection ( int  aSelection)
inlineinherited

Definition at line 305 of file pcb_plot_params.h.

305 { m_scaleSelection = aSelection; };
int m_scaleSelection
Scale ratio index (UI only)

References PCB_PLOT_PARAMS::m_scaleSelection.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetSkipPlotNPTH_Pads()

void PCB_PLOT_PARAMS::SetSkipPlotNPTH_Pads ( bool  aSkip)
inlineinherited

Definition at line 177 of file pcb_plot_params.h.

177 { m_skipNPTH_Pads = aSkip; }

References PCB_PLOT_PARAMS::m_skipNPTH_Pads.

Referenced by DIALOG_EXPORT_SVG::CreateSVGFile(), and PlotOneBoardLayer().

◆ SetSubtractMaskFromSilk()

void PCB_PLOT_PARAMS::SetSubtractMaskFromSilk ( bool  aSubtract)
inlineinherited

Definition at line 296 of file pcb_plot_params.h.

296 { m_subtractMaskFromSilk = aSubtract; };
bool m_subtractMaskFromSilk
On gerbers 'scrape' away the solder mask from silkscreen (trim silks)

References PCB_PLOT_PARAMS::m_subtractMaskFromSilk.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetTextMode()

void PCB_PLOT_PARAMS::SetTextMode ( PLOT_TEXT_MODE  aVal)
inlineinherited

Definition at line 195 of file pcb_plot_params.h.

196  {
197  m_textMode = aVal;
198  }
PLOT_TEXT_MODE m_textMode
Choose how represent text with PS, PDF and DXF drivers.

References PCB_PLOT_PARAMS::m_textMode.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetUseAuxOrigin()

void PCB_PLOT_PARAMS::SetUseAuxOrigin ( bool  aAux)
inlineinherited

Definition at line 302 of file pcb_plot_params.h.

302 { m_useAuxOrigin = aAux; };
bool m_useAuxOrigin
Plot gerbers using auxiliary (drill) origin instead of absolue coordinates.

References PCB_PLOT_PARAMS::m_useAuxOrigin.

Referenced by DIALOG_PLOT::applyPlotSettings(), DIALOG_EXPORT_SVG::CreateSVGFile(), and DIALOG_GENDRILL::UpdateDrillParams().

◆ SetUseGerberProtelExtensions()

void PCB_PLOT_PARAMS::SetUseGerberProtelExtensions ( bool  aUse)
inlineinherited

Definition at line 284 of file pcb_plot_params.h.

284 { m_useGerberProtelExtensions = aUse; }
bool m_useGerberProtelExtensions
When plotting gerber files, use a conventional set of Protel extensions instead of ....

References PCB_PLOT_PARAMS::m_useGerberProtelExtensions.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetUseGerberX2format()

void PCB_PLOT_PARAMS::SetUseGerberX2format ( bool  aUse)
inlineinherited

Definition at line 275 of file pcb_plot_params.h.

275 { m_useGerberX2format = aUse; }
bool m_useGerberX2format
Include attributes from the Gerber X2 format (chapter 5 in revision J2)

References PCB_PLOT_PARAMS::m_useGerberX2format.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetWidthAdjust()

void PCB_PLOT_PARAMS::SetWidthAdjust ( int  aVal)
inlineinherited

Definition at line 231 of file pcb_plot_params.h.

231 { m_widthAdjust = aVal; }
int m_widthAdjust
This width factor is intended to compensate PS printers/ plotters that do not strictly obey line widt...

References PCB_PLOT_PARAMS::m_widthAdjust.

Referenced by DIALOG_PLOT::Plot().

Member Data Documentation

◆ m_board

BOARD* BRDITEMS_PLOTTER::m_board
private

◆ m_layerMask

LSET BRDITEMS_PLOTTER::m_layerMask
private

◆ m_plotter


The documentation for this class was generated from the following files: