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
e9f557e6
Commit
e9f557e6
authored
Dec 11, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew plot functions: code cleanup, coding policy fixes and minor enhancements
parent
dd5386db
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
318 additions
and
317 deletions
+318
-317
build_version.cpp
common/build_version.cpp
+1
-1
class_plotter.cpp
common/class_plotter.cpp
+2
-2
common_plotDXF_functions.cpp
common/common_plotDXF_functions.cpp
+3
-4
common_plotGERBER_functions.cpp
common/common_plotGERBER_functions.cpp
+4
-5
common_plotHPGL_functions.cpp
common/common_plotHPGL_functions.cpp
+4
-4
common_plotPS_functions.cpp
common/common_plotPS_functions.cpp
+4
-4
plot_common.h
include/plot_common.h
+40
-44
dialog_gendrill.cpp
pcbnew/dialogs/dialog_gendrill.cpp
+4
-4
dialog_plot_base.cpp
pcbnew/dialogs/dialog_plot_base.cpp
+5
-5
dialog_plot_base.fbp
pcbnew/dialogs/dialog_plot_base.fbp
+2
-2
dialog_plot_base.h
pcbnew/dialogs/dialog_plot_base.h
+2
-2
dialog_print_for_modedit.cpp
pcbnew/dialogs/dialog_print_for_modedit.cpp
+3
-3
dialog_print_using_printer.cpp
pcbnew/dialogs/dialog_print_using_printer.cpp
+3
-3
gen_drill_report_files.cpp
pcbnew/gen_drill_report_files.cpp
+2
-4
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+23
-16
pcbplot.cpp
pcbnew/pcbplot.cpp
+121
-121
pcbplot.h
pcbnew/pcbplot.h
+37
-31
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+17
-20
plotdxf.cpp
pcbnew/plotdxf.cpp
+1
-1
plotgerb.cpp
pcbnew/plotgerb.cpp
+4
-4
plothpgl.cpp
pcbnew/plothpgl.cpp
+21
-22
plotps.cpp
pcbnew/plotps.cpp
+13
-13
version.txt
version.txt
+2
-2
No files found.
common/build_version.cpp
View file @
e9f557e6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#endif
#endif
#ifndef KICAD_BUILD_VERSION
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2010-
04-19 BZR 23
xx)"
#define KICAD_BUILD_VERSION "(2010-
12-10 BZR 26
xx)"
#endif
#endif
//#define VERSION_STABILITY "stable"
//#define VERSION_STABILITY "stable"
...
...
common/class_plotter.cpp
View file @
e9f557e6
...
@@ -28,7 +28,7 @@ PLOTTER::PLOTTER( PlotFormat aPlotType )
...
@@ -28,7 +28,7 @@ PLOTTER::PLOTTER( PlotFormat aPlotType )
default_pen_width
=
0
;
default_pen_width
=
0
;
current_pen_width
=
-
1
;
/* To-be-set marker */
current_pen_width
=
-
1
;
/* To-be-set marker */
pen_state
=
'Z'
;
/* End-of-path idle */
pen_state
=
'Z'
;
/* End-of-path idle */
plot
_orient_options
=
0
;
/* Mirror flag */
plot
Mirror
=
0
;
/* Mirror flag */
output_file
=
0
;
output_file
=
0
;
color_mode
=
false
;
/* Start as a BW plot */
color_mode
=
false
;
/* Start as a BW plot */
negative_mode
=
false
;
negative_mode
=
false
;
...
@@ -43,7 +43,7 @@ void PLOTTER::user_to_device_coordinates( wxPoint& pos )
...
@@ -43,7 +43,7 @@ void PLOTTER::user_to_device_coordinates( wxPoint& pos )
{
{
pos
.
x
=
(
int
)
(
(
pos
.
x
-
plot_offset
.
x
)
*
plot_scale
*
device_scale
);
pos
.
x
=
(
int
)
(
(
pos
.
x
-
plot_offset
.
x
)
*
plot_scale
*
device_scale
);
if
(
plot
_orient_options
==
PLOT_MIROIR
)
if
(
plot
Mirror
)
pos
.
y
=
(
int
)
(
(
pos
.
y
-
plot_offset
.
y
)
*
plot_scale
*
device_scale
);
pos
.
y
=
(
int
)
(
(
pos
.
y
-
plot_offset
.
y
)
*
plot_scale
*
device_scale
);
else
else
pos
.
y
=
(
int
)
(
(
paper_size
.
y
-
(
pos
.
y
-
plot_offset
.
y
)
pos
.
y
=
(
int
)
(
(
paper_size
.
y
-
(
pos
.
y
-
plot_offset
.
y
)
...
...
common/common_plotDXF_functions.cpp
View file @
e9f557e6
...
@@ -14,15 +14,14 @@
...
@@ -14,15 +14,14 @@
/* Set the plot offset for the current plotting
/* Set the plot offset for the current plotting
*/
*/
void
DXF_PLOTTER
::
set_viewport
(
wxPoint
offset
,
void
DXF_PLOTTER
::
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
)
double
aScale
,
int
orient
)
{
{
wxASSERT
(
!
output_file
);
wxASSERT
(
!
output_file
);
plot_offset
=
o
ffset
;
plot_offset
=
aO
ffset
;
plot_scale
=
aScale
;
plot_scale
=
aScale
;
device_scale
=
1
;
device_scale
=
1
;
set_default_line_width
(
0
);
/* No line width on DXF */
set_default_line_width
(
0
);
/* No line width on DXF */
plot
_orient_options
=
0
;
/* No mirroring on DXF */
plot
Mirror
=
false
;
/* No mirroring on DXF */
current_color
=
BLACK
;
current_color
=
BLACK
;
}
}
...
...
common/common_plotGERBER_functions.cpp
View file @
e9f557e6
...
@@ -21,13 +21,12 @@
...
@@ -21,13 +21,12 @@
* @param aOffset = plot offset
* @param aOffset = plot offset
* @param aScale = coordinate scale (scale coefficient for coordinates)
* @param aScale = coordinate scale (scale coefficient for coordinates)
*/
*/
void
GERBER_PLOTTER
::
set_viewport
(
wxPoint
offset
,
void
GERBER_PLOTTER
::
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
)
double
aScale
,
int
orient
)
{
{
wxASSERT
(
!
output_file
);
wxASSERT
(
!
output_file
);
wxASSERT
(
orient
==
0
);
wxASSERT
(
aMirror
==
false
);
plot
_orient_options
=
0
;
plot
Mirror
=
false
;
plot_offset
=
o
ffset
;
plot_offset
=
aO
ffset
;
wxASSERT
(
aScale
==
1
);
wxASSERT
(
aScale
==
1
);
plot_scale
=
1
;
plot_scale
=
1
;
device_scale
=
1
;
device_scale
=
1
;
...
...
common/common_plotHPGL_functions.cpp
View file @
e9f557e6
...
@@ -17,14 +17,14 @@ const double SCALE_HPGL = 0.102041;
...
@@ -17,14 +17,14 @@ const double SCALE_HPGL = 0.102041;
/* Set the plot offset for the current plotting
/* Set the plot offset for the current plotting
*/
*/
void
HPGL_PLOTTER
::
set_viewport
(
wxPoint
offset
,
double
aScale
,
int
orient
)
void
HPGL_PLOTTER
::
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
)
{
{
wxASSERT
(
!
output_file
);
wxASSERT
(
!
output_file
);
plot_offset
=
o
ffset
;
plot_offset
=
aO
ffset
;
plot_scale
=
aScale
;
plot_scale
=
aScale
;
device_scale
=
SCALE_HPGL
;
device_scale
=
SCALE_HPGL
;
set_default_line_width
(
100
);
/* default line width in 1 / 1000 inch */
set_default_line_width
(
100
);
/* default line width in 1 / 1000 inch */
plot
_orient_options
=
orient
;
plot
Mirror
=
aMirror
;
}
}
...
@@ -213,7 +213,7 @@ void HPGL_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int rayon,
...
@@ -213,7 +213,7 @@ void HPGL_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int rayon,
cpos
=
centre
;
cpos
=
centre
;
user_to_device_coordinates
(
cpos
);
user_to_device_coordinates
(
cpos
);
if
(
plot
_orient_options
==
PLOT_MIROIR
)
if
(
plot
Mirror
)
angle
=
(
StAngle
-
EndAngle
)
/
10.0
;
angle
=
(
StAngle
-
EndAngle
)
/
10.0
;
else
else
angle
=
(
EndAngle
-
StAngle
)
/
10.0
;
angle
=
(
EndAngle
-
StAngle
)
/
10.0
;
...
...
common/common_plotPS_functions.cpp
View file @
e9f557e6
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
/* Set the plot offset for the current plotting */
/* Set the plot offset for the current plotting */
void
PS_PLOTTER
::
set_viewport
(
wxPoint
offset
,
double
aScale
,
int
orient
)
void
PS_PLOTTER
::
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
)
{
{
wxASSERT
(
!
output_file
);
wxASSERT
(
!
output_file
);
plot
_orient_options
=
orient
;
plot
Mirror
=
aMirror
;
plot_offset
=
o
ffset
;
plot_offset
=
aO
ffset
;
plot_scale
=
aScale
;
plot_scale
=
aScale
;
device_scale
=
1
;
/* PS references in decimals */
device_scale
=
1
;
/* PS references in decimals */
set_default_line_width
(
100
);
/* default line width in 1/1000 inch */
set_default_line_width
(
100
);
/* default line width in 1/1000 inch */
...
@@ -157,7 +157,7 @@ void PS_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int radius,
...
@@ -157,7 +157,7 @@ void PS_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int radius,
// Calculate start point.
// Calculate start point.
user_to_device_coordinates
(
centre
);
user_to_device_coordinates
(
centre
);
radius
=
wxRound
(
user_to_device_size
(
radius
)
);
radius
=
wxRound
(
user_to_device_size
(
radius
)
);
if
(
plot
_orient_options
==
PLOT_MIROIR
)
if
(
plot
Mirror
)
fprintf
(
output_file
,
"%d %d %d %g %g arc%d
\n
"
,
centre
.
x
,
centre
.
y
,
fprintf
(
output_file
,
"%d %d %d %g %g arc%d
\n
"
,
centre
.
x
,
centre
.
y
,
radius
,
(
double
)
-
EndAngle
/
10
,
(
double
)
-
StAngle
/
10
,
radius
,
(
double
)
-
EndAngle
/
10
,
(
double
)
-
StAngle
/
10
,
fill
);
fill
);
...
...
include/plot_common.h
View file @
e9f557e6
...
@@ -26,14 +26,11 @@ enum PlotFormat {
...
@@ -26,14 +26,11 @@ enum PlotFormat {
PLOT_FORMAT_DXF
PLOT_FORMAT_DXF
};
};
const
int
PLOT_MIROIR
=
1
;
class
PLOTTER
class
PLOTTER
{
{
public
:
public
:
PlotFormat
m_PlotType
;
// type of plot
PlotFormat
m_PlotType
;
// type of plot
public
:
public
:
PLOTTER
(
PlotFormat
aPlotType
);
PLOTTER
(
PlotFormat
aPlotType
);
virtual
~
PLOTTER
()
virtual
~
PLOTTER
()
{
{
...
@@ -91,8 +88,7 @@ public:
...
@@ -91,8 +88,7 @@ public:
}
}
virtual
void
set_viewport
(
wxPoint
offset
,
virtual
void
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
)
=
0
;
double
scale
,
int
orient
)
=
0
;
/* Standard primitives */
/* Standard primitives */
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
...
@@ -120,6 +116,7 @@ public:
...
@@ -120,6 +116,7 @@ public:
GRTraceMode
trace_mode
)
=
0
;
GRTraceMode
trace_mode
)
=
0
;
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
GRTraceMode
trace_mode
)
=
0
;
int
orient
,
GRTraceMode
trace_mode
)
=
0
;
/** virtual function flash_pad_trapez
/** virtual function flash_pad_trapez
* flash a trapezoidal pad
* flash a trapezoidal pad
* @param aPadPos = the position of the shape
* @param aPadPos = the position of the shape
...
@@ -206,7 +203,7 @@ protected:
...
@@ -206,7 +203,7 @@ protected:
char
pen_state
;
char
pen_state
;
wxPoint
pen_lastpos
;
wxPoint
pen_lastpos
;
/* Other stuff */
/* Other stuff */
int
plot_orient_options
;
/* For now, mirror plot */
bool
plotMirror
;
wxString
creator
;
wxString
creator
;
wxString
filename
;
wxString
filename
;
Ki_PageDescr
*
sheet
;
Ki_PageDescr
*
sheet
;
...
@@ -215,11 +212,11 @@ protected:
...
@@ -215,11 +212,11 @@ protected:
class
HPGL_PLOTTER
:
public
PLOTTER
class
HPGL_PLOTTER
:
public
PLOTTER
{
{
public
:
public
:
HPGL_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_HPGL
)
HPGL_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_HPGL
)
{
{
}
}
virtual
bool
start_plot
(
FILE
*
fout
);
virtual
bool
start_plot
(
FILE
*
fout
);
virtual
bool
end_plot
();
virtual
bool
end_plot
();
...
@@ -261,8 +258,7 @@ public:
...
@@ -261,8 +258,7 @@ public:
}
}
virtual
void
set_viewport
(
wxPoint
offset
,
virtual
void
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
);
double
scale
,
int
orient
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
poly
(
int
nb_segm
,
int
*
coord
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
poly
(
int
nb_segm
,
int
*
coord
,
FILL_T
fill
,
int
width
=
-
1
);
...
@@ -277,6 +273,7 @@ public:
...
@@ -277,6 +273,7 @@ public:
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
GRTraceMode
trace_mode
);
int
orient
,
GRTraceMode
trace_mode
);
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
...
@@ -293,13 +290,13 @@ protected:
...
@@ -293,13 +290,13 @@ protected:
class
PS_PLOTTER
:
public
PLOTTER
class
PS_PLOTTER
:
public
PLOTTER
{
{
public
:
public
:
PS_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_POST
)
PS_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_POST
)
{
{
plot_scale_adjX
=
1
;
plot_scale_adjX
=
1
;
plot_scale_adjY
=
1
;
plot_scale_adjY
=
1
;
}
}
virtual
bool
start_plot
(
FILE
*
fout
);
virtual
bool
start_plot
(
FILE
*
fout
);
virtual
bool
end_plot
();
virtual
bool
end_plot
();
virtual
void
set_current_line_width
(
int
width
);
virtual
void
set_current_line_width
(
int
width
);
...
@@ -314,8 +311,7 @@ public:
...
@@ -314,8 +311,7 @@ public:
}
}
virtual
void
set_viewport
(
wxPoint
offset
,
virtual
void
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
);
double
scale
,
int
orient
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
arc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
virtual
void
arc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
...
@@ -328,6 +324,7 @@ public:
...
@@ -328,6 +324,7 @@ public:
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
GRTraceMode
trace_mode
);
int
orient
,
GRTraceMode
trace_mode
);
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
...
@@ -359,8 +356,7 @@ struct APERTURE
...
@@ -359,8 +356,7 @@ struct APERTURE
class
GERBER_PLOTTER
:
public
PLOTTER
class
GERBER_PLOTTER
:
public
PLOTTER
{
{
public
:
public
:
GERBER_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_GERBER
)
GERBER_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_GERBER
)
{
{
work_file
=
0
;
work_file
=
0
;
final_file
=
0
;
final_file
=
0
;
...
@@ -376,8 +372,7 @@ public:
...
@@ -376,8 +372,7 @@ public:
/* RS274X has no dashing, nor colours */
/* RS274X has no dashing, nor colours */
virtual
void
set_dash
(
bool
dashed
)
{};
virtual
void
set_dash
(
bool
dashed
)
{};
virtual
void
set_color
(
int
color
)
{};
virtual
void
set_color
(
int
color
)
{};
virtual
void
set_viewport
(
wxPoint
offset
,
virtual
void
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
);
double
scale
,
int
orient
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
poly
(
int
nb_segm
,
int
*
coord
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
poly
(
int
nb_segm
,
int
*
coord
,
FILL_T
fill
,
int
width
=
-
1
);
...
@@ -388,6 +383,7 @@ public:
...
@@ -388,6 +383,7 @@ public:
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
GRTraceMode
trace_mode
);
int
orient
,
GRTraceMode
trace_mode
);
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
...
@@ -411,11 +407,11 @@ protected:
...
@@ -411,11 +407,11 @@ protected:
class
DXF_PLOTTER
:
public
PLOTTER
class
DXF_PLOTTER
:
public
PLOTTER
{
{
public
:
public
:
DXF_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_DXF
)
DXF_PLOTTER
()
:
PLOTTER
(
PLOT_FORMAT_DXF
)
{
{
}
}
virtual
bool
start_plot
(
FILE
*
fout
);
virtual
bool
start_plot
(
FILE
*
fout
);
virtual
bool
end_plot
();
virtual
bool
end_plot
();
...
@@ -434,8 +430,7 @@ public:
...
@@ -434,8 +430,7 @@ public:
virtual
void
set_color
(
int
color
);
virtual
void
set_color
(
int
color
);
virtual
void
set_viewport
(
wxPoint
offset
,
virtual
void
set_viewport
(
wxPoint
aOffset
,
double
aScale
,
bool
aMirror
);
double
scale
,
int
orient
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
rect
(
wxPoint
p1
,
wxPoint
p2
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
circle
(
wxPoint
pos
,
int
diametre
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
poly
(
int
nb_segm
,
int
*
coord
,
FILL_T
fill
,
int
width
=
-
1
);
virtual
void
poly
(
int
nb_segm
,
int
*
coord
,
FILL_T
fill
,
int
width
=
-
1
);
...
@@ -450,6 +445,7 @@ public:
...
@@ -450,6 +445,7 @@ public:
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
virtual
void
flash_pad_rect
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
GRTraceMode
trace_mode
);
int
orient
,
GRTraceMode
trace_mode
);
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
virtual
void
flash_pad_trapez
(
wxPoint
aPadPos
,
wxPoint
aCorners
[
4
],
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
int
aPadOrient
,
GRTraceMode
aTrace_Mode
);
...
...
pcbnew/dialogs/dialog_gendrill.cpp
View file @
e9f557e6
...
@@ -133,11 +133,11 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
...
@@ -133,11 +133,11 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
m_MicroViaDrillValue
->
SetLabel
(
_
(
"Use Netclasses values"
)
);
m_MicroViaDrillValue
->
SetLabel
(
_
(
"Use Netclasses values"
)
);
msg
.
Empty
();
msg
.
Empty
();
msg
<<
g_
pcb_plot_options
.
HPGL_Pen_
Num
;
msg
<<
g_
PcbPlotOptions
.
m_HPGLPen
Num
;
m_PenNum
->
SetValue
(
msg
);
m_PenNum
->
SetValue
(
msg
);
msg
.
Empty
();
msg
.
Empty
();
msg
<<
g_
pcb_plot_options
.
HPGL_Pen_
Speed
;
msg
<<
g_
PcbPlotOptions
.
m_HPGLPen
Speed
;
m_PenSpeed
->
SetValue
(
msg
);
m_PenSpeed
->
SetValue
(
msg
);
// See if we have some buried vias or/and microvias, and display
// See if we have some buried vias or/and microvias, and display
...
@@ -290,11 +290,11 @@ void DIALOG_GENDRILL::SetParams( void )
...
@@ -290,11 +290,11 @@ void DIALOG_GENDRILL::SetParams( void )
msg
=
m_PenSpeed
->
GetValue
();
msg
=
m_PenSpeed
->
GetValue
();
if
(
msg
.
ToLong
(
&
ltmp
)
)
if
(
msg
.
ToLong
(
&
ltmp
)
)
g_
pcb_plot_options
.
HPGL_Pen_
Speed
=
ltmp
;
g_
PcbPlotOptions
.
m_HPGLPen
Speed
=
ltmp
;
msg
=
m_PenNum
->
GetValue
();
msg
=
m_PenNum
->
GetValue
();
if
(
msg
.
ToLong
(
&
ltmp
)
)
if
(
msg
.
ToLong
(
&
ltmp
)
)
g_
pcb_plot_options
.
HPGL_Pen_
Num
=
ltmp
;
g_
PcbPlotOptions
.
m_HPGLPen
Num
=
ltmp
;
if
(
m_Choice_Drill_Offset
->
GetSelection
()
==
0
)
if
(
m_Choice_Drill_Offset
->
GetSelection
()
==
0
)
m_FileDrillOffset
=
wxPoint
(
0
,
0
);
m_FileDrillOffset
=
wxPoint
(
0
,
0
);
else
else
...
...
pcbnew/dialogs/dialog_plot_base.cpp
View file @
e9f557e6
...
@@ -40,10 +40,10 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
...
@@ -40,10 +40,10 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bLeftSizer
->
Add
(
m_Use_Gerber_Extensions
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
bLeftSizer
->
Add
(
m_Use_Gerber_Extensions
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_
Exclude_Edges_Pcb
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Exclude pcb edge layer"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
excludeEdgeLayerOpt
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Exclude pcb edge layer"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
Exclude_Edges_Pcb
->
SetToolTip
(
_
(
"Exclude contents of the pcb edge layer from all other layers"
)
);
m_
excludeEdgeLayerOpt
->
SetToolTip
(
_
(
"Exclude contents of the pcb edge layer from all other layers"
)
);
bLeftSizer
->
Add
(
m_
Exclude_Edges_Pcb
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
bLeftSizer
->
Add
(
m_
excludeEdgeLayerOpt
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_SubtractMaskFromSilk
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Subtract mask from silk"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_SubtractMaskFromSilk
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Subtract mask from silk"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_SubtractMaskFromSilk
->
SetToolTip
(
_
(
"Remove silkscreen from areas without soldermask"
)
);
m_SubtractMaskFromSilk
->
SetToolTip
(
_
(
"Remove silkscreen from areas without soldermask"
)
);
...
@@ -147,8 +147,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
...
@@ -147,8 +147,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
wxStaticBoxSizer
*
sbSizerPSOpt
;
wxStaticBoxSizer
*
sbSizerPSOpt
;
sbSizerPSOpt
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"PS Options:"
)
),
wxVERTICAL
);
sbSizerPSOpt
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"PS Options:"
)
),
wxVERTICAL
);
m_
Plot_PS_Negative
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Plot negative"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
plotPSNegativeOpt
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Plot negative"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
sbSizerPSOpt
->
Add
(
m_
Plot_PS_Negative
,
0
,
wxALL
,
5
);
sbSizerPSOpt
->
Add
(
m_
plotPSNegativeOpt
,
0
,
wxALL
,
5
);
bSizerFmtPlot
->
Add
(
sbSizerPSOpt
,
0
,
wxEXPAND
,
5
);
bSizerFmtPlot
->
Add
(
sbSizerPSOpt
,
0
,
wxEXPAND
,
5
);
...
...
pcbnew/dialogs/dialog_plot_base.fbp
View file @
e9f557e6
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
<property
name=
"label"
>
Exclude pcb edge layer
</property>
<property
name=
"label"
>
Exclude pcb edge layer
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_
Exclude_Edges_Pcb
</property>
<property
name=
"name"
>
m_
excludeEdgeLayerOpt
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"size"
></property>
...
@@ -1365,7 +1365,7 @@
...
@@ -1365,7 +1365,7 @@
<property
name=
"label"
>
Plot negative
</property>
<property
name=
"label"
>
Plot negative
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_
Plot_PS_Negative
</property>
<property
name=
"name"
>
m_
plotPSNegativeOpt
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"size"
></property>
...
...
pcbnew/dialogs/dialog_plot_base.h
View file @
e9f557e6
...
@@ -54,7 +54,7 @@ class DIALOG_PLOT_BASE : public wxDialog
...
@@ -54,7 +54,7 @@ class DIALOG_PLOT_BASE : public wxDialog
wxStaticBoxSizer
*
m_CopperLayersBoxSizer
;
wxStaticBoxSizer
*
m_CopperLayersBoxSizer
;
wxStaticBoxSizer
*
m_TechnicalLayersBoxSizer
;
wxStaticBoxSizer
*
m_TechnicalLayersBoxSizer
;
wxCheckBox
*
m_Use_Gerber_Extensions
;
wxCheckBox
*
m_Use_Gerber_Extensions
;
wxCheckBox
*
m_
Exclude_Edges_Pcb
;
wxCheckBox
*
m_
excludeEdgeLayerOpt
;
wxCheckBox
*
m_SubtractMaskFromSilk
;
wxCheckBox
*
m_SubtractMaskFromSilk
;
wxCheckBox
*
m_Plot_Sheet_Ref
;
wxCheckBox
*
m_Plot_Sheet_Ref
;
wxCheckBox
*
m_Plot_Pads_on_Silkscreen
;
wxCheckBox
*
m_Plot_Pads_on_Silkscreen
;
...
@@ -73,7 +73,7 @@ class DIALOG_PLOT_BASE : public wxDialog
...
@@ -73,7 +73,7 @@ class DIALOG_PLOT_BASE : public wxDialog
wxTextCtrl
*
m_HPGLPenSpeedOpt
;
wxTextCtrl
*
m_HPGLPenSpeedOpt
;
wxStaticText
*
m_textPenOvr
;
wxStaticText
*
m_textPenOvr
;
wxTextCtrl
*
m_HPGLPenOverlayOpt
;
wxTextCtrl
*
m_HPGLPenOverlayOpt
;
wxCheckBox
*
m_
Plot_PS_Negative
;
wxCheckBox
*
m_
plotPSNegativeOpt
;
wxTextCtrl
*
m_OutputDirectory
;
wxTextCtrl
*
m_OutputDirectory
;
wxButton
*
m_BrowseButton
;
wxButton
*
m_BrowseButton
;
wxCheckBox
*
m_PlotMirorOpt
;
wxCheckBox
*
m_PlotMirorOpt
;
...
...
pcbnew/dialogs/dialog_print_for_modedit.cpp
View file @
e9f557e6
...
@@ -194,9 +194,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
...
@@ -194,9 +194,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
s_Parameters
.
m_Print_Black_and_White
=
m_ModeColorOption
->
GetSelection
();
s_Parameters
.
m_Print_Black_and_White
=
m_ModeColorOption
->
GetSelection
();
s_Parameters
.
m_PrintScale
=
s_ScaleList
[
m_ScaleOption
->
GetSelection
()];
s_Parameters
.
m_PrintScale
=
s_ScaleList
[
m_ScaleOption
->
GetSelection
()];
g_
pcb_plot_options
.
ScaleAdj
X
=
s_Parameters
.
m_XScaleAdjust
;
g_
PcbPlotOptions
.
m_FineScaleAdjust
X
=
s_Parameters
.
m_XScaleAdjust
;
g_
pcb_plot_options
.
ScaleAdjX
=
s_Parameters
.
m_YScaleAdjust
;
g_
PcbPlotOptions
.
m_FineScaleAdjustY
=
s_Parameters
.
m_YScaleAdjust
;
g_
pcb_plot_options
.
Scale
=
s_Parameters
.
m_PrintScale
;
g_
PcbPlotOptions
.
m_Plot
Scale
=
s_Parameters
.
m_PrintScale
;
wxPrintDialogData
printDialogData
(
*
g_PrintData
);
wxPrintDialogData
printDialogData
(
*
g_PrintData
);
wxPrinter
printer
(
&
printDialogData
);
wxPrinter
printer
(
&
printDialogData
);
...
...
pcbnew/dialogs/dialog_print_using_printer.cpp
View file @
e9f557e6
...
@@ -383,7 +383,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
...
@@ -383,7 +383,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
int
idx
=
m_ScaleOption
->
GetSelection
();
int
idx
=
m_ScaleOption
->
GetSelection
();
s_Parameters
.
m_PrintScale
=
s_ScaleList
[
idx
];
s_Parameters
.
m_PrintScale
=
s_ScaleList
[
idx
];
g_
pcb_plot_options
.
Scale
=
s_Parameters
.
m_PrintScale
;
g_
PcbPlotOptions
.
m_Plot
Scale
=
s_Parameters
.
m_PrintScale
;
if
(
m_FineAdjustXscaleOpt
)
if
(
m_FineAdjustXscaleOpt
)
{
{
...
@@ -400,8 +400,8 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
...
@@ -400,8 +400,8 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
DisplayInfoMessage
(
NULL
,
_
(
"Warning: Scale option set to a very small value"
)
);
DisplayInfoMessage
(
NULL
,
_
(
"Warning: Scale option set to a very small value"
)
);
m_FineAdjustYscaleOpt
->
GetValue
().
ToDouble
(
&
s_Parameters
.
m_YScaleAdjust
);
m_FineAdjustYscaleOpt
->
GetValue
().
ToDouble
(
&
s_Parameters
.
m_YScaleAdjust
);
}
}
g_
pcb_plot_options
.
ScaleAdj
X
=
s_Parameters
.
m_XScaleAdjust
;
g_
PcbPlotOptions
.
m_FineScaleAdjust
X
=
s_Parameters
.
m_XScaleAdjust
;
g_
pcb_plot_options
.
ScaleAdjX
=
s_Parameters
.
m_YScaleAdjust
;
g_
PcbPlotOptions
.
m_FineScaleAdjustY
=
s_Parameters
.
m_YScaleAdjust
;
SetPenWidth
();
SetPenWidth
();
}
}
...
...
pcbnew/gen_drill_report_files.cpp
View file @
e9f557e6
...
@@ -4,8 +4,6 @@
...
@@ -4,8 +4,6 @@
#include "fctsys.h"
#include "fctsys.h"
using
namespace
std
;
#include <vector>
#include <vector>
#include "common.h"
#include "common.h"
...
@@ -67,8 +65,8 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
...
@@ -67,8 +65,8 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
scale
=
1
;
scale
=
1
;
HPGL_PLOTTER
*
hpgl_plotter
=
new
HPGL_PLOTTER
;
HPGL_PLOTTER
*
hpgl_plotter
=
new
HPGL_PLOTTER
;
plotter
=
hpgl_plotter
;
plotter
=
hpgl_plotter
;
hpgl_plotter
->
set_pen_number
(
g_
pcb_plot_options
.
HPGL_Pen_
Num
);
hpgl_plotter
->
set_pen_number
(
g_
PcbPlotOptions
.
m_HPGLPen
Num
);
hpgl_plotter
->
set_pen_speed
(
g_
pcb_plot_options
.
HPGL_Pen_
Speed
);
hpgl_plotter
->
set_pen_speed
(
g_
PcbPlotOptions
.
m_HPGLPen
Speed
);
hpgl_plotter
->
set_pen_overlap
(
0
);
hpgl_plotter
->
set_pen_overlap
(
0
);
plotter
->
set_paper_size
(
aSheet
);
plotter
->
set_paper_size
(
aSheet
);
plotter
->
set_viewport
(
offset
,
scale
,
0
);
plotter
->
set_viewport
(
offset
,
scale
,
0
);
...
...
pcbnew/pcbnew_config.cpp
View file @
e9f557e6
...
@@ -388,18 +388,6 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings()
...
@@ -388,18 +388,6 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings()
m_configSettings
.
push_back
(
new
PARAM_CFG_SETCOLOR
(
true
,
wxT
(
"CoRatsN"
),
m_configSettings
.
push_back
(
new
PARAM_CFG_SETCOLOR
(
true
,
wxT
(
"CoRatsN"
),
ITEM_COLOR
(
RATSNEST_VISIBLE
),
ITEM_COLOR
(
RATSNEST_VISIBLE
),
WHITE
)
);
WHITE
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGLnum"
),
&
g_pcb_plot_options
.
HPGL_Pen_Num
,
1
,
1
,
16
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGdiam"
),
&
g_pcb_plot_options
.
HPGL_Pen_Diam
,
15
,
0
,
100
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGLSpd"
),
&
g_pcb_plot_options
.
HPGL_Pen_Speed
,
20
,
0
,
1000
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGLrec"
),
&
g_pcb_plot_options
.
HPGL_Pen_Recouvrement
,
2
,
0
,
0x100
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"TimeOut"
),
&
g_TimeOut
,
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"TimeOut"
),
&
g_TimeOut
,
600
,
0
,
60000
)
);
600
,
0
,
60000
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"DPolair"
),
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"DPolair"
),
...
@@ -411,14 +399,33 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings()
...
@@ -411,14 +399,33 @@ PARAM_CFG_ARRAY& WinEDA_PcbFrame::GetConfigurationSettings()
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"TwoSegT"
),
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"TwoSegT"
),
&
g_TwoSegmentTrackBuild
,
TRUE
)
);
&
g_TwoSegmentTrackBuild
,
TRUE
)
);
// Plot options:
// Plot options:
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGLnum"
),
&
g_PcbPlotOptions
.
m_HPGLPenNum
,
1
,
1
,
16
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGdiam"
),
&
g_PcbPlotOptions
.
m_HPGLPenDiam
,
15
,
0
,
100
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGLSpd"
),
&
g_PcbPlotOptions
.
m_HPGLPenSpeed
,
20
,
0
,
1000
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"HPGLrec"
),
&
g_PcbPlotOptions
.
m_HPGLPenOvr
,
2
,
0
,
0x100
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"PlotOutputFormat"
),
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"PlotOutputFormat"
),
&
g_
pcb_plot_options
.
PlotFormat
,
PLOT_FORMAT_GERBER
)
);
&
g_
PcbPlotOptions
.
m_
PlotFormat
,
PLOT_FORMAT_GERBER
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"EdgeLayerGerberOpt"
),
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"EdgeLayerGerberOpt"
),
&
g_
pcb_plot_options
.
Exclude_Edges_Pcb
,
true
)
);
&
g_
PcbPlotOptions
.
m_ExcludeEdgeLayer
,
true
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"SubstractMasktoSilk"
),
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"SubstractMasktoSilk"
),
&
g_
pcb_plot_o
ptions
.
m_SubtractMaskFromSilk
,
false
)
);
&
g_
PcbPlotO
ptions
.
m_SubtractMaskFromSilk
,
false
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"PlotPadsOnSilkscreen"
),
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"PlotPadsOnSilkscreen"
),
&
g_pcb_plot_options
.
PlotPadsOnSilkLayer
,
false
)
);
&
g_PcbPlotOptions
.
m_PlotPadsOnSilkLayer
,
false
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"PlotFrameRef"
),
&
g_PcbPlotOptions
.
m_PlotFrameRef
,
false
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"PlotViasOnMask"
),
&
g_PcbPlotOptions
.
m_PlotViaOnMaskLayer
,
false
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_INT
(
true
,
wxT
(
"PlotHolesOpt"
),
(
int
*
)
&
g_PcbPlotOptions
.
m_DrillShapeOpt
,
PCB_PLOT_PARAMS
::
SMALL_DRILL_SHAPE
)
);
return
m_configSettings
;
return
m_configSettings
;
}
}
pcbnew/pcbplot.cpp
View file @
e9f557e6
...
@@ -29,19 +29,19 @@
...
@@ -29,19 +29,19 @@
#define MIN_SCALE 0.01
#define MIN_SCALE 0.01
#define MAX_SCALE 100.0
#define MAX_SCALE 100.0
// PCB_P
lot_Options
constructor: set the default values for plot options:
// PCB_P
LOT_PARAMS
constructor: set the default values for plot options:
PCB_P
lot_Options
::
PCB_Plot_Options
()
PCB_P
LOT_PARAMS
::
PCB_PLOT_PARAMS
()
{
{
m_SubtractMaskFromSilk
=
false
;
m_SubtractMaskFromSilk
=
false
;
Sel_Texte_
Reference
=
true
;
m_Plot
Reference
=
true
;
Sel_Texte_Valeur
=
true
;
m_PlotValue
=
true
;
Sel_Texte_Divers
=
true
;
m_PlotTextOther
=
true
;
DrillShapeOpt
=
PCB_Plot_Options
::
SMALL_DRILL_SHAPE
;
m_DrillShapeOpt
=
PCB_PLOT_PARAMS
::
SMALL_DRILL_SHAPE
;
Trace_Mode
=
FILLED
;
Trace_Mode
=
FILLED
;
Scale
=
1.0
;
m_PlotScale
=
1.0
;
ScaleAdjX
=
1.0
;
m_AutoScale
=
false
;
ScaleAdjY
=
1.0
;
m_FineScaleAdjustX
=
1.0
;
PlotScaleOpt
=
1
;
m_FineScaleAdjustY
=
1.0
;
outputDirectory
=
wxT
(
""
);
outputDirectory
=
wxT
(
""
);
}
}
...
@@ -53,7 +53,7 @@ static bool s_PlotOriginIsAuxAxis = FALSE;
...
@@ -53,7 +53,7 @@ static bool s_PlotOriginIsAuxAxis = FALSE;
/* The group of plot options - sadly global XXX */
/* The group of plot options - sadly global XXX */
PCB_P
lot_Options
g_pcb_plot_o
ptions
;
PCB_P
LOT_PARAMS
g_PcbPlotO
ptions
;
extern
int
g_DrawDefaultLineThickness
;
extern
int
g_DrawDefaultLineThickness
;
...
@@ -69,6 +69,7 @@ public:
...
@@ -69,6 +69,7 @@ public:
wxCheckBox
*
m_BoxSelectLayer
[
LAYER_COUNT
];
// wxCheckBox list to select/deselec layers to plot
wxCheckBox
*
m_BoxSelectLayer
[
LAYER_COUNT
];
// wxCheckBox list to select/deselec layers to plot
double
m_XScaleAdjust
;
double
m_XScaleAdjust
;
double
m_YScaleAdjust
;
double
m_YScaleAdjust
;
static
int
m_dlgPlotScaleOpt
;
// Static to remember last selection
bool
useA4
()
bool
useA4
()
...
@@ -79,7 +80,7 @@ public:
...
@@ -79,7 +80,7 @@ public:
/**
/**
* Function getFormat
* Function getFormat
* returns one of the values from the PlotFormat enum. If the 4th
* returns one of the values from the
m_
PlotFormat enum. If the 4th
* radio button is selected, map this back to postscript.
* radio button is selected, map this back to postscript.
*/
*/
PlotFormat
getFormat
()
PlotFormat
getFormat
()
...
@@ -87,7 +88,7 @@ public:
...
@@ -87,7 +88,7 @@ public:
int
radioNdx
=
m_PlotFormatOpt
->
GetSelection
();
int
radioNdx
=
m_PlotFormatOpt
->
GetSelection
();
// change the A4 to the simple postscript, according to the
// change the A4 to the simple postscript, according to the
// PlotFormat enum
//
m_
PlotFormat enum
switch
(
radioNdx
)
switch
(
radioNdx
)
{
{
case
3
:
case
3
:
...
@@ -103,8 +104,7 @@ public:
...
@@ -103,8 +104,7 @@ public:
}
}
public
:
public
:
DIALOG_PLOT
(
WinEDA_PcbFrame
*
parent
);
DIALOG_PLOT
(
WinEDA_PcbFrame
*
parent
);
private
:
private
:
void
Init_Dialog
();
void
Init_Dialog
();
void
Plot
(
wxCommandEvent
&
event
);
void
Plot
(
wxCommandEvent
&
event
);
...
@@ -117,6 +117,7 @@ private:
...
@@ -117,6 +117,7 @@ private:
void
CreateDrillFile
(
wxCommandEvent
&
event
);
void
CreateDrillFile
(
wxCommandEvent
&
event
);
};
};
int
DIALOG_PLOT
::
m_dlgPlotScaleOpt
=
1
;
const
int
UNITS_MILS
=
1000
;
const
int
UNITS_MILS
=
1000
;
...
@@ -145,28 +146,28 @@ void DIALOG_PLOT::Init_Dialog()
...
@@ -145,28 +146,28 @@ void DIALOG_PLOT::Init_Dialog()
m_Config
->
Read
(
OPTKEY_XFINESCALE_ADJ
,
&
m_XScaleAdjust
);
m_Config
->
Read
(
OPTKEY_XFINESCALE_ADJ
,
&
m_XScaleAdjust
);
m_Config
->
Read
(
OPTKEY_YFINESCALE_ADJ
,
&
m_YScaleAdjust
);
m_Config
->
Read
(
OPTKEY_YFINESCALE_ADJ
,
&
m_YScaleAdjust
);
m_PlotFormatOpt
->
SetSelection
(
g_
pcb_plot_options
.
PlotFormat
);
m_PlotFormatOpt
->
SetSelection
(
g_
PcbPlotOptions
.
m_
PlotFormat
);
g_
pcb_plot_options
.
PlotLine_
Width
=
g_DrawDefaultLineThickness
;
g_
PcbPlotOptions
.
m_PlotLine
Width
=
g_DrawDefaultLineThickness
;
// Set units and value for HPGL pen speed.
// Set units and value for HPGL pen speed.
AddUnitSymbol
(
*
m_textPenSize
,
g_UserUnit
);
AddUnitSymbol
(
*
m_textPenSize
,
g_UserUnit
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
g_
pcb_plot_options
.
HPGL_Pen_
Diam
,
UNITS_MILS
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
g_
PcbPlotOptions
.
m_HPGLPen
Diam
,
UNITS_MILS
);
m_HPGLPenSizeOpt
->
AppendText
(
msg
);
m_HPGLPenSizeOpt
->
AppendText
(
msg
);
// Set units to cm for standard HPGL pen speed.
// Set units to cm for standard HPGL pen speed.
msg
=
ReturnStringFromValue
(
UNSCALED_UNITS
,
g_
pcb_plot_options
.
HPGL_Pen_
Speed
,
1
);
msg
=
ReturnStringFromValue
(
UNSCALED_UNITS
,
g_
PcbPlotOptions
.
m_HPGLPen
Speed
,
1
);
m_HPGLPenSpeedOpt
->
AppendText
(
msg
);
m_HPGLPenSpeedOpt
->
AppendText
(
msg
);
// Set units and value for HPGL pen overlay.
// Set units and value for HPGL pen overlay.
AddUnitSymbol
(
*
m_textPenOvr
,
g_UserUnit
);
AddUnitSymbol
(
*
m_textPenOvr
,
g_UserUnit
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
msg
=
ReturnStringFromValue
(
g_UserUnit
,
g_
pcb_plot_options
.
HPGL_Pen_Recouvrement
,
g_
PcbPlotOptions
.
m_HPGLPenOvr
,
UNITS_MILS
);
UNITS_MILS
);
m_HPGLPenOverlayOpt
->
AppendText
(
msg
);
m_HPGLPenOverlayOpt
->
AppendText
(
msg
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
msg
=
ReturnStringFromValue
(
g_UserUnit
,
g_
pcb_plot_options
.
PlotLine_
Width
,
g_
PcbPlotOptions
.
m_PlotLine
Width
,
PCB_INTERNAL_UNIT
);
PCB_INTERNAL_UNIT
);
m_LinesWidth
->
AppendText
(
msg
);
m_LinesWidth
->
AppendText
(
msg
);
...
@@ -187,7 +188,7 @@ void DIALOG_PLOT::Init_Dialog()
...
@@ -187,7 +188,7 @@ void DIALOG_PLOT::Init_Dialog()
msg
.
Printf
(
wxT
(
"%f"
),
m_YScaleAdjust
);
msg
.
Printf
(
wxT
(
"%f"
),
m_YScaleAdjust
);
m_FineAdjustYscaleOpt
->
AppendText
(
msg
);
m_FineAdjustYscaleOpt
->
AppendText
(
msg
);
m_
Plot_PS_Negative
->
SetValue
(
g_pcb_plot_options
.
Plot_PS_
Negative
);
m_
plotPSNegativeOpt
->
SetValue
(
g_PcbPlotOptions
.
m_PlotPS
Negative
);
// Create layer list.
// Create layer list.
...
@@ -205,12 +206,12 @@ void DIALOG_PLOT::Init_Dialog()
...
@@ -205,12 +206,12 @@ void DIALOG_PLOT::Init_Dialog()
// Add wxCheckBoxes in layers lists dialog
// Add wxCheckBoxes in layers lists dialog
// List layers in same order than in setup layers dialog
// List layers in same order than in setup layers dialog
// (Front or Top to Back or Bottom)
// (Front or Top to Back or Bottom)
DECLARE_LAYERS_ORDER_LIST
(
layersOrder
);
DECLARE_LAYERS_ORDER_LIST
(
layersOrder
);
for
(
int
layer_idx
=
0
;
layer_idx
<
NB_LAYERS
;
++
layer_idx
)
for
(
int
layer_idx
=
0
;
layer_idx
<
NB_LAYERS
;
++
layer_idx
)
{
{
layer
=
layersOrder
[
layer_idx
];
layer
=
layersOrder
[
layer_idx
];
wxASSERT
(
layer
<
NB_LAYERS
);
wxASSERT
(
layer
<
NB_LAYERS
);
if
(
m_BoxSelectLayer
[
layer
]
==
NULL
)
if
(
m_BoxSelectLayer
[
layer
]
==
NULL
)
continue
;
continue
;
...
@@ -242,54 +243,54 @@ void DIALOG_PLOT::Init_Dialog()
...
@@ -242,54 +243,54 @@ void DIALOG_PLOT::Init_Dialog()
m_Use_Gerber_Extensions
->
SetValue
(
ltmp
);
m_Use_Gerber_Extensions
->
SetValue
(
ltmp
);
// Option for excluding contents of "Edges Pcb" layer
// Option for excluding contents of "Edges Pcb" layer
m_
Exclude_Edges_Pcb
->
SetValue
(
g_pcb_plot_options
.
Exclude_Edges_Pcb
);
m_
excludeEdgeLayerOpt
->
SetValue
(
g_PcbPlotOptions
.
m_ExcludeEdgeLayer
);
m_SubtractMaskFromSilk
->
SetValue
(
g_
pcb_plot_o
ptions
.
GetSubtractMaskFromSilk
()
);
m_SubtractMaskFromSilk
->
SetValue
(
g_
PcbPlotO
ptions
.
GetSubtractMaskFromSilk
()
);
// Option to plot page references:
// Option to plot page references:
if
(
m_Parent
->
m_Print_Sheet_Ref
)
if
(
m_Parent
->
m_Print_Sheet_Ref
)
{
{
m_Plot_Sheet_Ref
->
SetValue
(
g_
pcb_plot_options
.
Plot_Frame_
Ref
);
m_Plot_Sheet_Ref
->
SetValue
(
g_
PcbPlotOptions
.
m_PlotFrame
Ref
);
}
}
else
else
{
{
m_Plot_Sheet_Ref
->
Enable
(
false
);
m_Plot_Sheet_Ref
->
Enable
(
false
);
g_
pcb_plot_options
.
Plot_Frame_
Ref
=
false
;
g_
PcbPlotOptions
.
m_PlotFrame
Ref
=
false
;
}
}
// Option to plot pads on silkscreen layers or all layers
// Option to plot pads on silkscreen layers or all layers
m_Plot_Pads_on_Silkscreen
->
SetValue
(
g_
pcb_plot_options
.
PlotPadsOnSilkLayer
);
m_Plot_Pads_on_Silkscreen
->
SetValue
(
g_
PcbPlotOptions
.
m_
PlotPadsOnSilkLayer
);
// Options to plot texts on footprints
// Options to plot texts on footprints
m_Plot_Text_Value
->
SetValue
(
g_
pcb_plot_options
.
Sel_Texte_Valeur
);
m_Plot_Text_Value
->
SetValue
(
g_
PcbPlotOptions
.
m_PlotValue
);
m_Plot_Text_Ref
->
SetValue
(
g_
pcb_plot_options
.
Sel_Texte_
Reference
);
m_Plot_Text_Ref
->
SetValue
(
g_
PcbPlotOptions
.
m_Plot
Reference
);
m_Plot_Text_Div
->
SetValue
(
g_
pcb_plot_options
.
Sel_Texte_Divers
);
m_Plot_Text_Div
->
SetValue
(
g_
PcbPlotOptions
.
m_PlotTextOther
);
m_Plot_Invisible_Text
->
SetValue
(
g_
pcb_plot_options
.
Sel_Texte_Invisible
);
m_Plot_Invisible_Text
->
SetValue
(
g_
PcbPlotOptions
.
m_PlotInvisibleTexts
);
// Options to plot pads and vias holes
// Options to plot pads and vias holes
m_Drill_Shape_Opt
->
SetSelection
(
g_
pcb_plot_options
.
DrillShapeOpt
);
m_Drill_Shape_Opt
->
SetSelection
(
g_
PcbPlotOptions
.
m_
DrillShapeOpt
);
// Scale option
// Scale option
m_Scale_Opt
->
SetSelection
(
g_pcb_plot_options
.
PlotScaleOpt
);
m_Scale_Opt
->
SetSelection
(
m_dlg
PlotScaleOpt
);
// Plot mode
// Plot mode
m_PlotModeOpt
->
SetSelection
(
g_
pcb_plot_o
ptions
.
Trace_Mode
);
m_PlotModeOpt
->
SetSelection
(
g_
PcbPlotO
ptions
.
Trace_Mode
);
// Plot mirror option
// Plot mirror option
m_PlotMirorOpt
->
SetValue
(
g_
pcb_plot_options
.
Plot_Set_MIROIR
);
m_PlotMirorOpt
->
SetValue
(
g_
PcbPlotOptions
.
m_PlotMirror
);
// Put vias on mask layer
// Put vias on mask layer
m_PlotNoViaOnMaskOpt
->
SetValue
(
g_
pcb_plot_options
.
Draw
ViaOnMaskLayer
);
m_PlotNoViaOnMaskOpt
->
SetValue
(
g_
PcbPlotOptions
.
m_Plot
ViaOnMaskLayer
);
// Output directory
// Output directory
if
(
g_
pcb_plot_o
ptions
.
GetOutputDirectory
().
IsEmpty
()
)
if
(
g_
PcbPlotO
ptions
.
GetOutputDirectory
().
IsEmpty
()
)
{
{
fileName
=
m_Parent
->
GetScreen
()
->
m_FileName
;
fileName
=
m_Parent
->
GetScreen
()
->
m_FileName
;
m_OutputDirectory
->
SetValue
(
fileName
.
GetPath
()
);
m_OutputDirectory
->
SetValue
(
fileName
.
GetPath
()
);
}
}
else
else
{
{
m_OutputDirectory
->
SetValue
(
g_
pcb_plot_o
ptions
.
GetOutputDirectory
()
);
m_OutputDirectory
->
SetValue
(
g_
PcbPlotO
ptions
.
GetOutputDirectory
()
);
}
}
// Update options values:
// Update options values:
...
@@ -302,7 +303,7 @@ void DIALOG_PLOT::Init_Dialog()
...
@@ -302,7 +303,7 @@ void DIALOG_PLOT::Init_Dialog()
}
}
void
DIALOG_PLOT
::
OnQuit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
DIALOG_PLOT
::
OnQuit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
{
Close
(
true
);
// true is to force the frame to close
Close
(
true
);
// true is to force the frame to close
}
}
...
@@ -331,9 +332,11 @@ void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event )
...
@@ -331,9 +332,11 @@ void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event )
m_Plot_Sheet_Ref
->
SetValue
(
false
);
m_Plot_Sheet_Ref
->
SetValue
(
false
);
}
}
void
DIALOG_PLOT
::
OnOutputDirectoryBrowseClicked
(
wxCommandEvent
&
event
)
void
DIALOG_PLOT
::
OnOutputDirectoryBrowseClicked
(
wxCommandEvent
&
event
)
{
{
wxString
currentDir
;
wxString
currentDir
;
currentDir
=
m_OutputDirectory
->
GetValue
();
currentDir
=
m_OutputDirectory
->
GetValue
();
wxDirDialog
dirDialog
(
this
,
_
(
"Select Output Directory"
),
currentDir
);
wxDirDialog
dirDialog
(
this
,
_
(
"Select Output Directory"
),
currentDir
);
if
(
dirDialog
.
ShowModal
()
==
wxID_CANCEL
)
if
(
dirDialog
.
ShowModal
()
==
wxID_CANCEL
)
...
@@ -341,6 +344,7 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
...
@@ -341,6 +344,7 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
m_OutputDirectory
->
SetValue
(
dirDialog
.
GetPath
()
);
m_OutputDirectory
->
SetValue
(
dirDialog
.
GetPath
()
);
}
}
void
DIALOG_PLOT
::
SetPlotFormat
(
wxCommandEvent
&
event
)
void
DIALOG_PLOT
::
SetPlotFormat
(
wxCommandEvent
&
event
)
{
{
int
format
=
getFormat
();
int
format
=
getFormat
();
...
@@ -357,14 +361,14 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
...
@@ -357,14 +361,14 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_HPGLPenSizeOpt
->
Enable
(
false
);
m_HPGLPenSizeOpt
->
Enable
(
false
);
m_HPGLPenSpeedOpt
->
Enable
(
false
);
m_HPGLPenSpeedOpt
->
Enable
(
false
);
m_HPGLPenOverlayOpt
->
Enable
(
false
);
m_HPGLPenOverlayOpt
->
Enable
(
false
);
m_
Exclude_Edges_Pcb
->
SetValue
(
false
);
m_
excludeEdgeLayerOpt
->
SetValue
(
false
);
m_
Exclude_Edges_Pcb
->
Enable
(
false
);
m_
excludeEdgeLayerOpt
->
Enable
(
false
);
m_SubtractMaskFromSilk
->
Enable
(
false
);
m_SubtractMaskFromSilk
->
Enable
(
false
);
m_Use_Gerber_Extensions
->
Enable
(
false
);
m_Use_Gerber_Extensions
->
Enable
(
false
);
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_
Plot_PS_Negative
->
Enable
(
true
);
m_
plotPSNegativeOpt
->
Enable
(
true
);
break
;
break
;
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
...
@@ -378,15 +382,15 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
...
@@ -378,15 +382,15 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_HPGLPenSizeOpt
->
Enable
(
false
);
m_HPGLPenSizeOpt
->
Enable
(
false
);
m_HPGLPenSpeedOpt
->
Enable
(
false
);
m_HPGLPenSpeedOpt
->
Enable
(
false
);
m_HPGLPenOverlayOpt
->
Enable
(
false
);
m_HPGLPenOverlayOpt
->
Enable
(
false
);
m_
Exclude_Edges_Pcb
->
Enable
(
true
);
m_
excludeEdgeLayerOpt
->
Enable
(
true
);
m_SubtractMaskFromSilk
->
Enable
(
true
);
m_SubtractMaskFromSilk
->
Enable
(
true
);
m_Use_Gerber_Extensions
->
Enable
(
true
);
m_Use_Gerber_Extensions
->
Enable
(
true
);
m_Scale_Opt
->
SetSelection
(
1
);
m_Scale_Opt
->
SetSelection
(
1
);
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_
Plot_PS_Negative
->
SetValue
(
false
);
m_
plotPSNegativeOpt
->
SetValue
(
false
);
m_
Plot_PS_Negative
->
Enable
(
false
);
m_
plotPSNegativeOpt
->
Enable
(
false
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
...
@@ -398,15 +402,15 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
...
@@ -398,15 +402,15 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_HPGLPenSizeOpt
->
Enable
(
true
);
m_HPGLPenSizeOpt
->
Enable
(
true
);
m_HPGLPenSpeedOpt
->
Enable
(
true
);
m_HPGLPenSpeedOpt
->
Enable
(
true
);
m_HPGLPenOverlayOpt
->
Enable
(
true
);
m_HPGLPenOverlayOpt
->
Enable
(
true
);
m_
Exclude_Edges_Pcb
->
SetValue
(
false
);
m_
excludeEdgeLayerOpt
->
SetValue
(
false
);
m_
Exclude_Edges_Pcb
->
Enable
(
false
);
m_
excludeEdgeLayerOpt
->
Enable
(
false
);
m_SubtractMaskFromSilk
->
Enable
(
false
);
m_SubtractMaskFromSilk
->
Enable
(
false
);
m_Use_Gerber_Extensions
->
Enable
(
false
);
m_Use_Gerber_Extensions
->
Enable
(
false
);
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_
Plot_PS_Negative
->
SetValue
(
false
);
m_
plotPSNegativeOpt
->
SetValue
(
false
);
m_
Plot_PS_Negative
->
Enable
(
false
);
m_
plotPSNegativeOpt
->
Enable
(
false
);
break
;
break
;
case
PLOT_FORMAT_DXF
:
case
PLOT_FORMAT_DXF
:
...
@@ -419,70 +423,65 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
...
@@ -419,70 +423,65 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_HPGLPenSizeOpt
->
Enable
(
false
);
m_HPGLPenSizeOpt
->
Enable
(
false
);
m_HPGLPenSpeedOpt
->
Enable
(
false
);
m_HPGLPenSpeedOpt
->
Enable
(
false
);
m_HPGLPenOverlayOpt
->
Enable
(
false
);
m_HPGLPenOverlayOpt
->
Enable
(
false
);
m_
Exclude_Edges_Pcb
->
SetValue
(
false
);
m_
excludeEdgeLayerOpt
->
SetValue
(
false
);
m_
Exclude_Edges_Pcb
->
Enable
(
false
);
m_
excludeEdgeLayerOpt
->
Enable
(
false
);
m_SubtractMaskFromSilk
->
Enable
(
false
);
m_SubtractMaskFromSilk
->
Enable
(
false
);
m_Use_Gerber_Extensions
->
Enable
(
false
);
m_Use_Gerber_Extensions
->
Enable
(
false
);
m_Scale_Opt
->
Enable
(
false
);
m_Scale_Opt
->
Enable
(
false
);
m_Scale_Opt
->
SetSelection
(
1
);
m_Scale_Opt
->
SetSelection
(
1
);
m_FineAdjustXscaleOpt
->
Enable
(
false
);
m_FineAdjustXscaleOpt
->
Enable
(
false
);
m_FineAdjustYscaleOpt
->
Enable
(
false
);
m_FineAdjustYscaleOpt
->
Enable
(
false
);
m_
Plot_PS_Negative
->
SetValue
(
false
);
m_
plotPSNegativeOpt
->
SetValue
(
false
);
m_
Plot_PS_Negative
->
Enable
(
false
);
m_
plotPSNegativeOpt
->
Enable
(
false
);
break
;
break
;
}
}
g_
pcb_plot_options
.
PlotFormat
=
format
;
g_
PcbPlotOptions
.
m_
PlotFormat
=
format
;
}
}
void
DIALOG_PLOT
::
SaveOptPlot
(
wxCommandEvent
&
event
)
void
DIALOG_PLOT
::
SaveOptPlot
(
wxCommandEvent
&
event
)
{
{
g_
pcb_plot_options
.
Exclude_Edges_Pcb
=
m_Exclude_Edges_Pcb
->
GetValue
();
g_
PcbPlotOptions
.
m_ExcludeEdgeLayer
=
m_excludeEdgeLayerOpt
->
GetValue
();
g_
pcb_plot_o
ptions
.
SetSubtractMaskFromSilk
(
m_SubtractMaskFromSilk
->
GetValue
()
);
g_
PcbPlotO
ptions
.
SetSubtractMaskFromSilk
(
m_SubtractMaskFromSilk
->
GetValue
()
);
if
(
m_Plot_Sheet_Ref
)
if
(
m_Plot_Sheet_Ref
)
g_
pcb_plot_options
.
Plot_Frame_
Ref
=
m_Plot_Sheet_Ref
->
GetValue
();
g_
PcbPlotOptions
.
m_PlotFrame
Ref
=
m_Plot_Sheet_Ref
->
GetValue
();
g_
pcb_plot_options
.
PlotPadsOnSilkLayer
=
m_Plot_Pads_on_Silkscreen
->
GetValue
();
g_
PcbPlotOptions
.
m_PlotPadsOnSilkLayer
=
m_Plot_Pads_on_Silkscreen
->
GetValue
();
s_PlotOriginIsAuxAxis
=
s_PlotOriginIsAuxAxis
=
(
m_Choice_Plot_Offset
->
GetSelection
()
==
0
)
?
FALSE
:
TRUE
;
(
m_Choice_Plot_Offset
->
GetSelection
()
==
0
)
?
FALSE
:
TRUE
;
g_pcb_plot_options
.
Sel_Texte_Valeur
=
m_Plot_Text_Value
->
GetValue
();
g_PcbPlotOptions
.
m_PlotValue
=
m_Plot_Text_Value
->
GetValue
();
g_pcb_plot_options
.
Sel_Texte_Reference
=
m_Plot_Text_Ref
->
GetValue
();
g_PcbPlotOptions
.
m_PlotReference
=
m_Plot_Text_Ref
->
GetValue
();
g_pcb_plot_options
.
Sel_Texte_Divers
=
m_Plot_Text_Div
->
GetValue
();
g_PcbPlotOptions
.
m_PlotTextOther
=
m_Plot_Text_Div
->
GetValue
();
g_pcb_plot_options
.
Sel_Texte_Invisible
=
m_Plot_Invisible_Text
->
GetValue
();
g_PcbPlotOptions
.
m_PlotInvisibleTexts
=
m_Plot_Invisible_Text
->
GetValue
();
g_pcb_plot_options
.
PlotScaleOpt
=
m_Scale_Opt
->
GetSelection
();
m_dlgPlotScaleOpt
=
m_Scale_Opt
->
GetSelection
();
g_pcb_plot_options
.
DrillShapeOpt
=
g_PcbPlotOptions
.
m_DrillShapeOpt
=
(
PCB_Plot_Options
::
DrillShapeOptT
)
m_Drill_Shape_Opt
->
GetSelection
();
(
PCB_PLOT_PARAMS
::
DrillShapeOptT
)
m_Drill_Shape_Opt
->
GetSelection
();
g_pcb_plot_options
.
Plot_Set_MIROIR
=
m_PlotMirorOpt
->
GetValue
();
g_PcbPlotOptions
.
m_PlotMirror
=
m_PlotMirorOpt
->
GetValue
();
if
(
g_pcb_plot_options
.
Plot_Set_MIROIR
)
g_PcbPlotOptions
.
Trace_Mode
=
(
GRTraceMode
)
m_PlotModeOpt
->
GetSelection
();
g_pcb_plot_options
.
PlotOrient
=
PLOT_MIROIR
;
g_PcbPlotOptions
.
m_PlotViaOnMaskLayer
=
m_PlotNoViaOnMaskOpt
->
GetValue
();
else
g_pcb_plot_options
.
PlotOrient
=
0
;
g_pcb_plot_options
.
Trace_Mode
=
(
GRTraceMode
)
m_PlotModeOpt
->
GetSelection
();
g_pcb_plot_options
.
DrawViaOnMaskLayer
=
m_PlotNoViaOnMaskOpt
->
GetValue
();
wxString
msg
=
m_HPGLPenSizeOpt
->
GetValue
();
wxString
msg
=
m_HPGLPenSizeOpt
->
GetValue
();
int
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
UNITS_MILS
);
int
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
UNITS_MILS
);
g_
pcb_plot_options
.
HPGL_Pen_
Diam
=
tmp
;
g_
PcbPlotOptions
.
m_HPGLPen
Diam
=
tmp
;
msg
=
m_HPGLPenSpeedOpt
->
GetValue
();
msg
=
m_HPGLPenSpeedOpt
->
GetValue
();
tmp
=
ReturnValueFromString
(
MILLIMETRES
,
msg
,
1
);
tmp
=
ReturnValueFromString
(
MILLIMETRES
,
msg
,
1
);
g_
pcb_plot_options
.
HPGL_Pen_
Speed
=
tmp
;
g_
PcbPlotOptions
.
m_HPGLPen
Speed
=
tmp
;
msg
=
m_HPGLPenOverlayOpt
->
GetValue
();
msg
=
m_HPGLPenOverlayOpt
->
GetValue
();
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
UNITS_MILS
);
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
UNITS_MILS
);
g_
pcb_plot_options
.
HPGL_Pen_Recouvrement
=
tmp
;
g_
PcbPlotOptions
.
m_HPGLPenOvr
=
tmp
;
msg
=
m_LinesWidth
->
GetValue
();
msg
=
m_LinesWidth
->
GetValue
();
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
PCB_INTERNAL_UNIT
);
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
,
PCB_INTERNAL_UNIT
);
g_pcb_plot_options
.
PlotLine_Width
=
tmp
;
g_PcbPlotOptions
.
m_PlotLineWidth
=
tmp
;
g_DrawDefaultLineThickness
=
g_pcb_plot_options
.
PlotLine_Width
;
g_DrawDefaultLineThickness
=
g_PcbPlotOptions
.
m_PlotLineWidth
;
msg
=
m_FineAdjustXscaleOpt
->
GetValue
();
msg
=
m_FineAdjustXscaleOpt
->
GetValue
();
msg
.
ToDouble
(
&
m_XScaleAdjust
);
msg
.
ToDouble
(
&
m_XScaleAdjust
);
...
@@ -494,7 +493,7 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event )
...
@@ -494,7 +493,7 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event )
m_Config
->
Write
(
OPTKEY_XFINESCALE_ADJ
,
m_XScaleAdjust
);
m_Config
->
Write
(
OPTKEY_XFINESCALE_ADJ
,
m_XScaleAdjust
);
m_Config
->
Write
(
OPTKEY_YFINESCALE_ADJ
,
m_YScaleAdjust
);
m_Config
->
Write
(
OPTKEY_YFINESCALE_ADJ
,
m_YScaleAdjust
);
g_
pcb_plot_options
.
PlotFormat
=
m_PlotFormatOpt
->
GetSelection
();
g_
PcbPlotOptions
.
m_
PlotFormat
=
m_PlotFormatOpt
->
GetSelection
();
wxString
layerKey
;
wxString
layerKey
;
for
(
int
layer
=
0
;
layer
<
NB_LAYERS
;
++
layer
)
for
(
int
layer
=
0
;
layer
<
NB_LAYERS
;
++
layer
)
...
@@ -505,9 +504,9 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event )
...
@@ -505,9 +504,9 @@ void DIALOG_PLOT::SaveOptPlot( wxCommandEvent& event )
m_Config
->
Write
(
layerKey
,
m_BoxSelectLayer
[
layer
]
->
IsChecked
()
);
m_Config
->
Write
(
layerKey
,
m_BoxSelectLayer
[
layer
]
->
IsChecked
()
);
}
}
g_
pcb_plot_options
.
Plot_PS_Negative
=
m_Plot_PS_Negative
->
GetValue
();
g_
PcbPlotOptions
.
m_PlotPSNegative
=
m_plotPSNegativeOpt
->
GetValue
();
g_
pcb_plot_o
ptions
.
SetOutputDirectory
(
m_OutputDirectory
->
GetValue
()
);
g_
PcbPlotO
ptions
.
SetOutputDirectory
(
m_OutputDirectory
->
GetValue
()
);
}
}
...
@@ -537,22 +536,27 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
...
@@ -537,22 +536,27 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
}
}
}
}
switch
(
g_pcb_plot_options
.
PlotScaleOpt
)
g_PcbPlotOptions
.
m_AutoScale
=
false
;
g_PcbPlotOptions
.
m_PlotScale
=
1
;
switch
(
m_dlgPlotScaleOpt
)
{
{
default
:
default
:
g_pcb_plot_options
.
Scale
=
1
;
break
;
case
0
:
g_PcbPlotOptions
.
m_AutoScale
=
true
;
break
;
break
;
case
2
:
case
2
:
g_
pcb_plot_options
.
Scale
=
1.5
;
g_
PcbPlotOptions
.
m_Plot
Scale
=
1.5
;
break
;
break
;
case
3
:
case
3
:
g_
pcb_plot_options
.
Scale
=
2
;
g_
PcbPlotOptions
.
m_Plot
Scale
=
2
;
break
;
break
;
case
4
:
case
4
:
g_
pcb_plot_options
.
Scale
=
3
;
g_
PcbPlotOptions
.
m_Plot
Scale
=
3
;
break
;
break
;
}
}
...
@@ -561,12 +565,10 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
...
@@ -561,12 +565,10 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
* the default scale adjust is initialized to 0 and saved in program
* the default scale adjust is initialized to 0 and saved in program
* settings resulting in a divide by zero fault.
* settings resulting in a divide by zero fault.
*/
*/
if
(
m_FineAdjustXscaleOpt
-
IsEnabled
()
if
(
m_FineAdjustXscaleOpt
->
IsEnabled
()
&&
m_XScaleAdjust
!=
0.0
)
&&
m_XScaleAdjust
!=
0.0
)
g_PcbPlotOptions
.
m_FineScaleAdjustX
=
m_XScaleAdjust
;
g_pcb_plot_options
.
ScaleAdjX
=
m_XScaleAdjust
;
if
(
m_FineAdjustYscaleOpt
->
IsEnabled
()
&&
m_YScaleAdjust
!=
0.0
)
if
(
m_FineAdjustYscaleOpt
->
IsEnabled
()
g_PcbPlotOptions
.
m_FineScaleAdjustY
=
m_YScaleAdjust
;
&&
m_YScaleAdjust
!=
0.0
)
g_pcb_plot_options
.
ScaleAdjY
=
m_YScaleAdjust
;
int
format
=
getFormat
();
int
format
=
getFormat
();
...
@@ -577,7 +579,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
...
@@ -577,7 +579,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
break
;
break
;
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
g_
pcb_plot_options
.
Scale
=
1.0
;
// No scale option allowed in gerber format
g_
PcbPlotOptions
.
m_Plot
Scale
=
1.0
;
// No scale option allowed in gerber format
ext
=
wxT
(
"pho"
);
ext
=
wxT
(
"pho"
);
break
;
break
;
...
@@ -586,16 +588,16 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
...
@@ -586,16 +588,16 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
break
;
break
;
case
PLOT_FORMAT_DXF
:
case
PLOT_FORMAT_DXF
:
g_
pcb_plot_options
.
Scale
=
1.0
;
g_
PcbPlotOptions
.
m_Plot
Scale
=
1.0
;
ext
=
wxT
(
"dxf"
);
ext
=
wxT
(
"dxf"
);
break
;
break
;
}
}
// Test for a reasonable scale value
// Test for a reasonable scale value
if
(
g_
pcb_plot_options
.
Scale
<
MIN_SCALE
)
if
(
g_
PcbPlotOptions
.
m_Plot
Scale
<
MIN_SCALE
)
DisplayInfoMessage
(
this
,
DisplayInfoMessage
(
this
,
_
(
"Warning: Scale option set to a very small value"
)
);
_
(
"Warning: Scale option set to a very small value"
)
);
if
(
g_
pcb_plot_options
.
Scale
>
MAX_SCALE
)
if
(
g_
PcbPlotOptions
.
m_Plot
Scale
>
MAX_SCALE
)
DisplayInfoMessage
(
this
,
DisplayInfoMessage
(
this
,
_
(
"Warning: Scale option set to a very large value"
)
);
_
(
"Warning: Scale option set to a very large value"
)
);
...
@@ -704,23 +706,23 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
...
@@ -704,23 +706,23 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
{
{
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
success
=
m_Parent
->
Genere_PS
(
fn
.
GetFullPath
(),
layer
,
useA4
(),
success
=
m_Parent
->
Genere_PS
(
fn
.
GetFullPath
(),
layer
,
useA4
(),
g_
pcb_plot_o
ptions
.
Trace_Mode
);
g_
PcbPlotO
ptions
.
Trace_Mode
);
break
;
break
;
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
success
=
m_Parent
->
Genere_GERBER
(
fn
.
GetFullPath
(),
layer
,
success
=
m_Parent
->
Genere_GERBER
(
fn
.
GetFullPath
(),
layer
,
s_PlotOriginIsAuxAxis
,
s_PlotOriginIsAuxAxis
,
g_
pcb_plot_o
ptions
.
Trace_Mode
);
g_
PcbPlotO
ptions
.
Trace_Mode
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
success
=
m_Parent
->
Genere_HPGL
(
fn
.
GetFullPath
(),
layer
,
success
=
m_Parent
->
Genere_HPGL
(
fn
.
GetFullPath
(),
layer
,
g_
pcb_plot_o
ptions
.
Trace_Mode
);
g_
PcbPlotO
ptions
.
Trace_Mode
);
break
;
break
;
case
PLOT_FORMAT_DXF
:
case
PLOT_FORMAT_DXF
:
success
=
m_Parent
->
Genere_DXF
(
fn
.
GetFullPath
(),
layer
,
success
=
m_Parent
->
Genere_DXF
(
fn
.
GetFullPath
(),
layer
,
g_
pcb_plot_o
ptions
.
Trace_Mode
);
g_
PcbPlotO
ptions
.
Trace_Mode
);
break
;
break
;
}
}
...
@@ -745,8 +747,6 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
...
@@ -745,8 +747,6 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
void
WinEDA_PcbFrame
::
ToPlotter
(
wxCommandEvent
&
event
)
void
WinEDA_PcbFrame
::
ToPlotter
(
wxCommandEvent
&
event
)
{
{
DIALOG_PLOT
*
frame
=
new
DIALOG_PLOT
(
this
);
DIALOG_PLOT
dlg
(
this
);
dlg
.
ShowModal
();
frame
->
ShowModal
();
frame
->
Destroy
();
}
}
pcbnew/pcbplot.h
View file @
e9f557e6
...
@@ -25,58 +25,64 @@
...
@@ -25,58 +25,64 @@
// Small drill marks diameter value (in internal value = 1/10000 inch)
// Small drill marks diameter value (in internal value = 1/10000 inch)
#define SMALL_DRILL 150
#define SMALL_DRILL 150
/* Plot Options : */
/* a helper class to handle plot parameters and options when plotting/printing a board
class
PCB_Plot_Options
*/
class
PCB_PLOT_PARAMS
{
{
public
:
public
:
bool
Exclude_Edges_Pcb
;
bool
m_ExcludeEdgeLayer
;
// True: do not plot edge layer when plotting other layers
int
PlotLine_Width
;
// False: Edge layer always plotted (merged) when plotting other layers
bool
Plot_Frame_Ref
;
// True to plot/print frame references
int
m_PlotLineWidth
;
bool
DrawViaOnMaskLayer
;
// True if vias are drawn on Mask layer
bool
m_PlotFrameRef
;
// True to plot/print frame references
bool
m_PlotViaOnMaskLayer
;
// True if vias are drawn on Mask layer
// (ie protected by mask)
// (ie protected by mask)
GRTraceMode
Trace_Mode
;
GRTraceMode
Trace_Mode
;
bool
Plot_Set_MIROIR
;
int
m_HPGLPenNum
;
int
HPGL_Pen_Num
;
int
m_HPGLPenSpeed
;
int
HPGL_Pen_Speed
;
int
m_HPGLPenDiam
;
int
HPGL_Pen_Diam
;
int
m_HPGLPenOvr
;
int
HPGL_Pen_Recouvrement
;
int
m_PlotPSColorOpt
;
// True for color Postscript output
int
PlotPSColorOpt
;
// True for color Postscript output
bool
m_PlotPSNegative
;
// True to create a negative board ps plot
bool
Plot_PS_Negative
;
// True to create a negative board ps plot
/* Flags to enable or disable ploting of various PCB elements. */
/* Flags to enable or disable ploting of various PCB elements. */
bool
Sel_Texte_
Reference
;
bool
m_Plot
Reference
;
bool
Sel_Texte_Valeur
;
bool
m_PlotValue
;
bool
Sel_Texte_Divers
;
bool
m_PlotTextOther
;
bool
Sel_Texte_Invisible
;
bool
m_PlotInvisibleTexts
;
bool
PlotPadsOnSilkLayer
;
/* allows pads on silkscreen */
bool
m_PlotPadsOnSilkLayer
;
// allows pads outlines on silkscreen layer (when pads are also o, silk screen
bool
m_SubtractMaskFromSilk
;
bool
m_SubtractMaskFromSilk
;
/* id for plot format (see enum PlotFormat in plot_common.h) */
/* id for plot format (see enum PlotFormat in plot_common.h) */
int
PlotFormat
;
int
m_PlotFormat
;
// Gerber, HPGL ...
int
PlotOrient
;
bool
m_PlotMirror
;
int
PlotScaleOpt
;
enum
DrillShapeOptT
{
enum
DrillShapeOptT
{
NO_DRILL_SHAPE
=
0
,
NO_DRILL_SHAPE
=
0
,
SMALL_DRILL_SHAPE
=
1
,
SMALL_DRILL_SHAPE
=
1
,
FULL_DRILL_SHAPE
=
2
FULL_DRILL_SHAPE
=
2
};
};
DrillShapeOptT
DrillShapeOpt
;
DrillShapeOptT
m_DrillShapeOpt
;
// For postscript output: holes can be not plotted,
double
Scale
;
// or have a small size or plotted with their actual size
double
ScaleAdjX
;
bool
m_AutoScale
;
// If true, use the better scale to fit in page
double
ScaleAdjY
;
double
m_PlotScale
;
// The global scale factor. a 1.0 scale factor plot a board
// 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.
double
m_FineScaleAdjustX
;
// fine scale adjust X axis
double
m_FineScaleAdjustY
;
// dine scale adjust Y axis
private
:
private
:
wxString
outputDirectory
;
wxString
outputDirectory
;
public
:
public
:
PCB_PLOT_PARAMS
();
PCB_Plot_Options
();
void
SetOutputDirectory
(
wxString
aDir
)
{
outputDirectory
=
aDir
;
};
void
SetOutputDirectory
(
wxString
aDir
)
{
outputDirectory
=
aDir
;
};
wxString
GetOutputDirectory
()
{
return
outputDirectory
;
};
wxString
GetOutputDirectory
()
{
return
outputDirectory
;
};
void
SetSubtractMaskFromSilk
(
bool
aSubtract
)
{
m_SubtractMaskFromSilk
=
aSubtract
;
};
void
SetSubtractMaskFromSilk
(
bool
aSubtract
)
{
m_SubtractMaskFromSilk
=
aSubtract
;
};
bool
GetSubtractMaskFromSilk
()
{
return
m_SubtractMaskFromSilk
;
};
bool
GetSubtractMaskFromSilk
()
{
return
m_SubtractMaskFromSilk
;
};
};
};
extern
PCB_P
lot_Options
g_pcb_plot_o
ptions
;
extern
PCB_P
LOT_PARAMS
g_PcbPlotO
ptions
;
void
PlotTextePcb
(
PLOTTER
*
plotter
,
TEXTE_PCB
*
pt_texte
,
int
masque_layer
,
void
PlotTextePcb
(
PLOTTER
*
plotter
,
TEXTE_PCB
*
pt_texte
,
int
masque_layer
,
...
...
pcbnew/plot_rtn.cpp
View file @
e9f557e6
...
@@ -67,7 +67,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
...
@@ -67,7 +67,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
/* Plot pads (creates pads outlines, for pads on silkscreen layers) */
/* Plot pads (creates pads outlines, for pads on silkscreen layers) */
int
layersmask_plotpads
=
masque_layer
;
int
layersmask_plotpads
=
masque_layer
;
// Calculate the mask layers of allowed layers for pads
// Calculate the mask layers of allowed layers for pads
if
(
!
g_
pcb_plot_options
.
PlotPadsOnSilkLayer
)
// Do not plot pads on silk screen layers
if
(
!
g_
PcbPlotOptions
.
m_
PlotPadsOnSilkLayer
)
// Do not plot pads on silk screen layers
layersmask_plotpads
&=
~
(
SILKSCREEN_LAYER_BACK
|
SILKSCREEN_LAYER_FRONT
);
layersmask_plotpads
&=
~
(
SILKSCREEN_LAYER_BACK
|
SILKSCREEN_LAYER_FRONT
);
if
(
layersmask_plotpads
)
if
(
layersmask_plotpads
)
{
{
...
@@ -112,8 +112,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
...
@@ -112,8 +112,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
for
(
MODULE
*
Module
=
m_Pcb
->
m_Modules
;
Module
;
Module
=
Module
->
Next
()
)
for
(
MODULE
*
Module
=
m_Pcb
->
m_Modules
;
Module
;
Module
=
Module
->
Next
()
)
{
{
/* see if we want to plot VALUE and REF fields */
/* see if we want to plot VALUE and REF fields */
trace_val
=
g_
pcb_plot_options
.
Sel_Texte_Valeur
;
trace_val
=
g_
PcbPlotOptions
.
m_PlotValue
;
trace_ref
=
g_
pcb_plot_options
.
Sel_Texte_
Reference
;
trace_ref
=
g_
PcbPlotOptions
.
m_Plot
Reference
;
TEXTE_MODULE
*
text
=
Module
->
m_Reference
;
TEXTE_MODULE
*
text
=
Module
->
m_Reference
;
unsigned
textLayer
=
text
->
GetLayer
();
unsigned
textLayer
=
text
->
GetLayer
();
...
@@ -132,7 +132,7 @@ module\n %s's \"reference\" text." ),
...
@@ -132,7 +132,7 @@ module\n %s's \"reference\" text." ),
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
trace_ref
=
FALSE
;
trace_ref
=
FALSE
;
if
(
text
->
m_NoShow
&&
!
g_
pcb_plot_options
.
Sel_Texte_Invisible
)
if
(
text
->
m_NoShow
&&
!
g_
PcbPlotOptions
.
m_PlotInvisibleTexts
)
trace_ref
=
FALSE
;
trace_ref
=
FALSE
;
text
=
Module
->
m_Value
;
text
=
Module
->
m_Value
;
...
@@ -152,7 +152,7 @@ module\n %s's \"value\" text." ),
...
@@ -152,7 +152,7 @@ module\n %s's \"value\" text." ),
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
trace_val
=
FALSE
;
trace_val
=
FALSE
;
if
(
text
->
m_NoShow
&&
!
g_
pcb_plot_options
.
Sel_Texte_Invisible
)
if
(
text
->
m_NoShow
&&
!
g_
PcbPlotOptions
.
m_PlotInvisibleTexts
)
trace_val
=
FALSE
;
trace_val
=
FALSE
;
/* Plot text fields, if allowed */
/* Plot text fields, if allowed */
...
@@ -169,10 +169,10 @@ module\n %s's \"value\" text." ),
...
@@ -169,10 +169,10 @@ module\n %s's \"value\" text." ),
if
(
pt_texte
->
Type
()
!=
TYPE_TEXTE_MODULE
)
if
(
pt_texte
->
Type
()
!=
TYPE_TEXTE_MODULE
)
continue
;
continue
;
if
(
!
g_
pcb_plot_options
.
Sel_Texte_Divers
)
if
(
!
g_
PcbPlotOptions
.
m_PlotTextOther
)
continue
;
continue
;
if
(
(
pt_texte
->
m_NoShow
)
if
(
(
pt_texte
->
m_NoShow
)
&&
!
g_
pcb_plot_options
.
Sel_Texte_Invisible
)
&&
!
g_
PcbPlotOptions
.
m_PlotInvisibleTexts
)
continue
;
continue
;
textLayer
=
pt_texte
->
GetLayer
();
textLayer
=
pt_texte
->
GetLayer
();
...
@@ -644,7 +644,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* pt_segm, int masque_layer,
...
@@ -644,7 +644,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* pt_segm, int masque_layer,
return
;
return
;
if
(
trace_mode
==
FILAIRE
)
if
(
trace_mode
==
FILAIRE
)
thickness
=
g_
pcb_plot_options
.
PlotLine_
Width
;
thickness
=
g_
PcbPlotOptions
.
m_PlotLine
Width
;
else
else
thickness
=
pt_segm
->
m_Width
;
thickness
=
pt_segm
->
m_Width
;
...
@@ -697,7 +697,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
...
@@ -697,7 +697,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// in addition to the contents of the currently specified layer.
// in addition to the contents of the currently specified layer.
int
layer_mask
=
g_TabOneLayerMask
[
Layer
];
int
layer_mask
=
g_TabOneLayerMask
[
Layer
];
if
(
!
g_
pcb_plot_options
.
Exclude_Edges_Pcb
)
if
(
!
g_
PcbPlotOptions
.
m_ExcludeEdgeLayer
)
layer_mask
|=
EDGE_LAYER
;
layer_mask
|=
EDGE_LAYER
;
switch
(
Layer
)
switch
(
Layer
)
...
@@ -722,21 +722,19 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
...
@@ -722,21 +722,19 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// Adding drill marks, if required and if the plotter is able to plot
// Adding drill marks, if required and if the plotter is able to plot
// them:
// them:
if
(
g_pcb_plot_options
.
DrillShapeOpt
!=
if
(
g_PcbPlotOptions
.
m_DrillShapeOpt
!=
PCB_PLOT_PARAMS
::
NO_DRILL_SHAPE
)
PCB_Plot_Options
::
NO_DRILL_SHAPE
)
{
{
if
(
plotter
->
GetPlotterType
()
==
PLOT_FORMAT_POST
)
if
(
plotter
->
GetPlotterType
()
==
PLOT_FORMAT_POST
)
PlotDrillMark
(
plotter
,
PlotDrillMark
(
plotter
,
trace_mode
,
trace_mode
,
g_PcbPlotOptions
.
m_DrillShapeOpt
==
g_pcb_plot_options
.
DrillShapeOpt
==
PCB_PLOT_PARAMS
::
SMALL_DRILL_SHAPE
);
PCB_Plot_Options
::
SMALL_DRILL_SHAPE
);
}
}
break
;
break
;
case
SOLDERMASK_N_BACK
:
case
SOLDERMASK_N_BACK
:
case
SOLDERMASK_N_FRONT
:
case
SOLDERMASK_N_FRONT
:
Plot_Standard_Layer
(
plotter
,
layer_mask
,
Plot_Standard_Layer
(
plotter
,
layer_mask
,
g_
pcb_plot_options
.
Draw
ViaOnMaskLayer
,
trace_mode
);
g_
PcbPlotOptions
.
m_Plot
ViaOnMaskLayer
,
trace_mode
);
break
;
break
;
case
SOLDERPASTE_N_BACK
:
case
SOLDERPASTE_N_BACK
:
...
@@ -749,7 +747,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
...
@@ -749,7 +747,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// Gerber: Subtract soldermask from silkscreen if enabled
// Gerber: Subtract soldermask from silkscreen if enabled
if
(
plotter
->
GetPlotterType
()
==
PLOT_FORMAT_GERBER
if
(
plotter
->
GetPlotterType
()
==
PLOT_FORMAT_GERBER
&&
g_
pcb_plot_o
ptions
.
GetSubtractMaskFromSilk
()
)
&&
g_
PcbPlotO
ptions
.
GetSubtractMaskFromSilk
()
)
{
{
if
(
Layer
==
SILKSCREEN_N_FRONT
)
if
(
Layer
==
SILKSCREEN_N_FRONT
)
{
{
...
@@ -763,7 +761,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
...
@@ -763,7 +761,7 @@ void WinEDA_BasePcbFrame::Plot_Layer( PLOTTER* plotter, int Layer,
// Set layer polarity to negative
// Set layer polarity to negative
plotter
->
SetLayerPolarity
(
false
);
plotter
->
SetLayerPolarity
(
false
);
Plot_Standard_Layer
(
plotter
,
layer_mask
,
Plot_Standard_Layer
(
plotter
,
layer_mask
,
g_
pcb_plot_options
.
Draw
ViaOnMaskLayer
,
g_
PcbPlotOptions
.
m_Plot
ViaOnMaskLayer
,
trace_mode
);
trace_mode
);
}
}
break
;
break
;
...
@@ -1013,8 +1011,7 @@ void WinEDA_BasePcbFrame::PlotDrillMark( PLOTTER* aPlotter,
...
@@ -1013,8 +1011,7 @@ void WinEDA_BasePcbFrame::PlotDrillMark( PLOTTER* aPlotter,
if
(
pts
->
Type
()
!=
TYPE_VIA
)
if
(
pts
->
Type
()
!=
TYPE_VIA
)
continue
;
continue
;
pos
=
pts
->
m_Start
;
pos
=
pts
->
m_Start
;
if
(
g_pcb_plot_options
.
DrillShapeOpt
==
if
(
g_PcbPlotOptions
.
m_DrillShapeOpt
==
PCB_PLOT_PARAMS
::
SMALL_DRILL_SHAPE
)
PCB_Plot_Options
::
SMALL_DRILL_SHAPE
)
diam
.
x
=
diam
.
y
=
SMALL_DRILL
;
diam
.
x
=
diam
.
y
=
SMALL_DRILL
;
else
else
diam
.
x
=
diam
.
y
=
pts
->
GetDrillValue
();
diam
.
x
=
diam
.
y
=
pts
->
GetDrillValue
();
...
...
pcbnew/plotdxf.cpp
View file @
e9f557e6
...
@@ -32,7 +32,7 @@ bool WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
...
@@ -32,7 +32,7 @@ bool WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
plotter
->
set_filename
(
FullFileName
);
plotter
->
set_filename
(
FullFileName
);
plotter
->
start_plot
(
output_file
);
plotter
->
start_plot
(
output_file
);
if
(
g_
pcb_plot_options
.
Plot_Frame_
Ref
)
if
(
g_
PcbPlotOptions
.
m_PlotFrame
Ref
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
);
Plot_Layer
(
plotter
,
Layer
,
trace_mode
);
Plot_Layer
(
plotter
,
Layer
,
trace_mode
);
...
...
pcbnew/plotgerb.cpp
View file @
e9f557e6
...
@@ -42,7 +42,7 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
...
@@ -42,7 +42,7 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
wxPoint
offset
;
wxPoint
offset
;
/* Calculate scaling from pcbnew units (in 0.1 mil or 0.0001 inch) to gerber units */
/* Calculate scaling from pcbnew units (in 0.1 mil or 0.0001 inch) to gerber units */
double
scale
=
g_
pcb_plot_options
.
Scale
;
double
scale
=
g_
PcbPlotOptions
.
m_Plot
Scale
;
if
(
PlotOriginIsAuxAxis
)
if
(
PlotOriginIsAuxAxis
)
offset
=
m_Auxiliary_Axis_Position
;
offset
=
m_Auxiliary_Axis_Position
;
...
@@ -56,17 +56,17 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
...
@@ -56,17 +56,17 @@ bool WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
PLOTTER
*
plotter
=
new
GERBER_PLOTTER
();
PLOTTER
*
plotter
=
new
GERBER_PLOTTER
();
/* No mirror and scaling for gerbers! */
/* No mirror and scaling for gerbers! */
plotter
->
set_viewport
(
offset
,
scale
,
0
);
plotter
->
set_viewport
(
offset
,
scale
,
0
);
plotter
->
set_default_line_width
(
g_
pcb_plot_options
.
PlotLine_
Width
);
plotter
->
set_default_line_width
(
g_
PcbPlotOptions
.
m_PlotLine
Width
);
plotter
->
set_creator
(
wxT
(
"PCBNEW-RS274X"
)
);
plotter
->
set_creator
(
wxT
(
"PCBNEW-RS274X"
)
);
plotter
->
set_filename
(
FullFileName
);
plotter
->
set_filename
(
FullFileName
);
if
(
plotter
->
start_plot
(
output_file
)
)
if
(
plotter
->
start_plot
(
output_file
)
)
{
{
// Sheet refs on gerber CAN be useful... and they're always 1:1
// Sheet refs on gerber CAN be useful... and they're always 1:1
if
(
g_
pcb_plot_options
.
Plot_Frame_
Ref
)
if
(
g_
PcbPlotOptions
.
m_PlotFrame
Ref
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
);
Plot_Layer
(
plotter
,
Layer
,
trace_mode
);
Plot_Layer
(
plotter
,
Layer
,
trace_mode
);
plotter
->
end_plot
();
plotter
->
end_plot
();
}
}
...
...
pcbnew/plothpgl.cpp
View file @
e9f557e6
...
@@ -29,26 +29,26 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
...
@@ -29,26 +29,26 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
{
{
return
false
;
return
false
;
}
}
// Compute pen_dim (from g_
HPGL_Pen_
Diam in mils) in pcb units,
// Compute pen_dim (from g_
m_HPGLPen
Diam in mils) in pcb units,
// with plot scale (if Scale is 2, pen diameter is always g_
HPGL_Pen_
Diam
// with plot scale (if Scale is 2, pen diameter is always g_
m_HPGLPen
Diam
// so apparent pen diam is real pen diam / Scale
// so apparent pen diam is real pen diam / Scale
int
pen_diam
=
wxRound
(
(
g_
pcb_plot_options
.
HPGL_Pen_Diam
*
U_PCB
)
/
g_pcb_plot_options
.
Scale
);
int
pen_diam
=
wxRound
(
(
g_
PcbPlotOptions
.
m_HPGLPenDiam
*
U_PCB
)
/
g_PcbPlotOptions
.
m_Plot
Scale
);
// compute pen_
recouvrement (from g_HPGL_Pen_Recouvrement
in mils)
// compute pen_
overlay (from g_m_HPGLPenOvr
in mils)
// with plot scale
// with plot scale
if
(
g_
pcb_plot_options
.
HPGL_Pen_Recouvrement
<
0
)
if
(
g_
PcbPlotOptions
.
m_HPGLPenOvr
<
0
)
g_
pcb_plot_options
.
HPGL_Pen_Recouvrement
=
0
;
g_
PcbPlotOptions
.
m_HPGLPenOvr
=
0
;
if
(
g_
pcb_plot_options
.
HPGL_Pen_Recouvrement
>=
g_pcb_plot_options
.
HPGL_Pen_
Diam
)
if
(
g_
PcbPlotOptions
.
m_HPGLPenOvr
>=
g_PcbPlotOptions
.
m_HPGLPen
Diam
)
g_
pcb_plot_options
.
HPGL_Pen_Recouvrement
=
g_pcb_plot_options
.
HPGL_Pen_
Diam
-
1
;
g_
PcbPlotOptions
.
m_HPGLPenOvr
=
g_PcbPlotOptions
.
m_HPGLPen
Diam
-
1
;
int
pen_
recouvrement
=
wxRound
(
int
pen_
overlay
=
wxRound
(
g_
pcb_plot_options
.
HPGL_Pen_Recouvrement
*
10.0
/
g_pcb_plot_options
.
Scale
);
g_
PcbPlotOptions
.
m_HPGLPenOvr
*
10.0
/
g_PcbPlotOptions
.
m_Plot
Scale
);
SetLocaleTo_C_standard
();
SetLocaleTo_C_standard
();
if
(
g_
pcb_plot_options
.
PlotScaleOpt
!=
1
)
if
(
g_
PcbPlotOptions
.
m_PlotScale
!=
1.0
||
g_PcbPlotOptions
.
m_AutoScale
)
Center
=
TRUE
;
// Scale != 1 so center PCB plot.
Center
=
true
;
// when scale != 1.0 we must calculate the position in page
// because actual position has no meaning
// Scale units from 0.0001" to HPGL plot units.
// Scale units from 0.0001" to HPGL plot units.
SheetSize
.
x
=
currentsheet
->
m_Size
.
x
*
U_PCB
;
SheetSize
.
x
=
currentsheet
->
m_Size
.
x
*
U_PCB
;
...
@@ -59,7 +59,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
...
@@ -59,7 +59,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
BoardSize
=
m_Pcb
->
m_BoundaryBox
.
GetSize
();
BoardSize
=
m_Pcb
->
m_BoundaryBox
.
GetSize
();
BoardCenter
=
m_Pcb
->
m_BoundaryBox
.
Centre
();
BoardCenter
=
m_Pcb
->
m_BoundaryBox
.
Centre
();
if
(
g_
pcb_plot_options
.
PlotScaleOpt
==
0
)
// Optimum scale
if
(
g_
PcbPlotOptions
.
m_AutoScale
)
// Optimum scale
{
{
double
Xscale
,
Yscale
;
double
Xscale
,
Yscale
;
...
@@ -69,7 +69,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
...
@@ -69,7 +69,7 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
scale
=
MIN
(
Xscale
,
Yscale
);
scale
=
MIN
(
Xscale
,
Yscale
);
}
}
else
else
scale
=
g_
pcb_plot_options
.
Scale
;
scale
=
g_
PcbPlotOptions
.
m_Plot
Scale
;
// Calculate the page size offset.
// Calculate the page size offset.
if
(
Center
)
if
(
Center
)
...
@@ -87,20 +87,19 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
...
@@ -87,20 +87,19 @@ bool WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
HPGL_PLOTTER
*
plotter
=
new
HPGL_PLOTTER
();
HPGL_PLOTTER
*
plotter
=
new
HPGL_PLOTTER
();
plotter
->
set_paper_size
(
currentsheet
);
plotter
->
set_paper_size
(
currentsheet
);
plotter
->
set_viewport
(
offset
,
scale
,
plotter
->
set_viewport
(
offset
,
scale
,
g_PcbPlotOptions
.
m_PlotMirror
);
g_pcb_plot_options
.
PlotOrient
);
plotter
->
set_default_line_width
(
g_PcbPlotOptions
.
m_PlotLineWidth
);
plotter
->
set_default_line_width
(
g_pcb_plot_options
.
PlotLine_Width
);
plotter
->
set_creator
(
wxT
(
"PCBNEW-HPGL"
)
);
plotter
->
set_creator
(
wxT
(
"PCBNEW-HPGL"
)
);
plotter
->
set_filename
(
FullFileName
);
plotter
->
set_filename
(
FullFileName
);
plotter
->
set_pen_speed
(
g_
pcb_plot_options
.
HPGL_Pen_
Speed
);
plotter
->
set_pen_speed
(
g_
PcbPlotOptions
.
m_HPGLPen
Speed
);
plotter
->
set_pen_number
(
g_
pcb_plot_options
.
HPGL_Pen_
Num
);
plotter
->
set_pen_number
(
g_
PcbPlotOptions
.
m_HPGLPen
Num
);
plotter
->
set_pen_overlap
(
pen_
recouvrement
);
plotter
->
set_pen_overlap
(
pen_
overlay
);
plotter
->
set_pen_diameter
(
pen_diam
);
plotter
->
set_pen_diameter
(
pen_diam
);
plotter
->
start_plot
(
output_file
);
plotter
->
start_plot
(
output_file
);
/* The worksheet is not significant with scale!=1... It is with
/* The worksheet is not significant with scale!=1... It is with
* paperscale!=1, anyway */
* paperscale!=1, anyway */
if
(
g_
pcb_plot_options
.
Plot_Frame_
Ref
&&
!
Center
)
if
(
g_
PcbPlotOptions
.
m_PlotFrame
Ref
&&
!
Center
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
);
Plot_Layer
(
plotter
,
Layer
,
trace_mode
);
Plot_Layer
(
plotter
,
Layer
,
trace_mode
);
...
...
pcbnew/plotps.cpp
View file @
e9f557e6
...
@@ -37,12 +37,13 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
...
@@ -37,12 +37,13 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
SetLocaleTo_C_standard
();
SetLocaleTo_C_standard
();
if
(
g_pcb_plot_options
.
PlotScaleOpt
!=
1
)
if
(
g_PcbPlotOptions
.
m_PlotScale
!=
1.0
||
g_PcbPlotOptions
.
m_AutoScale
)
Center
=
TRUE
;
// Scale != 1 so center plot.
Center
=
true
;
// when scale != 1.0 we must calculate the position in page
// because actual position has no meaning
// Set default line width
// Set default line width
if
(
g_
pcb_plot_options
.
PlotLine_
Width
<
1
)
if
(
g_
PcbPlotOptions
.
m_PlotLine
Width
<
1
)
g_
pcb_plot_options
.
PlotLine_
Width
=
1
;
g_
PcbPlotOptions
.
m_PlotLine
Width
=
1
;
SheetSize
.
x
=
currentsheet
->
m_Size
.
x
*
U_PCB
;
SheetSize
.
x
=
currentsheet
->
m_Size
.
x
*
U_PCB
;
SheetSize
.
y
=
currentsheet
->
m_Size
.
y
*
U_PCB
;
SheetSize
.
y
=
currentsheet
->
m_Size
.
y
*
U_PCB
;
...
@@ -65,7 +66,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
...
@@ -65,7 +66,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
BoardSize
=
m_Pcb
->
m_BoundaryBox
.
GetSize
();
BoardSize
=
m_Pcb
->
m_BoundaryBox
.
GetSize
();
BoardCenter
=
m_Pcb
->
m_BoundaryBox
.
Centre
();
BoardCenter
=
m_Pcb
->
m_BoundaryBox
.
Centre
();
if
(
g_
pcb_plot_options
.
PlotScaleOpt
==
0
)
// Optimum scale
if
(
g_
PcbPlotOptions
.
m_AutoScale
)
// Optimum scale
{
{
double
Xscale
,
Yscale
;
double
Xscale
,
Yscale
;
...
@@ -75,7 +76,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
...
@@ -75,7 +76,7 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
scale
=
MIN
(
Xscale
,
Yscale
);
scale
=
MIN
(
Xscale
,
Yscale
);
}
}
else
else
scale
=
g_
pcb_plot_options
.
Scale
*
paperscale
;
scale
=
g_
PcbPlotOptions
.
m_Plot
Scale
*
paperscale
;
if
(
Center
)
if
(
Center
)
{
{
...
@@ -92,24 +93,23 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
...
@@ -92,24 +93,23 @@ bool WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
PS_PLOTTER
*
plotter
=
new
PS_PLOTTER
();
PS_PLOTTER
*
plotter
=
new
PS_PLOTTER
();
plotter
->
set_paper_size
(
SheetPS
);
plotter
->
set_paper_size
(
SheetPS
);
plotter
->
set_scale_adjust
(
g_pcb_plot_options
.
ScaleAdjX
,
plotter
->
set_scale_adjust
(
g_PcbPlotOptions
.
m_FineScaleAdjustX
,
g_pcb_plot_options
.
ScaleAdjY
);
g_PcbPlotOptions
.
m_FineScaleAdjustX
);
plotter
->
set_viewport
(
offset
,
scale
,
plotter
->
set_viewport
(
offset
,
scale
,
g_PcbPlotOptions
.
m_PlotMirror
);
g_pcb_plot_options
.
PlotOrient
);
plotter
->
set_default_line_width
(
g_PcbPlotOptions
.
m_PlotLineWidth
);
plotter
->
set_default_line_width
(
g_pcb_plot_options
.
PlotLine_Width
);
plotter
->
set_creator
(
wxT
(
"PCBNEW-PS"
)
);
plotter
->
set_creator
(
wxT
(
"PCBNEW-PS"
)
);
plotter
->
set_filename
(
FullFileName
);
plotter
->
set_filename
(
FullFileName
);
plotter
->
start_plot
(
output_file
);
plotter
->
start_plot
(
output_file
);
/* The worksheet is not significant with scale!=1... It is with
/* The worksheet is not significant with scale!=1... It is with
* paperscale!=1, anyway */
* paperscale!=1, anyway */
if
(
g_
pcb_plot_options
.
Plot_Frame_
Ref
&&
!
Center
)
if
(
g_
PcbPlotOptions
.
m_PlotFrame
Ref
&&
!
Center
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
);
// If plot a negative board:
// If plot a negative board:
// Draw a black rectangle (background for plot board in white)
// Draw a black rectangle (background for plot board in white)
// and switch the current color to WHITE
// and switch the current color to WHITE
if
(
g_
pcb_plot_options
.
Plot_PS_
Negative
)
if
(
g_
PcbPlotOptions
.
m_PlotPS
Negative
)
{
{
int
margin
=
500
;
// Add a 0.5 inch margin around the board
int
margin
=
500
;
// Add a 0.5 inch margin around the board
plotter
->
set_negative
(
true
);
plotter
->
set_negative
(
true
);
...
...
version.txt
View file @
e9f557e6
release version:
release version:
2010 dec
06 (BZR testing 2644
)
2010 dec
10 (BZR testing 26xx
)
files (.zip,.tgz):
files (.zip,.tgz):
kicad-2010-12-
06
-testing
kicad-2010-12-
10
-testing
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