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
60140dfb
Commit
60140dfb
authored
Jun 30, 2014
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
1e7495e6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
63 deletions
+59
-63
gr_basic.h
include/gr_basic.h
+2
-0
dialog_SVG_print.cpp
pcbnew/dialogs/dialog_SVG_print.cpp
+2
-14
dialog_plot.cpp
pcbnew/dialogs/dialog_plot.cpp
+1
-1
export_gencad.cpp
pcbnew/exporters/export_gencad.cpp
+5
-0
export_vrml.cpp
pcbnew/exporters/export_vrml.cpp
+2
-2
dxf2brd_items.cpp
pcbnew/import_dxf/dxf2brd_items.cpp
+6
-2
pcbplot.cpp
pcbnew/pcbplot.cpp
+41
-44
No files found.
include/gr_basic.h
View file @
60140dfb
...
@@ -88,6 +88,8 @@ typedef int wxPenStyle;
...
@@ -88,6 +88,8 @@ typedef int wxPenStyle;
extern
GR_DRAWMODE
g_XorMode
;
extern
GR_DRAWMODE
g_XorMode
;
extern
EDA_COLOR_T
g_DrawBgColor
;
typedef
enum
{
typedef
enum
{
...
...
pcbnew/dialogs/dialog_SVG_print.cpp
View file @
60140dfb
...
@@ -320,18 +320,6 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile )
...
@@ -320,18 +320,6 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile )
);
);
}
}
wxFileName
fn
(
boardFilename
);
BuildPlotFileName
(
&
fn
,
outputDir
.
GetPath
(),
suffix
,
SVGFileExtension
);
if
(
m_PrintBoardEdgesCtrl
->
IsChecked
()
)
m_printMaskLayer
|=
EDGE_LAYER
;
if
(
CreateSVGFile
(
fn
.
GetFullPath
()
)
)
msg
.
Printf
(
_
(
"Plot: %s OK
\n
"
),
GetChars
(
fn
.
GetFullPath
()
)
);
else
// Error
msg
.
Printf
(
_
(
"** Unable to create %s **
\n
"
),
GetChars
(
fn
.
GetFullPath
()
)
);
m_messagesBox
->
AppendText
(
msg
);
if
(
aOnlyOneFile
)
if
(
aOnlyOneFile
)
break
;
break
;
}
}
...
@@ -378,9 +366,9 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName )
...
@@ -378,9 +366,9 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName )
}
}
LOCALE_IO
toggle
;
LOCALE_IO
toggle
;
SVG_PLOTTER
*
plotter
=
(
SVG_PLOTTER
*
)
StartPlotBoard
(
m_board
,
SVG_PLOTTER
*
plotter
=
(
SVG_PLOTTER
*
)
StartPlotBoard
(
m_board
,
&
plot_opts
,
aFullFileName
,
&
plot_opts
,
UNDEFINED_LAYER
,
aFullFileName
,
wxEmptyString
);
wxEmptyString
);
if
(
plotter
)
if
(
plotter
)
{
{
...
...
pcbnew/dialogs/dialog_plot.cpp
View file @
60140dfb
...
@@ -797,7 +797,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
...
@@ -797,7 +797,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
LOCALE_IO
toggle
;
LOCALE_IO
toggle
;
BOARD
*
board
=
m_parent
->
GetBoard
();
BOARD
*
board
=
m_parent
->
GetBoard
();
PLOTTER
*
plotter
=
StartPlotBoard
(
board
,
&
m_plotOpts
,
fn
.
GetFullPath
(),
wxEmptyString
);
PLOTTER
*
plotter
=
StartPlotBoard
(
board
,
&
m_plotOpts
,
layer
,
fn
.
GetFullPath
(),
wxEmptyString
);
// Print diags in messages box:
// Print diags in messages box:
wxString
msg
;
wxString
msg
;
...
...
pcbnew/exporters/export_gencad.cpp
View file @
60140dfb
...
@@ -255,6 +255,9 @@ static double MapYTo( int aY )
...
@@ -255,6 +255,9 @@ static double MapYTo( int aY )
/* Driver function: processing starts here */
/* Driver function: processing starts here */
void
PCB_EDIT_FRAME
::
ExportToGenCAD
(
wxCommandEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
ExportToGenCAD
(
wxCommandEvent
&
aEvent
)
{
{
#if 0 // working on this 30-Jun-14, not ready yet, failed the initial testing.
wxFileName fn = GetBoard()->GetFileName();
wxFileName fn = GetBoard()->GetFileName();
FILE* file;
FILE* file;
...
@@ -344,6 +347,8 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent )
...
@@ -344,6 +347,8 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent )
module->SetFlag( 0 );
module->SetFlag( 0 );
}
}
}
}
#endif
}
}
...
...
pcbnew/exporters/export_vrml.cpp
View file @
60140dfb
...
@@ -439,9 +439,9 @@ static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD*
...
@@ -439,9 +439,9 @@ static void write_layers( MODEL_VRML& aModel, std::ofstream& output_file, BOARD*
aModel
.
plated_holes
.
Tesselate
(
NULL
,
true
);
aModel
.
plated_holes
.
Tesselate
(
NULL
,
true
);
write_triangle_bag
(
output_file
,
aModel
.
GetColor
(
VRML_COLOR_TIN
),
write_triangle_bag
(
output_file
,
aModel
.
GetColor
(
VRML_COLOR_TIN
),
&
aModel
.
plated_holes
,
false
,
false
,
&
aModel
.
plated_holes
,
false
,
false
,
aModel
.
GetLayerZ
(
LAST_COPPER_LAYER
)
aModel
.
GetLayerZ
(
F_Cu
)
+
Millimeter2iu
(
ART_OFFSET
/
2.0
)
*
aModel
.
scale
,
+
Millimeter2iu
(
ART_OFFSET
/
2.0
)
*
aModel
.
scale
,
aModel
.
GetLayerZ
(
FIRST_COPPER_LAYER
)
aModel
.
GetLayerZ
(
B_Cu
)
-
Millimeter2iu
(
ART_OFFSET
/
2.0
)
*
aModel
.
scale
,
-
Millimeter2iu
(
ART_OFFSET
/
2.0
)
*
aModel
.
scale
,
aModel
.
precision
);
aModel
.
precision
);
...
...
pcbnew/import_dxf/dxf2brd_items.cpp
View file @
60140dfb
...
@@ -145,6 +145,7 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data )
...
@@ -145,6 +145,7 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data )
// Obviously, the z coordinate is ignored
// Obviously, the z coordinate is ignored
wxPoint
startpoint
;
wxPoint
startpoint
;
for
(
unsigned
ii
=
0
;
ii
<
data
.
vertlist
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
data
.
vertlist
.
size
();
ii
++
)
{
{
DRW_Vertex
*
vertex
=
data
.
vertlist
[
ii
];
DRW_Vertex
*
vertex
=
data
.
vertlist
[
ii
];
...
@@ -157,7 +158,8 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data )
...
@@ -157,7 +158,8 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& data )
}
}
DRAWSEGMENT
*
segm
=
new
DRAWSEGMENT
(
m_brd
);
DRAWSEGMENT
*
segm
=
new
DRAWSEGMENT
(
m_brd
);
segm
->
SetLayer
(
m_brdLayer
);
segm
->
SetLayer
(
ToLAYER_ID
(
m_brdLayer
)
);
segm
->
SetStart
(
startpoint
);
segm
->
SetStart
(
startpoint
);
wxPoint
endpoint
(
mapX
(
vertex
->
basePoint
.
x
),
mapY
(
vertex
->
basePoint
.
y
)
);
wxPoint
endpoint
(
mapX
(
vertex
->
basePoint
.
x
),
mapY
(
vertex
->
basePoint
.
y
)
);
segm
->
SetEnd
(
endpoint
);
segm
->
SetEnd
(
endpoint
);
...
@@ -176,6 +178,7 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data )
...
@@ -176,6 +178,7 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data )
// (obviously contant and is the width of the DRW_LWPolyline.
// (obviously contant and is the width of the DRW_LWPolyline.
// the variable width of each vertex (when exists) is not used.
// the variable width of each vertex (when exists) is not used.
wxPoint
startpoint
;
wxPoint
startpoint
;
for
(
unsigned
ii
=
0
;
ii
<
data
.
vertlist
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
data
.
vertlist
.
size
();
ii
++
)
{
{
DRW_Vertex2D
*
vertex
=
data
.
vertlist
[
ii
];
DRW_Vertex2D
*
vertex
=
data
.
vertlist
[
ii
];
...
@@ -188,7 +191,8 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data )
...
@@ -188,7 +191,8 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& data )
}
}
DRAWSEGMENT
*
segm
=
new
DRAWSEGMENT
(
m_brd
);
DRAWSEGMENT
*
segm
=
new
DRAWSEGMENT
(
m_brd
);
segm
->
SetLayer
(
m_brdLayer
);
segm
->
SetLayer
(
ToLAYER_ID
(
m_brdLayer
)
);
segm
->
SetStart
(
startpoint
);
segm
->
SetStart
(
startpoint
);
wxPoint
endpoint
(
mapX
(
vertex
->
x
),
mapY
(
vertex
->
y
)
);
wxPoint
endpoint
(
mapX
(
vertex
->
x
),
mapY
(
vertex
->
y
)
);
segm
->
SetEnd
(
endpoint
);
segm
->
SetEnd
(
endpoint
);
...
...
pcbnew/pcbplot.cpp
View file @
60140dfb
...
@@ -90,87 +90,83 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
...
@@ -90,87 +90,83 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
switch
(
aLayer
)
switch
(
aLayer
)
{
{
case
LAYER_N_BACK
:
case
F_Adhes
:
attrib
=
wxString
::
Format
(
wxT
(
"Copper,L%d"
),
aBoard
->
GetCopperLayerCount
()
);
break
;
case
LAYER_N_2
:
case
LAYER_N_3
:
case
LAYER_N_4
:
case
LAYER_N_5
:
case
LAYER_N_6
:
case
LAYER_N_7
:
case
LAYER_N_8
:
case
LAYER_N_9
:
case
LAYER_N_10
:
case
LAYER_N_11
:
case
LAYER_N_12
:
case
LAYER_N_13
:
case
LAYER_N_14
:
case
LAYER_N_15
:
// LAYER_N_2 is the first inner layer counting from the bottom; this
// must be converted to a 1-based number starting from the top
attrib
=
wxString
::
Format
(
wxT
(
"Copper,L%d"
),
aBoard
->
GetCopperLayerCount
()
-
(
aLayer
-
LAYER_N_2
+
1
)
);
break
;
case
LAYER_N_FRONT
:
attrib
=
wxString
(
wxT
(
"Copper,L1"
)
);
break
;
case
ADHESIVE_N_FRONT
:
attrib
=
wxString
(
wxT
(
"Glue,Top"
)
);
attrib
=
wxString
(
wxT
(
"Glue,Top"
)
);
break
;
break
;
case
ADHESIVE_N_BACK
:
case
B_Adhes
:
attrib
=
wxString
(
wxT
(
"Glue,Bot"
)
);
attrib
=
wxString
(
wxT
(
"Glue,Bot"
)
);
break
;
break
;
case
SILKSCREEN_N_FRONT
:
case
F_SilkS
:
attrib
=
wxString
(
wxT
(
"Legend,Top"
)
);
attrib
=
wxString
(
wxT
(
"Legend,Top"
)
);
break
;
break
;
case
SILKSCREEN_N_BACK
:
case
B_SilkS
:
attrib
=
wxString
(
wxT
(
"Legend,Bot"
)
);
attrib
=
wxString
(
wxT
(
"Legend,Bot"
)
);
break
;
break
;
case
SOLDERMASK_N_FRONT
:
case
F_Mask
:
attrib
=
wxString
(
wxT
(
"Soldermask,Top"
)
);
attrib
=
wxString
(
wxT
(
"Soldermask,Top"
)
);
break
;
break
;
case
SOLDERMASK_N_BACK
:
case
B_Mask
:
attrib
=
wxString
(
wxT
(
"Soldermask,Bot"
)
);
attrib
=
wxString
(
wxT
(
"Soldermask,Bot"
)
);
break
;
break
;
case
SOLDERPASTE_N_FRONT
:
case
F_Paste
:
attrib
=
wxString
(
wxT
(
"Paste,Top"
)
);
attrib
=
wxString
(
wxT
(
"Paste,Top"
)
);
break
;
break
;
case
SOLDERPASTE_N_BACK
:
case
B_Paste
:
attrib
=
wxString
(
wxT
(
"Paste,Bot"
)
);
attrib
=
wxString
(
wxT
(
"Paste,Bot"
)
);
break
;
break
;
case
E
DGE_N
:
case
E
dge_Cuts
:
attrib
=
wxString
(
wxT
(
"Profile"
)
);
attrib
=
wxString
(
wxT
(
"Profile"
)
);
break
;
break
;
case
D
RAW_N
:
case
D
wgs_User
:
attrib
=
wxString
(
wxT
(
"Drawing"
)
);
attrib
=
wxString
(
wxT
(
"Drawing"
)
);
break
;
break
;
case
C
OMMENT_N
:
case
C
mts_User
:
attrib
=
wxString
(
wxT
(
"Other,Comment"
)
);
attrib
=
wxString
(
wxT
(
"Other,Comment"
)
);
break
;
break
;
case
ECO1_N
:
case
Eco1_User
:
case
ECO2_N
:
case
Eco2_User
:
attrib
=
wxString
::
Format
(
wxT
(
"Other,ECO%d"
),
aLayer
-
ECO1_N
+
1
);
attrib
=
wxString
::
Format
(
wxT
(
"Other,ECO%d"
),
aLayer
-
Eco1_User
+
1
);
break
;
case
F_Cu
:
attrib
=
wxString
(
wxT
(
"Copper,L1"
)
);
break
;
case
B_Cu
:
attrib
=
wxString
::
Format
(
wxT
(
"Copper,L%d"
),
aBoard
->
GetCopperLayerCount
()
);
break
;
default:
if
(
IsCopperLayer
(
aLayer
)
)
{
#if 0 // was:
// LAYER_N_2 is the first inner layer counting from the bottom; this
// must be converted to a 1-based number starting from the top
attrib = wxString::Format( wxT( "Copper,L%d" ),
aBoard->GetCopperLayerCount() - ( aLayer - LAYER_N_2 + 1 ) );
#else
attrib
=
wxString
::
Format
(
wxT
(
"Copper,L%d"
),
aLayer
);
#endif
}
break
;
break
;
}
}
// Add the signal type of the layer, if relevant
// Add the signal type of the layer, if relevant
if
(
FIRST_COPPER_LAYER
<=
aLayer
&&
aLayer
<=
LAST_COPPER_LAYER
)
{
if
(
IsCopperLayer
(
aLayer
)
)
LAYER_T
type
=
aBoard
->
GetLayerType
(
aLayer
);
{
LAYER_T
type
=
aBoard
->
GetLayerType
(
ToLAYER_ID
(
aLayer
)
);
switch
(
type
)
switch
(
type
)
{
{
case
LT_SIGNAL
:
case
LT_SIGNAL
:
...
@@ -190,6 +186,7 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
...
@@ -190,6 +186,7 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
return
attrib
;
return
attrib
;
}
}
void
BuildPlotFileName
(
wxFileName
*
aFilename
,
void
BuildPlotFileName
(
wxFileName
*
aFilename
,
const
wxString
&
aOutputDir
,
const
wxString
&
aOutputDir
,
const
wxString
&
aSuffix
,
const
wxString
&
aSuffix
,
...
...
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