Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
2da432b2
Commit
2da432b2
authored
Mar 22, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plot fix, beautification
parent
11d8f51b
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2168 additions
and
2078 deletions
+2168
-2078
common_plotHPGL_functions.cpp
common/common_plotHPGL_functions.cpp
+136
-128
common_plotPS_functions.cpp
common/common_plotPS_functions.cpp
+271
-244
common_plot_functions.cpp
common/common_plot_functions.cpp
+310
-295
drawtxt.cpp
common/drawtxt.cpp
+38
-38
eestring.cpp
eeschema/eestring.cpp
+475
-459
plot.cpp
eeschema/plot.cpp
+0
-2
plot_common.h
include/plot_common.h
+64
-42
wxPcbStruct.h
include/wxPcbStruct.h
+6
-6
gen_drill_report_files.cpp
pcbnew/gen_drill_report_files.cpp
+26
-26
gendrill.cpp
pcbnew/gendrill.cpp
+58
-58
pcbplot.cpp
pcbnew/pcbplot.cpp
+41
-45
pcbplot.h
pcbnew/pcbplot.h
+39
-40
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+4
-10
plotgerb.cpp
pcbnew/plotgerb.cpp
+686
-677
plotps.cpp
pcbnew/plotps.cpp
+10
-8
specctra.h
pcbnew/specctra.h
+4
-0
No files found.
common/common_plotHPGL_functions.cpp
View file @
2da432b2
/******************************************/
/******************************************/
/* Kicad: Common plot HPGL Routines */
/* Kicad: Common plot HPGL Routines */
/******************************************/
/******************************************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "gr_basic.h"
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
// Variables partagees avec Common plot Postscript Routines
// Variables partagees avec Common plot Postscript Routines
extern
wxPoint
LastPenPosition
;
extern
wxPoint
LastPenPosition
;
extern
wxPoint
PlotOffset
;
extern
wxPoint
PlotOffset
;
extern
FILE
*
PlotOutputFile
;
extern
FILE
*
PlotOutputFile
;
extern
double
XScale
,
YScale
;
extern
double
XScale
,
YScale
;
extern
int
g_DefaultPenWidth
,
g_CurrentPenWidth
;
extern
int
g_DefaultPenWidth
,
g_CurrentPenWidth
;
extern
int
PlotOrientOptions
,
etat_plume
;
extern
int
PlotOrientOptions
,
etat_plume
;
...
@@ -28,12 +28,13 @@ void Plume_HPGL( int plume );
...
@@ -28,12 +28,13 @@ void Plume_HPGL( int plume );
/***********************************************************************************/
/***********************************************************************************/
void
InitPlotParametresHPGL
(
wxPoint
offset
,
double
xscale
,
double
yscale
,
int
orient
)
void
InitPlotParametresHPGL
(
wxPoint
offset
,
double
xscale
,
double
yscale
,
int
orient
)
/***********************************************************************************/
/***********************************************************************************/
/* Set the plot offset for the current plotting
/* Set the plot offset for the current plotting
xscale,yscale = coordinate scale (scale coefficient for coordinates)
*
xscale,yscale = coordinate scale (scale coefficient for coordinates)
device_xscale,device_yscale = device coordinate scale (i.e scale used by plot device)
*
device_xscale,device_yscale = device coordinate scale (i.e scale used by plot device)
*/
*/
{
{
PlotOffset
=
offset
;
PlotOffset
=
offset
;
XScale
=
xscale
;
XScale
=
xscale
;
...
@@ -44,164 +45,171 @@ void InitPlotParametresHPGL(wxPoint offset, double xscale, double yscale, int or
...
@@ -44,164 +45,171 @@ void InitPlotParametresHPGL(wxPoint offset, double xscale, double yscale, int or
}
}
/*****************************************************************/
/*****************************************************************/
bool
PrintHeaderHPGL
(
FILE
*
plot_file
,
int
pen_speed
,
int
pen_num
)
bool
PrintHeaderHPGL
(
FILE
*
plot_file
,
int
pen_speed
,
int
pen_num
)
/*****************************************************************/
/*****************************************************************/
{
{
char
Line
[
256
];
char
Line
[
256
];
PlotOutputFile
=
plot_file
;
PlotOutputFile
=
plot_file
;
etat_plume
=
'U'
;
etat_plume
=
'U'
;
sprintf
(
Line
,
"IN;VS%d;PU;PA;SP%d;
\n
"
,
pen_speed
,
pen_num
);
sprintf
(
Line
,
"IN;VS%d;PU;PA;SP%d;
\n
"
,
pen_speed
,
pen_num
);
fputs
(
Line
,
plot_file
);
fputs
(
Line
,
plot_file
);
return
TRUE
;
return
TRUE
;
}
}
/**********************************/
/**********************************/
bool
CloseFileHPGL
(
FILE
*
plot_file
)
bool
CloseFileHPGL
(
FILE
*
plot_file
)
/**********************************/
/**********************************/
{
{
fputs
(
"PU;PA;SP0;
\n
"
,
plot_file
);
fputs
(
"PU;PA;SP0;
\n
"
,
plot_file
);
fclose
(
plot_file
);
fclose
(
plot_file
);
return
TRUE
;
return
TRUE
;
}
}
/************************************************************/
/************************************************************/
void
PlotCircle_HPGL
(
wxPoint
centre
,
int
diameter
,
int
width
)
void
PlotCircle_HPGL
(
wxPoint
centre
,
int
diameter
,
int
width
)
/************************************************************/
/************************************************************/
{
{
int
rayon
;
int
rayon
;
char
Line
[
256
];
char
Line
[
256
];
UserToDeviceCoordinate
(
centre
);
UserToDeviceCoordinate
(
centre
);
rayon
=
(
int
)
(
diameter
/
2
*
XScale
);
rayon
=
(
int
)
(
diameter
/
2
*
XScale
);
if
(
rayon
<
0
)
rayon
=
0
;
if
(
rayon
<
0
)
rayon
=
0
;
Plume_HPGL
(
'U'
);
Plume_HPGL
(
'U'
);
sprintf
(
Line
,
"PA %d,%d;CI %d,%d;
\n
"
,
centre
.
x
,
centre
.
y
,
rayon
,
CHORD_ANGLE
);
sprintf
(
Line
,
"PA %d,%d;CI %d,%d;
\n
"
,
centre
.
x
,
centre
.
y
,
rayon
,
CHORD_ANGLE
);
fputs
(
Line
,
PlotOutputFile
)
;
fputs
(
Line
,
PlotOutputFile
)
;
Plume_HPGL
(
'U'
);
return
;
Plume_HPGL
(
'U'
);
return
;
}
}
/********************************************************************/
/********************************************************************/
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
)
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
)
/********************************************************************/
/********************************************************************/
/* trace d'un arc de cercle:
/* trace d'un arc de cercle:
centre = coord du centre
*
centre = coord du centre
StAngle, EndAngle = angle de debut et fin
*
StAngle, EndAngle = angle de debut et fin
rayon = rayon de l'arc
*
rayon = rayon de l'arc
commande
*
commande
PU;PA x,y;PD;AA start_arc_X, start_arc_Y, angle, NbSegm; PU;
*
PU;PA x,y;PD;AA start_arc_X, start_arc_Y, angle, NbSegm; PU;
ou PU;PA x,y;PD;AA start_arc_X, start_arc_Y, angle; PU;
*
ou PU;PA x,y;PD;AA start_arc_X, start_arc_Y, angle; PU;
*/
*/
{
{
char
Line
[
256
];
char
Line
[
256
];
wxPoint
cmap
;
/* point de depart */
wxPoint
cmap
;
/* point de depart */
wxPoint
cpos
;
/* centre */
wxPoint
cpos
;
/* centre */
float
angle
;
/* angle de l'arc*/
float
angle
;
/* angle de l'arc*/
if
(
rayon
<=
0
)
return
;
if
(
rayon
<=
0
)
return
;
cpos
=
centre
;
UserToDeviceCoordinate
(
cpos
);
cpos
=
centre
;
UserToDeviceCoordinate
(
cpos
);
if
(
PlotOrientOptions
==
PLOT_MIROIR
)
if
(
PlotOrientOptions
==
PLOT_MIROIR
)
{
{
EndAngle
=
-
EndAngle
;
EndAngle
=
-
EndAngle
;
StAngle
=
-
StAngle
;
StAngle
=
-
StAngle
;
EXCHG
(
StAngle
,
EndAngle
);
EXCHG
(
StAngle
,
EndAngle
);
}
}
angle
=
(
EndAngle
-
StAngle
)
/
10.0
;
angle
=
(
EndAngle
-
StAngle
)
/
10.0
;
/* Calcul des coord du point de depart : */
/* Calcul des coord du point de depart : */
cmap
.
x
=
(
int
)(
centre
.
x
+
(
rayon
*
cos
(
StAngle
*
M_PI
/
1800
)
)
);
cmap
.
x
=
(
int
)
(
centre
.
x
+
(
rayon
*
cos
(
StAngle
*
M_PI
/
1800
)
)
);
cmap
.
y
=
(
int
)(
centre
.
y
+
(
rayon
*
sin
(
StAngle
*
M_PI
/
1800
)
)
);
cmap
.
y
=
(
int
)
(
centre
.
y
+
(
rayon
*
sin
(
StAngle
*
M_PI
/
1800
)
)
);
UserToDeviceCoordinate
(
cmap
);
UserToDeviceCoordinate
(
cmap
);
Plume_HPGL
(
'U'
);
Plume_HPGL
(
'U'
);
sprintf
(
Line
,
"PU;PA %d,%d;PD;AA %d,%d, "
,
cmap
.
x
,
cmap
.
y
,
cpos
.
x
,
cpos
.
y
);
sprintf
(
Line
,
"PU;PA %d,%d;PD;AA %d,%d, "
,
cmap
.
x
,
cmap
.
y
,
cpos
.
x
,
cpos
.
y
);
fputs
(
Line
,
PlotOutputFile
)
;
fputs
(
Line
,
PlotOutputFile
)
;
sprintf
(
Line
,
"%f"
,
-
angle
);
to_point
(
Line
);
// Transforme , et . du separateur
sprintf
(
Line
,
"%f"
,
-
angle
);
to_point
(
Line
);
// Transforme , et . du separateur
fputs
(
Line
,
PlotOutputFile
)
;
fputs
(
Line
,
PlotOutputFile
)
;
sprintf
(
Line
,
", %d"
,
CHORD_ANGLE
);
fputs
(
Line
,
PlotOutputFile
)
;
sprintf
(
Line
,
", %d"
,
CHORD_ANGLE
);
fputs
(
Line
,
PlotOutputFile
)
;
sprintf
(
Line
,
";PU;
\n
"
);
fputs
(
Line
,
PlotOutputFile
)
;
sprintf
(
Line
,
";PU;
\n
"
);
fputs
(
Line
,
PlotOutputFile
)
;
Plume_HPGL
(
'U'
);
Plume_HPGL
(
'U'
);
}
}
/*****************************************************/
/*****************************************************/
void
PlotPolyHPGL
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
)
void
PlotPolyHPGL
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
)
/*****************************************************/
/*****************************************************/
/* Trace un polygone (ferme si rempli) en format HPGL
/* Trace un polygone (ferme si rempli) en format HPGL
coord = tableau des coord des sommets
*
coord = tableau des coord des sommets
nb = nombre de coord ( 1 coord = 2 elements: X et Y du tableau )
*
nb = nombre de coord ( 1 coord = 2 elements: X et Y du tableau )
fill : si != 0 polygone rempli
*
fill : si != 0 polygone rempli
*/
*/
{
{
int
ii
;
int
ii
;
if
(
nb
<=
1
)
return
;
Move_Plume_HPGL
(
wxPoint
(
coord
[
0
],
coord
[
1
]),
'U'
);
if
(
nb
<=
1
)
for
(
ii
=
1
;
ii
<
nb
;
ii
++
)
return
;
Move_Plume_HPGL
(
wxPoint
(
coord
[
0
],
coord
[
1
]
),
'U'
);
for
(
ii
=
1
;
ii
<
nb
;
ii
++
)
{
{
Move_Plume_HPGL
(
wxPoint
(
coord
[
ii
*
2
],
coord
[(
ii
*
2
)
+
1
]),
'D'
);
Move_Plume_HPGL
(
wxPoint
(
coord
[
ii
*
2
],
coord
[(
ii
*
2
)
+
1
]
),
'D'
);
}
}
/* Fermeture eventuelle du polygone */
/* Fermeture eventuelle du polygone */
if
(
fill
)
if
(
fill
)
{
{
ii
=
(
nb
-
1
)
*
2
;
ii
=
(
nb
-
1
)
*
2
;
if
(
(
coord
[
ii
]
!=
coord
[
0
]
)
||
(
coord
[
ii
+
1
]
!=
coord
[
0
])
)
if
(
(
coord
[
ii
]
!=
coord
[
0
]
)
||
(
coord
[
ii
+
1
]
!=
coord
[
0
])
)
Move_Plume_HPGL
(
wxPoint
(
coord
[
0
],
coord
[
1
]),
'D'
);
Move_Plume_HPGL
(
wxPoint
(
coord
[
0
],
coord
[
1
]
),
'D'
);
}
}
Plume_HPGL
(
'U'
);
Plume_HPGL
(
'U'
);
}
}
/**********************************************/
/**********************************************/
void
Move_Plume_HPGL
(
wxPoint
pos
,
int
plume
)
void
Move_Plume_HPGL
(
wxPoint
pos
,
int
plume
)
/**********************************************/
/**********************************************/
/*
/*
deplace la plume levee (plume = 'U') ou baissee (plume = 'D')
*
deplace la plume levee (plume = 'U') ou baissee (plume = 'D')
en position x,y
*
en position x,y
Unites en Unites DESSIN
*
Unites en Unites DESSIN
Si plume = 'Z' lever de plume sans deplacement
*
Si plume = 'Z' lever de plume sans deplacement
*/
*/
{
{
char
Line
[
256
];
char
Line
[
256
];
if
(
plume
==
'Z'
)
if
(
plume
==
'Z'
)
{
{
Plume_HPGL
(
'U'
);
Plume_HPGL
(
'U'
);
return
;
return
;
}
}
Plume_HPGL
(
plume
);
Plume_HPGL
(
plume
);
UserToDeviceCoordinate
(
pos
);
UserToDeviceCoordinate
(
pos
);
sprintf
(
Line
,
"PA %d,%d;
\n
"
,
pos
.
x
,
pos
.
y
)
;
fputs
(
Line
,
PlotOutputFile
)
;
sprintf
(
Line
,
"PA %d,%d;
\n
"
,
pos
.
x
,
pos
.
y
);
fputs
(
Line
,
PlotOutputFile
)
;
}
}
/***************************/
/***************************/
void
Plume_HPGL
(
int
plume
)
void
Plume_HPGL
(
int
plume
)
/***************************/
/***************************/
/* leve (plume = 'U') ou baisse (plume = 'D') la plume
/* leve (plume = 'U') ou baisse (plume = 'D') la plume
*/
*/
{
{
if
(
plume
==
'U'
)
if
(
plume
==
'U'
)
{
{
if
(
etat_plume
!=
'U'
)
fputs
(
"PU;"
,
PlotOutputFile
)
;
if
(
etat_plume
!=
'U'
)
fputs
(
"PU;"
,
PlotOutputFile
);
etat_plume
=
'U'
;
etat_plume
=
'U'
;
}
}
else
else
{
{
if
(
etat_plume
!=
'D'
)
fputs
(
"PD;"
,
PlotOutputFile
)
;
if
(
etat_plume
!=
'D'
)
fputs
(
"PD;"
,
PlotOutputFile
);
etat_plume
=
'D'
;
etat_plume
=
'D'
;
}
}
}
}
common/common_plotPS_functions.cpp
View file @
2da432b2
This diff is collapsed.
Click to expand it.
common/common_plot_functions.cpp
View file @
2da432b2
This diff is collapsed.
Click to expand it.
common/drawtxt.cpp
View file @
2da432b2
...
@@ -326,7 +326,7 @@ void PlotGraphicText( int format_plot, const wxPoint& Pos, int gcolor,
...
@@ -326,7 +326,7 @@ void PlotGraphicText( int format_plot, const wxPoint& Pos, int gcolor,
return
;
return
;
}
}
if
(
(
gcolor
>=
0
)
&&
(
format_plot
==
PLOT_FORMAT_POST
)
)
if
(
gcolor
>=
0
&&
IsPostScript
(
format_plot
)
)
SetColorMapPS
(
gcolor
);
SetColorMapPS
(
gcolor
);
size_h
=
Size
.
x
;
size_h
=
Size
.
x
;
...
...
eeschema/eestring.cpp
View file @
2da432b2
This diff is collapsed.
Click to expand it.
eeschema/plot.cpp
View file @
2da432b2
...
@@ -54,7 +54,6 @@ void Move_Plume( wxPoint pos, int plume )
...
@@ -54,7 +54,6 @@ void Move_Plume( wxPoint pos, int plume )
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST_A4
:
LineTo_PS
(
pos
,
plume
);
LineTo_PS
(
pos
,
plume
);
break
;
break
;
}
}
...
@@ -69,7 +68,6 @@ void SetCurrentLineWidth( int width )
...
@@ -69,7 +68,6 @@ void SetCurrentLineWidth( int width )
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST_A4
:
SetCurrentLineWidthPS
(
width
);
SetCurrentLineWidthPS
(
width
);
break
;
break
;
}
}
...
...
include/plot_common.h
View file @
2da432b2
/********************/
/********************/
/* plot_common.h */
/* plot_common.h */
/********************/
/********************/
#ifndef PLOT_COMMON_H
#ifndef PLOT_COMMON_H
#define PLOT_COMMON_H
#define PLOT_COMMON_H
...
@@ -12,12 +12,22 @@
...
@@ -12,12 +12,22 @@
#endif
#endif
typedef
enum
{
/**
* Enum PlotFormat
* must be kept in order of the radio buttons in the plot panel/window.
*/
enum
PlotFormat
{
PLOT_FORMAT_HPGL
,
PLOT_FORMAT_HPGL
,
PLOT_FORMAT_POST
,
PLOT_FORMAT_GERBER
,
PLOT_FORMAT_GERBER
,
PLOT_FORMAT_POST_A4
PLOT_FORMAT_POST
,
}
PlotFormat
;
};
static
inline
bool
IsPostScript
(
int
aFormat
)
{
return
aFormat
==
PLOT_FORMAT_POST
;
}
const
int
PLOT_MIROIR
=
1
;
const
int
PLOT_MIROIR
=
1
;
...
@@ -25,47 +35,59 @@ const int PLOT_MIROIR = 1;
...
@@ -25,47 +35,59 @@ const int PLOT_MIROIR = 1;
/*******************************/
/*******************************/
/* common_plot_functions.cpp */
/* common_plot_functions.cpp */
/*******************************/
/*******************************/
void
SetPlotScale
(
double
xscale
,
double
yscale
);
// Set the plot scale for the current plotting)
void
SetPlotScale
(
double
xscale
,
double
yscale
);
// Set the plot scale for the current plotting)
void
SetPlotOffset
(
wxPoint
offset
);
// Set the plot offset for the current plotting)
void
SetPlotOffset
(
wxPoint
offset
);
// Set the plot offset for the current plotting)
void
InitPlotParametresGERBER
(
wxPoint
offset
,
double
xscale
,
double
yscale
);
void
InitPlotParametresGERBER
(
wxPoint
offset
,
double
xscale
,
double
yscale
);
void
PlotWorkSheet
(
int
format_plot
,
BASE_SCREEN
*
screen
);
void
PlotWorkSheet
(
int
format_plot
,
BASE_SCREEN
*
screen
);
void
UserToDeviceCoordinate
(
wxPoint
&
pos
);
void
UserToDeviceCoordinate
(
wxPoint
&
pos
);
// modifie les coord pos.x et pos.y pour le trace selon l'orientation, l'echelle, les offsets de trace
void
UserToDeviceSize
(
wxSize
&
size
);
// modifie les coord pos.x et pos.y pour le trace selon l'orientation, l'echelle, les offsets de trace
// modifie les dimension size.x et size.y pour le trace selon l'echelle
void
UserToDeviceSize
(
wxSize
&
size
);
// modifie les dimension size.x et size.y pour le trace selon l'echelle
void
ForcePenReinit
();
void
ForcePenReinit
();
// set the flag g_CurrentPenWidth to -1 in order
// to force a pen width redefinition for the next draw command
// set the flag g_CurrentPenWidth to -1 in order
// to force a pen width redefinition for the next draw command
/*******************************/
/*******************************/
/* common_plotPS_functions.cpp */
/* common_plotPS_functions.cpp */
/*******************************/
/*******************************/
void
SetCurrentLineWidthPS
(
int
width
);
void
SetCurrentLineWidthPS
(
int
width
);
void
InitPlotParametresPS
(
wxPoint
offset
,
Ki_PageDescr
*
sheet
,
double
xscale
,
double
yscale
,
int
orient
=
0
);
void
InitPlotParametresPS
(
wxPoint
offset
,
void
SetDefaultLineWidthPS
(
int
width
);
Ki_PageDescr
*
sheet
,
void
PlotCircle_PS
(
wxPoint
pos
,
int
diametre
,
int
width
=
-
1
);
double
xscale
,
void
PlotArcPS
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
double
yscale
,
// Plot an arc: StAngle, EndAngle = start and end arc in 0.1 degree
int
orient
=
0
);
void
PlotPolyPS
(
int
nb_segm
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
SetDefaultLineWidthPS
(
int
width
);
void
PlotFilledSegmentPS
(
wxPoint
start
,
wxPoint
end
,
int
width
);
void
PlotCircle_PS
(
wxPoint
pos
,
int
diametre
,
int
width
=
-
1
);
void
LineTo_PS
(
wxPoint
pos
,
int
plume
);
void
PlotArcPS
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
void
PrintHeaderPS
(
FILE
*
file
,
const
wxString
&
Creator
,
const
wxString
&
FileName
,
int
PageCount
,
int
BBox
[
4
],
int
PaperOrientation
);
bool
CloseFilePS
(
FILE
*
plot_file
);
// Plot an arc: StAngle, EndAngle = start and end arc in 0.1 degree
void
SetColorMapPS
(
int
color
);
void
PlotPolyPS
(
int
nb_segm
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
PlotFilledSegmentPS
(
wxPoint
start
,
wxPoint
end
,
int
width
);
void
LineTo_PS
(
wxPoint
pos
,
int
plume
);
void
PrintHeaderPS
(
FILE
*
file
,
const
wxString
&
Creator
,
const
wxString
&
FileName
,
int
PageCount
,
int
BBox
[
4
],
int
PaperOrientation
);
bool
CloseFilePS
(
FILE
*
plot_file
);
void
SetColorMapPS
(
int
color
);
/*********************************/
/*********************************/
/* common_plotHPGL_functions.cpp */
/* common_plotHPGL_functions.cpp */
/*********************************/
/*********************************/
void
InitPlotParametresHPGL
(
wxPoint
offset
,
double
xscale
,
double
yscale
,
int
orient
=
0
);
void
InitPlotParametresHPGL
(
wxPoint
offset
,
double
xscale
,
double
yscale
,
int
orient
=
0
);
bool
PrintHeaderHPGL
(
FILE
*
plot_file
,
int
pen_speed
,
int
pen_num
);
bool
PrintHeaderHPGL
(
FILE
*
plot_file
,
int
pen_speed
,
int
pen_num
);
bool
CloseFileHPGL
(
FILE
*
plot_file
);
bool
CloseFileHPGL
(
FILE
*
plot_file
);
void
PlotCircle_HPGL
(
wxPoint
centre
,
int
diameter
,
int
width
=
-
1
);
void
PlotCircle_HPGL
(
wxPoint
centre
,
int
diameter
,
int
width
=
-
1
);
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
void
PlotPolyHPGL
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
PlotPolyHPGL
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
Move_Plume_HPGL
(
wxPoint
pos
,
int
plume
);
void
Move_Plume_HPGL
(
wxPoint
pos
,
int
plume
);
void
Plume_HPGL
(
int
plume
);
void
Plume_HPGL
(
int
plume
);
#endif // PLOT_COMMON_H
#endif // PLOT_COMMON_H
include/wxPcbStruct.h
View file @
2da432b2
...
@@ -258,7 +258,7 @@ public:
...
@@ -258,7 +258,7 @@ public:
void
Genere_GERBER
(
const
wxString
&
FullFileName
,
int
Layer
,
void
Genere_GERBER
(
const
wxString
&
FullFileName
,
int
Layer
,
bool
PlotOriginIsAuxAxis
);
bool
PlotOriginIsAuxAxis
);
void
Genere_HPGL
(
const
wxString
&
FullFileName
,
int
Layer
);
void
Genere_HPGL
(
const
wxString
&
FullFileName
,
int
Layer
);
void
Genere_PS
(
const
wxString
&
FullFileName
,
int
Layer
);
void
Genere_PS
(
const
wxString
&
FullFileName
,
int
Layer
,
bool
useA4
);
void
Plot_Layer_HPGL
(
FILE
*
File
,
int
masque_layer
,
void
Plot_Layer_HPGL
(
FILE
*
File
,
int
masque_layer
,
int
garde
,
int
tracevia
,
int
modetrace
);
int
garde
,
int
tracevia
,
int
modetrace
);
void
Plot_Layer_GERBER
(
FILE
*
File
,
int
masque_layer
,
void
Plot_Layer_GERBER
(
FILE
*
File
,
int
masque_layer
,
...
...
pcbnew/gen_drill_report_files.cpp
View file @
2da432b2
...
@@ -158,7 +158,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w
...
@@ -158,7 +158,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w
TextWidth
=
50
;
// Set Drill Symbols width in 1/10000 mils
TextWidth
=
50
;
// Set Drill Symbols width in 1/10000 mils
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
{
{
sprintf
(
line
,
"%d setlinewidth
\n
"
,
TextWidth
);
sprintf
(
line
,
"%d setlinewidth
\n
"
,
TextWidth
);
fputs
(
line
,
aFile
);
fputs
(
line
,
aFile
);
...
@@ -429,7 +429,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -429,7 +429,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
x0
=
position
.
x
;
y0
=
position
.
y
;
x0
=
position
.
x
;
y0
=
position
.
y
;
FctPlume
=
Move_Plume_HPGL
;
FctPlume
=
Move_Plume_HPGL
;
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
FctPlume
=
LineTo_PS
;
FctPlume
=
LineTo_PS
;
switch
(
aShapeId
)
switch
(
aShapeId
)
...
@@ -444,7 +444,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -444,7 +444,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
case
1
:
/* Cercle */
case
1
:
/* Cercle */
if
(
format
==
PLOT_FORMAT_HPGL
)
if
(
format
==
PLOT_FORMAT_HPGL
)
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
break
;
break
;
...
@@ -462,7 +462,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -462,7 +462,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
FctPlume
(
wxPoint
(
x0
-
rayon
,
y0
+
rayon
),
'D'
);
FctPlume
(
wxPoint
(
x0
-
rayon
,
y0
+
rayon
),
'D'
);
if
(
format
==
PLOT_FORMAT_HPGL
)
if
(
format
==
PLOT_FORMAT_HPGL
)
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
break
;
break
;
...
@@ -471,7 +471,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -471,7 +471,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
FctPlume
(
wxPoint
(
x0
+
rayon
,
y0
),
'D'
);
FctPlume
(
wxPoint
(
x0
+
rayon
,
y0
),
'D'
);
if
(
format
==
PLOT_FORMAT_HPGL
)
if
(
format
==
PLOT_FORMAT_HPGL
)
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
break
;
break
;
...
@@ -480,7 +480,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -480,7 +480,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
FctPlume
(
wxPoint
(
x0
,
y0
+
rayon
),
'D'
);
FctPlume
(
wxPoint
(
x0
,
y0
+
rayon
),
'D'
);
if
(
format
==
PLOT_FORMAT_HPGL
)
if
(
format
==
PLOT_FORMAT_HPGL
)
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
break
;
break
;
...
@@ -489,7 +489,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -489,7 +489,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
0
,
0
),
0
,
FILAIRE
);
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
0
,
0
),
0
,
FILAIRE
);
FILAIRE
);
...
@@ -500,7 +500,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -500,7 +500,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
...
@@ -515,7 +515,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -515,7 +515,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
0
,
0
),
0
,
FILAIRE
);
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
0
,
0
),
0
,
FILAIRE
);
FILAIRE
);
...
@@ -530,7 +530,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -530,7 +530,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
...
@@ -543,7 +543,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -543,7 +543,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
0
,
0
),
0
,
FILAIRE
);
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
0
,
0
),
0
,
FILAIRE
);
FILAIRE
);
...
@@ -556,7 +556,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -556,7 +556,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
...
@@ -569,7 +569,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -569,7 +569,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_HPGL
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
trace_1_pad_TRAPEZE_POST
(
wxPoint
(
x0
,
y0
),
wxSize
(
rayon
,
rayon
),
wxSize
(
0
,
0
),
450
,
0
),
450
,
FILAIRE
);
FILAIRE
);
...
@@ -578,7 +578,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
...
@@ -578,7 +578,7 @@ void PlotDrillSymbol( const wxPoint& position, int diametre, int aShapeId, int f
default
:
default
:
if
(
format
==
PLOT_FORMAT_HPGL
)
if
(
format
==
PLOT_FORMAT_HPGL
)
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_HPGL
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
if
(
format
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format
)
)
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
trace_1_pastille_RONDE_POST
(
wxPoint
(
x0
,
y0
),
diametre
,
FILAIRE
);
break
;
break
;
}
}
...
...
pcbnew/gendrill.cpp
View file @
2da432b2
pcbnew/pcbplot.cpp
View file @
2da432b2
...
@@ -90,7 +90,29 @@ public:
...
@@ -90,7 +90,29 @@ public:
WinEDA_ValueCtrl
*
m_HPGLPenOverlayOpt
;
WinEDA_ValueCtrl
*
m_HPGLPenOverlayOpt
;
WinEDA_DFloatValueCtrl
*
m_FineAdjustXscaleOpt
,
*
m_FineAdjustYscaleOpt
;
WinEDA_DFloatValueCtrl
*
m_FineAdjustXscaleOpt
,
*
m_FineAdjustYscaleOpt
;
double
m_XScaleAdjust
,
m_YScaleAdjust
;
double
m_XScaleAdjust
,
m_YScaleAdjust
;
int
m_PlotFormat
;
bool
useA4
()
{
return
m_PlotFormatOpt
->
GetSelection
()
==
3
;
}
/**
* Function getFormat
* returns one of the values from the PlotFormat enum. If the 4th
* radio button is selected, map this back to postscript.
*/
PlotFormat
getFormat
()
{
int
radioNdx
=
m_PlotFormatOpt
->
GetSelection
();
// change the A4 to the simple postscript, according to the PlotFormat enum
if
(
radioNdx
==
3
)
radioNdx
=
2
;
return
PlotFormat
(
radioNdx
);
}
public
:
public
:
WinEDA_PlotFrame
(
WinEDA_BasePcbFrame
*
parent
);
WinEDA_PlotFrame
(
WinEDA_BasePcbFrame
*
parent
);
...
@@ -137,7 +159,6 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
...
@@ -137,7 +159,6 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
SetFont
(
*
g_DialogFont
);
SetFont
(
*
g_DialogFont
);
Centre
();
Centre
();
m_PlotFormat
=
format_plot
;
m_Plot_Sheet_Ref
=
NULL
;
m_Plot_Sheet_Ref
=
NULL
;
wxBoxSizer
*
MainBoxSizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
wxBoxSizer
*
MainBoxSizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
...
@@ -169,32 +190,15 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
...
@@ -169,32 +190,15 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
4
,
fmtmsg
,
1
,
wxRA_SPECIFY_COLS
);
4
,
fmtmsg
,
1
,
wxRA_SPECIFY_COLS
);
MidRightBoxSizer
->
Add
(
m_PlotFormatOpt
,
0
,
wxGROW
|
wxALL
,
5
);
MidRightBoxSizer
->
Add
(
m_PlotFormatOpt
,
0
,
wxGROW
|
wxALL
,
5
);
if
(
config
&&
config
->
Read
(
OPTKEY_OUTPUT_FORMAT
,
&
m_PlotFormat
)
)
int
myFormatIndex
=
format_plot
;
m_PlotFormatOpt
->
SetSelection
(
m_PlotFormat
);
else
if
(
config
)
{
switch
(
m_PlotFormat
)
{
{
case
PLOT_FORMAT_HPGL
:
config
->
Read
(
OPTKEY_OUTPUT_FORMAT
,
&
myFormatIndex
);
m_PlotFormatOpt
->
SetSelection
(
0
);
}
break
;
case
PLOT_FORMAT_GERBER
:
m_PlotFormatOpt
->
SetSelection
(
myFormatIndex
);
m_PlotFormatOpt
->
SetSelection
(
1
);
break
;
default
:
// ( PLOT_FORMAT_POST or PLOT_FORMAT_POST_A4 )
// As m_PlotFormat is never set to a value of PLOT_FORMAT_POST_A4,
// use the value of g_ForcePlotPS_On_A4 to determine whether the
// "Postscript" or "Postscipt A4" radiobutton had been selected
// previously (and thus which button should be reselected now).
if
(
g_ForcePlotPS_On_A4
)
m_PlotFormatOpt
->
SetSelection
(
3
);
else
m_PlotFormatOpt
->
SetSelection
(
2
);
break
;
}
}
// Creation des menus d'option du format GERBER
// Creation des menus d'option du format GERBER
m_GerbSpotSizeMinOpt
=
new
WinEDA_ValueCtrl
(
this
,
_
(
"Spot min"
),
m_GerbSpotSizeMinOpt
=
new
WinEDA_ValueCtrl
(
this
,
_
(
"Spot min"
),
...
@@ -490,18 +494,10 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
...
@@ -490,18 +494,10 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
/* active ou dsactive les diffrents menus d'option selon le standard choisi
/* active ou dsactive les diffrents menus d'option selon le standard choisi
*/
*/
{
{
int
format
;
int
format
=
getFormat
();
static
const
int
format_list
[]
=
{
PLOT_FORMAT_HPGL
,
PLOT_FORMAT_GERBER
,
PLOT_FORMAT_POST
,
PLOT_FORMAT_POST_A4
};
format
=
format_list
[
m_PlotFormatOpt
->
GetSelection
()];
switch
(
format
)
switch
(
format
)
{
{
case
PLOT_FORMAT_POST_A4
:
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
default
:
default
:
m_Drill_Shape_Opt
->
Enable
(
true
);
m_Drill_Shape_Opt
->
Enable
(
true
);
...
@@ -519,8 +515,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
...
@@ -519,8 +515,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_Scale_Opt
->
Enable
(
true
);
m_Scale_Opt
->
Enable
(
true
);
m_FineAdjustXscaleOpt
->
Enable
(
true
);
m_FineAdjustXscaleOpt
->
Enable
(
true
);
m_FineAdjustYscaleOpt
->
Enable
(
true
);
m_FineAdjustYscaleOpt
->
Enable
(
true
);
m_PlotFormat
=
PLOT_FORMAT_POST
;
g_ForcePlotPS_On_A4
=
(
format
==
PLOT_FORMAT_POST_A4
);
m_Plot_PS_Negative
->
Enable
(
true
);
m_Plot_PS_Negative
->
Enable
(
true
);
break
;
break
;
...
@@ -540,7 +534,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
...
@@ -540,7 +534,6 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_Scale_Opt
->
Enable
(
false
);
m_Scale_Opt
->
Enable
(
false
);
m_FineAdjustXscaleOpt
->
Enable
(
false
);
m_FineAdjustXscaleOpt
->
Enable
(
false
);
m_FineAdjustYscaleOpt
->
Enable
(
false
);
m_FineAdjustYscaleOpt
->
Enable
(
false
);
m_PlotFormat
=
PLOT_FORMAT_GERBER
;
m_Plot_PS_Negative
->
Enable
(
false
);
m_Plot_PS_Negative
->
Enable
(
false
);
break
;
break
;
...
@@ -560,12 +553,11 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
...
@@ -560,12 +553,11 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_Scale_Opt
->
Enable
(
true
);
m_Scale_Opt
->
Enable
(
true
);
m_FineAdjustXscaleOpt
->
Enable
(
false
);
m_FineAdjustXscaleOpt
->
Enable
(
false
);
m_FineAdjustYscaleOpt
->
Enable
(
false
);
m_FineAdjustYscaleOpt
->
Enable
(
false
);
m_PlotFormat
=
PLOT_FORMAT_HPGL
;
m_Plot_PS_Negative
->
Enable
(
false
);
m_Plot_PS_Negative
->
Enable
(
false
);
break
;
break
;
}
}
format_plot
=
m_PlotF
ormat
;
format_plot
=
f
ormat
;
}
}
...
@@ -616,8 +608,8 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
...
@@ -616,8 +608,8 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
config
->
Write
(
OPTKEY_PADS_ON_SILKSCREEN
,
PlotPadsOnSilkLayer
);
config
->
Write
(
OPTKEY_PADS_ON_SILKSCREEN
,
PlotPadsOnSilkLayer
);
config
->
Write
(
OPTKEY_ALWAYS_PRINT_PADS
,
Plot_Pads_All_Layers
);
config
->
Write
(
OPTKEY_ALWAYS_PRINT_PADS
,
Plot_Pads_All_Layers
);
m_PlotFormat
=
m_PlotFormatOpt
->
GetSelection
();
int
formatNdx
=
m_PlotFormatOpt
->
GetSelection
();
config
->
Write
(
OPTKEY_OUTPUT_FORMAT
,
m_PlotFormat
);
config
->
Write
(
OPTKEY_OUTPUT_FORMAT
,
formatNdx
);
wxString
layerKey
;
wxString
layerKey
;
for
(
int
layer
=
0
;
layer
<
NB_LAYERS
;
++
layer
)
for
(
int
layer
=
0
;
layer
<
NB_LAYERS
;
++
layer
)
...
@@ -668,12 +660,15 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
...
@@ -668,12 +660,15 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
BaseFileName
=
m_Parent
->
GetScreen
()
->
m_FileName
;
BaseFileName
=
m_Parent
->
GetScreen
()
->
m_FileName
;
ChangeFileNameExt
(
BaseFileName
,
wxT
(
"-"
)
);
ChangeFileNameExt
(
BaseFileName
,
wxT
(
"-"
)
);
switch
(
m_PlotFormat
)
int
format
=
getFormat
();
switch
(
format
)
{
{
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
ext
=
wxT
(
".ps"
);
ext
=
wxT
(
".ps"
);
break
;
break
;
default
:
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
ext
=
wxT
(
".pho"
);
ext
=
wxT
(
".pho"
);
break
;
break
;
...
@@ -695,12 +690,13 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
...
@@ -695,12 +690,13 @@ void WinEDA_PlotFrame::Plot( wxCommandEvent& event )
// Calcul du nom du fichier
// Calcul du nom du fichier
FullFileName
=
BaseFileName
+
board
->
GetLayerName
(
layer_to_plot
)
+
ext
;
FullFileName
=
BaseFileName
+
board
->
GetLayerName
(
layer_to_plot
)
+
ext
;
switch
(
m_PlotF
ormat
)
switch
(
f
ormat
)
{
{
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
m_Parent
->
Genere_PS
(
FullFileName
,
layer_to_plot
);
m_Parent
->
Genere_PS
(
FullFileName
,
layer_to_plot
,
useA4
()
);
break
;
break
;
default
:
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
m_Parent
->
Genere_GERBER
(
FullFileName
,
layer_to_plot
,
s_PlotOriginIsAuxAxis
);
m_Parent
->
Genere_GERBER
(
FullFileName
,
layer_to_plot
,
s_PlotOriginIsAuxAxis
);
break
;
break
;
...
...
pcbnew/pcbplot.h
View file @
2da432b2
...
@@ -102,7 +102,6 @@ eda_global int g_PlotScaleOpt // 0 = automatique, >=1 echelle specifiee
...
@@ -102,7 +102,6 @@ eda_global int g_PlotScaleOpt // 0 = automatique, >=1 echelle specifiee
=
1
=
1
#endif
#endif
;
;
eda_global
bool
g_ForcePlotPS_On_A4
;
// Force la selection de la feuille A4 pour le plot POSTSCRIPT
eda_global
int
g_DrillShapeOpt
eda_global
int
g_DrillShapeOpt
#ifdef MAIN
#ifdef MAIN
...
...
pcbnew/plot_rtn.cpp
View file @
2da432b2
...
@@ -33,7 +33,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -33,7 +33,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
wxPoint
pos
,
shape_pos
;
wxPoint
pos
,
shape_pos
;
wxSize
size
;
wxSize
size
;
bool
trace_val
,
trace_ref
;
bool
trace_val
,
trace_ref
;
MODULE
*
Module
;
D_PAD
*
pt_pad
;
D_PAD
*
pt_pad
;
TEXTE_MODULE
*
pt_texte
;
TEXTE_MODULE
*
pt_texte
;
EDA_BaseStruct
*
PtStruct
;
EDA_BaseStruct
*
PtStruct
;
...
@@ -87,8 +86,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -87,8 +86,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
{
{
nb_items
=
0
;
nb_items
=
0
;
Affiche_1_Parametre
(
this
,
56
,
wxT
(
"Pads"
),
wxEmptyString
,
GREEN
);
Affiche_1_Parametre
(
this
,
56
,
wxT
(
"Pads"
),
wxEmptyString
,
GREEN
);
Module
=
m_Pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Pnext
)
for
(
MODULE
*
Module
=
m_Pcb
->
m_Modules
;
Module
;
Module
=
Module
->
Next
()
)
{
{
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
...
@@ -121,7 +120,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -121,7 +120,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
trace_1_pastille_RONDE_POST
(
pos
,
size
.
x
,
FILAIRE
);
trace_1_pastille_RONDE_POST
(
pos
,
size
.
x
,
FILAIRE
);
break
;
break
;
}
}
break
;
break
;
case
PAD_OVAL
:
case
PAD_OVAL
:
...
@@ -144,7 +142,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -144,7 +142,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
pt_pad
->
m_Orient
,
FILAIRE
);
pt_pad
->
m_Orient
,
FILAIRE
);
break
;
break
;
}
}
break
;
break
;
case
PAD_TRAPEZOID
:
case
PAD_TRAPEZOID
:
...
@@ -172,7 +169,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -172,7 +169,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
FILAIRE
);
FILAIRE
);
break
;
break
;
}
}
break
;
break
;
}
}
...
@@ -196,7 +192,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -196,7 +192,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
(
int
)
pt_pad
->
m_Orient
,
FILAIRE
);
(
int
)
pt_pad
->
m_Orient
,
FILAIRE
);
break
;
break
;
}
}
break
;
break
;
}
}
...
@@ -209,8 +204,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -209,8 +204,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
/* Trace Textes MODULES */
/* Trace Textes MODULES */
nb_items
=
0
;
Affiche_1_Parametre
(
this
,
64
,
wxT
(
"TxtMod"
),
wxEmptyString
,
LIGHTBLUE
);
nb_items
=
0
;
Affiche_1_Parametre
(
this
,
64
,
wxT
(
"TxtMod"
),
wxEmptyString
,
LIGHTBLUE
);
Module
=
m_Pcb
->
m_Modules
;
for
(
MODULE
*
Module
=
m_Pcb
->
m_Modules
;
Module
;
Module
=
Module
->
Next
()
)
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Pnext
)
{
{
/* Analyse des autorisations de trace pour les textes VALEUR et REF */
/* Analyse des autorisations de trace pour les textes VALEUR et REF */
trace_val
=
Sel_Texte_Valeur
;
trace_val
=
Sel_Texte_Valeur
;
...
@@ -831,7 +825,7 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
...
@@ -831,7 +825,7 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
if
(
Plot_Mode
==
FILAIRE
)
if
(
Plot_Mode
==
FILAIRE
)
epaisseur
=
g_PlotLine_Width
;
epaisseur
=
g_PlotLine_Width
;
if
(
format_plot
==
PLOT_FORMAT_POST
)
if
(
IsPostScript
(
format_plot
)
)
{
{
PlotArcPS
(
centre
,
start_angle
,
end_angle
,
rayon
,
epaisseur
);
PlotArcPS
(
centre
,
start_angle
,
end_angle
,
rayon
,
epaisseur
);
return
;
return
;
...
...
pcbnew/plotgerb.cpp
View file @
2da432b2
This diff is collapsed.
Click to expand it.
pcbnew/plotps.cpp
View file @
2da432b2
...
@@ -25,7 +25,7 @@ const int DRILL_MARK = 1;
...
@@ -25,7 +25,7 @@ const int DRILL_MARK = 1;
/****************************************************************************/
/****************************************************************************/
void
WinEDA_BasePcbFrame
::
Genere_PS
(
const
wxString
&
FullFileName
,
int
Layer
)
void
WinEDA_BasePcbFrame
::
Genere_PS
(
const
wxString
&
FullFileName
,
int
Layer
,
bool
useA4
)
/****************************************************************************/
/****************************************************************************/
/* Genere un fichier POSTSCRIPT (*.ps) de trace du circuit, couche layer
/* Genere un fichier POSTSCRIPT (*.ps) de trace du circuit, couche layer
...
@@ -59,6 +59,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer )
...
@@ -59,6 +59,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer )
if
(
g_PlotScaleOpt
!=
1
)
if
(
g_PlotScaleOpt
!=
1
)
Center
=
TRUE
;
// Echelle != 1 donc trace centree du PCB
Center
=
TRUE
;
// Echelle != 1 donc trace centree du PCB
modetrace
=
Plot_Mode
;
modetrace
=
Plot_Mode
;
scale_format
=
1.0
;
scale_format
=
1.0
;
...
@@ -69,7 +70,8 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer )
...
@@ -69,7 +70,8 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer )
// calcul en unites internes des dimensions des feuilles ( connues en 1/1000 pouce )
// calcul en unites internes des dimensions des feuilles ( connues en 1/1000 pouce )
PcbSheetSize
.
x
=
currentsheet
->
m_Size
.
x
*
U_PCB
;
PcbSheetSize
.
x
=
currentsheet
->
m_Size
.
x
*
U_PCB
;
PcbSheetSize
.
y
=
currentsheet
->
m_Size
.
y
*
U_PCB
;
PcbSheetSize
.
y
=
currentsheet
->
m_Size
.
y
*
U_PCB
;
if
(
g_ForcePlotPS_On_A4
)
if
(
useA4
)
{
{
SheetPS
=
&
g_Sheet_A4
;
SheetPS
=
&
g_Sheet_A4
;
PaperSize
.
x
=
g_Sheet_A4
.
m_Size
.
x
*
U_PCB
;
PaperSize
.
x
=
g_Sheet_A4
.
m_Size
.
x
*
U_PCB
;
...
...
pcbnew/specctra.h
View file @
2da432b2
...
@@ -2707,6 +2707,10 @@ public:
...
@@ -2707,6 +2707,10 @@ public:
};
};
/**
* Class CLASS
* corresponds to the <class_descriptor> in the specctra spec.
*/
class
CLASS
:
public
ELEM
class
CLASS
:
public
ELEM
{
{
friend
class
SPECCTRA_DB
;
friend
class
SPECCTRA_DB
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment