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 */
|
|
|
|
#define OPTKEY_PLOT_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
|
2009-03-18 15:38:16 +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" )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* Constantes de conversion d'unites */
|
|
|
|
/* coeff de conversion dim en 0.1 mil -> dim en unite PS: (unite PS = pouce) */
|
|
|
|
#define SCALE_PS .0001
|
|
|
|
/* coeff de conversion dim en 0,1 mil -> dim en unite HPGL: */
|
|
|
|
#define SCALE_HPGL 0.102041
|
|
|
|
|
|
|
|
/* Options : */
|
2009-04-05 20:49:15 +00:00
|
|
|
extern bool g_Exclude_Edges_Pcb;
|
|
|
|
extern bool g_Plot_Frame_Ref; // True to plot/print frame references
|
|
|
|
extern bool g_DrawViaOnMaskLayer; // True if vias are drawn on Mask layer (ie protected by mask)
|
|
|
|
extern int g_Plot_Mode;
|
|
|
|
extern bool Plot_Set_MIROIR;
|
|
|
|
extern bool Sel_Rotate_Window;
|
|
|
|
extern bool HPGL_Org_Centre; // TRUE si en HPGL, l'origine le centre de la feuille
|
|
|
|
extern int g_PlotPSColorOpt; // True for color Postscript output
|
|
|
|
extern bool g_Plot_PS_Negative; // True to create a negative board ps plot
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Autorisation de trace des divers items en serigraphie */
|
2009-04-05 20:49:15 +00:00
|
|
|
extern bool Sel_Texte_Reference;
|
|
|
|
extern bool Sel_Texte_Valeur;
|
|
|
|
extern bool Sel_Texte_Divers;
|
|
|
|
extern bool Sel_Texte_Invisible;
|
|
|
|
extern bool PlotPadsOnSilkLayer;
|
|
|
|
extern bool Plot_Pads_All_Layers; /* Plot pads meme n'appartenant pas a la
|
|
|
|
couche ( utile pour serigraphie) */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
/* Variables utiles */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
extern FILE * dest;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
/* id for plot format (see enum PlotFormat in plot_common.h) */
|
|
|
|
extern int g_PlotScaleOpt;
|
|
|
|
extern int g_DrillShapeOpt;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
/*************************************/
|
|
|
|
/* Constantes utiles en trace GERBER */
|
|
|
|
/*************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* codes de type de forme d'outils */
|
|
|
|
#define GERB_CIRCLE 1
|
2009-03-18 15:38:16 +00:00
|
|
|
#define GERB_RECT 2
|
|
|
|
#define GERB_LINE 3
|
|
|
|
#define GERB_OVALE 4
|
|
|
|
#define GERB_DONUT 5
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* PLOT_RTN.CC */
|
2009-03-18 15:38:16 +00:00
|
|
|
void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules,
|
|
|
|
* prepare les parametres de trace de texte */
|
|
|
|
void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
|
|
|
|
int rayon, int width );
|
|
|
|
void PlotCircle( int format_plot, int width, wxPoint centre, int rayon );
|
|
|
|
void PlotFilledPolygon( int format_plot, int nbpoints, int* coord );
|
|
|
|
void PlotPolygon( int format_plot, int nbpoints, int* coord, int width );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
void PlotDrawSegment( DRAWSEGMENT* PtSegm, int format_plot, int masque_layer );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
void PlotCotation( COTATION* Cotation, int format_plot, int masque_layer );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
void PlotMirePcb( MIREPCB* PtMire, int format_plot, int masque_layer );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge );
|
|
|
|
|
|
|
|
void PlotFilledAreas( ZONE_CONTAINER* aZone, int aFormat );
|
2008-10-07 12:10:24 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* PLOTGERB.CPP */
|
2009-03-18 15:38:16 +00:00
|
|
|
void SelectD_CODE_For_LineDraw( int aSize );
|
|
|
|
void trace_1_contour_GERBER( wxPoint pos, wxSize size, wxSize delta,
|
|
|
|
int penwidth, int orient );
|
|
|
|
|
|
|
|
/* Trace 1 contour rectangulaire ou trapezoidal d'orientation quelconque
|
|
|
|
* donne par son centre, ses dimensions,
|
|
|
|
* ses variations, l'epaisseur du trait et son orientation orient */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
/* PLOTHPGL.CPP */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
/** Function Plot a filled segment (track)
|
|
|
|
* @param aStart = starting point
|
|
|
|
* @param aEnd = ending point
|
|
|
|
* @param aWidth = segment width (thickness)
|
|
|
|
* @param aPlotMode = FILLED, SKETCH ..
|
|
|
|
* @return true if Ok, false if aWidth > pen size (the segment is always plotted)
|
|
|
|
*/
|
|
|
|
bool Plot_Filled_Segment_HPGL( wxPoint aStart, wxPoint aEnd, int aWidth, GRFillMode aPlotMode );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-03-18 15:38:16 +00:00
|
|
|
void trace_1_pad_TRAPEZE_HPGL( wxPoint padpos, wxSize size, wxSize delta,
|
|
|
|
int orient, int modetrace );
|
|
|
|
|
|
|
|
void trace_1_pastille_RONDE_HPGL( wxPoint padpos, int diametre, int modetrace );
|
|
|
|
void trace_1_pastille_OVALE_HPGL( wxPoint padpos, wxSize size, int orient, int modetrace );
|
|
|
|
void PlotRectangularPad_HPGL( wxPoint padpos, wxSize padsize, int orient, int modetrace );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/**************/
|
|
|
|
/* PLOTPS.CPP */
|
|
|
|
/**************/
|
2009-03-18 15:38:16 +00:00
|
|
|
void trace_1_pastille_OVALE_POST( wxPoint centre, wxSize size, int orient, int modetrace );
|
|
|
|
void trace_1_pastille_RONDE_POST( wxPoint centre, int diametre, int modetrace );
|
|
|
|
void trace_1_pad_rectangulaire_POST( wxPoint centre, wxSize size, int orient,
|
2009-04-05 20:49:15 +00:00
|
|
|
int modetrace );
|
2009-03-18 15:38:16 +00:00
|
|
|
void trace_1_contour_POST( wxPoint centre, wxSize size, wxSize delta,
|
|
|
|
int dim_trait, int orient );
|
|
|
|
void trace_1_pad_TRAPEZE_POST( wxPoint centre, wxSize size, wxSize delta,
|
|
|
|
int orient, int modetrace );
|
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 */
|