2009-03-18 15:38:16 +00:00
|
|
|
/************/
|
|
|
|
/* pcbplot.h*/
|
|
|
|
/************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#ifndef PCBPLOT_H
|
|
|
|
#define PCBPLOT_H
|
|
|
|
|
|
|
|
|
2009-01-13 19:18:54 +00:00
|
|
|
/* Shared Config keys for plot and print */
|
2009-08-28 18:03:22 +00:00
|
|
|
#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
|
|
|
|
#define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" )
|
|
|
|
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
|
|
|
|
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
|
2009-10-23 07:41:29 +00:00
|
|
|
#define OPTKEY_PRINT_MODULE_SCALE wxT( "PrintModuleScale" )
|
|
|
|
#define OPTKEY_PRINT_PAGE_FRAME wxT( "PrintPageFrame" )
|
2009-11-20 14:55:20 +00:00
|
|
|
#define OPTKEY_PRINT_MONOCHROME_MODE wxT( "PrintMonochrome" )
|
2010-01-09 20:25:39 +00:00
|
|
|
#define OPTKEY_PRINT_PADS_DRILL wxT( "PrintPadsDrillOpt" )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-11-20 14:55:20 +00:00
|
|
|
/* Conversion unit constants. */
|
|
|
|
/* Convert pcb dimension of 0.1 mil to PS units of inches. */
|
2007-06-05 12:10:51 +00:00
|
|
|
#define SCALE_PS .0001
|
2009-11-20 14:55:20 +00:00
|
|
|
/* Convert dimension 0.1 mil -> HPGL units: */
|
2007-06-05 12:10:51 +00:00
|
|
|
#define SCALE_HPGL 0.102041
|
|
|
|
|
2010-01-09 20:25:39 +00:00
|
|
|
// Small drill marks diameter value (in internal value = 1/10000 inch)
|
|
|
|
#define SMALL_DRILL 150
|
|
|
|
|
2010-12-11 18:40:39 +00:00
|
|
|
/* a helper class to handle plot parameters and options when plotting/printing a board
|
|
|
|
*/
|
|
|
|
class PCB_PLOT_PARAMS
|
2009-08-28 18:03:22 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-12-11 18:40:39 +00:00
|
|
|
bool m_ExcludeEdgeLayer; // True: do not plot edge layer when plotting other layers
|
|
|
|
// False: Edge layer always plotted (merged) when plotting other layers
|
|
|
|
int m_PlotLineWidth;
|
|
|
|
bool m_PlotFrameRef; // True to plot/print frame references
|
|
|
|
bool m_PlotViaOnMaskLayer; // True if vias are drawn on Mask layer
|
|
|
|
// (ie protected by mask)
|
2010-12-11 19:33:21 +00:00
|
|
|
GRTraceMode m_PlotMode; // = FILAIRE, FILLED or SKETCH: select how to plot filled objects.
|
|
|
|
// depending on plot format or layers, all options are not always allowed
|
2010-12-11 18:40:39 +00:00
|
|
|
int m_HPGLPenNum;
|
|
|
|
int m_HPGLPenSpeed;
|
|
|
|
int m_HPGLPenDiam;
|
|
|
|
int m_HPGLPenOvr;
|
|
|
|
int m_PlotPSColorOpt; // True for color Postscript output
|
|
|
|
bool m_PlotPSNegative; // True to create a negative board ps plot
|
2009-06-28 16:50:42 +00:00
|
|
|
|
2009-11-20 14:55:20 +00:00
|
|
|
/* Flags to enable or disable ploting of various PCB elements. */
|
2010-12-11 18:40:39 +00:00
|
|
|
bool m_PlotReference;
|
|
|
|
bool m_PlotValue;
|
|
|
|
bool m_PlotTextOther;
|
|
|
|
bool m_PlotInvisibleTexts;
|
2010-12-12 11:41:18 +00:00
|
|
|
bool m_PlotPadsOnSilkLayer; ///< allows pads outlines on silkscreen layer (when pads are also o, silk screen
|
2010-12-09 17:34:08 +00:00
|
|
|
bool m_SubtractMaskFromSilk;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2010-12-12 11:41:18 +00:00
|
|
|
/// id for plot format (see enum PlotFormat in plot_common.h) */
|
2010-12-11 18:40:39 +00:00
|
|
|
int m_PlotFormat; // Gerber, HPGL ...
|
|
|
|
bool m_PlotMirror;
|
2010-12-12 02:29:33 +00:00
|
|
|
|
2009-06-28 16:50:42 +00:00
|
|
|
enum DrillShapeOptT {
|
2009-08-28 18:03:22 +00:00
|
|
|
NO_DRILL_SHAPE = 0,
|
|
|
|
SMALL_DRILL_SHAPE = 1,
|
|
|
|
FULL_DRILL_SHAPE = 2
|
2009-06-28 16:50:42 +00:00
|
|
|
};
|
2010-12-11 18:40:39 +00:00
|
|
|
DrillShapeOptT m_DrillShapeOpt; // For postscript output: holes can be not plotted,
|
|
|
|
// or have a small size or plotted with their actual size
|
2010-12-12 11:41:18 +00:00
|
|
|
bool m_AutoScale; // If true, use the better scale to fit in page
|
|
|
|
double m_PlotScale; // The global scale factor. a 1.0 scale factor plot a board
|
2010-12-11 18:40:39 +00:00
|
|
|
// with its actual size.
|
|
|
|
// These next two scale factors are intended to compensable plotters (and mainly printers) X and Y scale error.
|
|
|
|
// Therefore they are expected very near 1.0
|
|
|
|
// Only X and Y dimensions are adjusted: circles are plotted as circle, even if X and Y fine scale differ.
|
2010-12-12 11:41:18 +00:00
|
|
|
double m_FineScaleAdjustX; // fine scale adjust X axis
|
|
|
|
double m_FineScaleAdjustY; // dine scale adjust Y axis
|
2009-08-28 18:03:22 +00:00
|
|
|
|
2010-12-06 22:05:12 +00:00
|
|
|
private:
|
2010-12-11 18:40:39 +00:00
|
|
|
wxString outputDirectory;
|
2010-11-21 15:12:37 +00:00
|
|
|
|
2009-08-28 18:03:22 +00:00
|
|
|
public:
|
2010-12-12 11:41:18 +00:00
|
|
|
PCB_PLOT_PARAMS();
|
2010-12-12 02:29:33 +00:00
|
|
|
void SetOutputDirectory( wxString aDir ) { outputDirectory = aDir; };
|
|
|
|
wxString GetOutputDirectory() { return outputDirectory; };
|
|
|
|
void SetSubtractMaskFromSilk( bool aSubtract ) { m_SubtractMaskFromSilk = aSubtract; };
|
|
|
|
bool GetSubtractMaskFromSilk() { return m_SubtractMaskFromSilk; };
|
2009-06-28 16:50:42 +00:00
|
|
|
};
|
|
|
|
|
2010-12-11 18:40:39 +00:00
|
|
|
extern PCB_PLOT_PARAMS g_PcbPlotOptions;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2009-08-29 10:20:48 +00:00
|
|
|
void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int masque_layer,
|
2009-08-28 18:03:22 +00:00
|
|
|
GRTraceMode trace_mode );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-11-20 14:55:20 +00:00
|
|
|
/* Plat PCB text type, ie other than text on modules
|
|
|
|
* prepare the plot settings of text */
|
2009-08-29 10:20:48 +00:00
|
|
|
void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* PtSegm, int masque_layer,
|
2009-08-28 18:03:22 +00:00
|
|
|
GRTraceMode trace_mode );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2010-04-23 09:54:40 +00:00
|
|
|
void PlotDimension( PLOTTER* plotter, DIMENSION* Dimension, int masque_layer,
|
2010-12-11 18:40:39 +00:00
|
|
|
GRTraceMode trace_mode );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-08-29 10:20:48 +00:00
|
|
|
void PlotMirePcb( PLOTTER* plotter, MIREPCB* PtMire, int masque_layer,
|
2009-08-28 18:03:22 +00:00
|
|
|
GRTraceMode trace_mode );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-08-29 10:20:48 +00:00
|
|
|
void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* PtEdge,
|
2009-08-28 18:03:22 +00:00
|
|
|
GRTraceMode trace_mode );
|
2009-03-18 15:38:16 +00:00
|
|
|
|
2009-08-29 10:20:48 +00:00
|
|
|
void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone,
|
2009-08-28 18:03:22 +00:00
|
|
|
GRTraceMode trace_mode );
|
2008-10-07 12:10:24 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* PLOTGERB.CPP */
|
2009-08-29 10:20:48 +00:00
|
|
|
void SelectD_CODE_For_LineDraw( PLOTTER* plotter, int aSize );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-24 10:10:42 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
#endif /* #define PCBPLOT_H */
|