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
5a6665ec
Commit
5a6665ec
authored
Feb 02, 2014
by
Cirilo Bernardo
Committed by
jean-pierre charras
Feb 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dxf import fix (patch from Cirilo Bernardo, with a minor change)
parent
9ef56278
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
19 deletions
+11
-19
dxf2brd_items.cpp
pcbnew/import_dxf/dxf2brd_items.cpp
+4
-17
dxf2brd_items.h
pcbnew/import_dxf/dxf2brd_items.h
+7
-2
No files found.
pcbnew/import_dxf/dxf2brd_items.cpp
View file @
5a6665ec
...
@@ -52,7 +52,6 @@ DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface()
...
@@ -52,7 +52,6 @@ DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface()
m_xOffset
=
0.0
;
// X coord offset for conversion (in mm)
m_xOffset
=
0.0
;
// X coord offset for conversion (in mm)
m_yOffset
=
0.0
;
// Y coord offset for conversion (in mm)
m_yOffset
=
0.0
;
// Y coord offset for conversion (in mm)
m_Dfx2mm
=
1.0
;
// The scale factor to convert DXF units to mm
m_Dfx2mm
=
1.0
;
// The scale factor to convert DXF units to mm
m_dxf
=
NULL
;
m_brd
=
NULL
;
m_brd
=
NULL
;
m_version
=
0
;
m_version
=
0
;
m_defaultThickness
=
0.1
;
m_defaultThickness
=
0.1
;
...
@@ -84,28 +83,16 @@ int DXF2BRD_CONVERTER::mapDim( double aDxfValue )
...
@@ -84,28 +83,16 @@ int DXF2BRD_CONVERTER::mapDim( double aDxfValue )
}
}
/**
* Implementation of the method used for communicate
* with this filter.
*
* @param aFile = the full filename.
* @param aLayersList = where to store the list of layer names
*/
bool
DXF2BRD_CONVERTER
::
ImportDxfFile
(
const
wxString
&
aFile
,
BOARD
*
aBoard
)
bool
DXF2BRD_CONVERTER
::
ImportDxfFile
(
const
wxString
&
aFile
,
BOARD
*
aBoard
)
{
{
m_brd
=
aBoard
;
m_brd
=
aBoard
;
m_
dxf
=
new
dxfRW
(
aFile
.
ToUTF8
()
);
dxfRW
*
dxf
=
new
dxfRW
(
aFile
.
ToUTF8
()
);
bool
success
=
m_
dxf
->
read
(
this
,
true
);
bool
success
=
dxf
->
read
(
this
,
true
);
if
(
success
==
false
)
delete
dxf
;
{
return
false
;
}
delete
m_dxf
;
return
success
;
m_dxf
=
NULL
;
return
true
;
}
}
// Add aItem the the board
// Add aItem the the board
...
...
pcbnew/import_dxf/dxf2brd_items.h
View file @
5a6665ec
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "drw_interface.h"
#include "drw_interface.h"
#include "wx/wx.h"
#include "wx/wx.h"
class
dxfRW
;
class
BOARD
;
class
BOARD
;
class
BOARD_ITEM
;
class
BOARD_ITEM
;
...
@@ -54,7 +53,6 @@ private:
...
@@ -54,7 +53,6 @@ private:
int
m_brdLayer
;
// The board layer to place imported dfx items
int
m_brdLayer
;
// The board layer to place imported dfx items
int
m_version
;
// the dxf version, not used here
int
m_version
;
// the dxf version, not used here
std
::
string
m_codePage
;
// The code page, not used here
std
::
string
m_codePage
;
// The code page, not used here
dxfRW
*
m_dxf
;
// the dxf reader
public
:
public
:
DXF2BRD_CONVERTER
();
DXF2BRD_CONVERTER
();
...
@@ -80,6 +78,13 @@ public:
...
@@ -80,6 +78,13 @@ public:
*/
*/
void
SetBrdLayer
(
int
aBrdLayer
)
{
m_brdLayer
=
aBrdLayer
;
}
void
SetBrdLayer
(
int
aBrdLayer
)
{
m_brdLayer
=
aBrdLayer
;
}
/**
* Implementation of the method used for communicate
* with this filter.
*
* @param aFile = the full filename.
* @param aBoard = where to store the graphical items and text
*/
bool
ImportDxfFile
(
const
wxString
&
aFile
,
BOARD
*
aBoard
);
bool
ImportDxfFile
(
const
wxString
&
aFile
,
BOARD
*
aBoard
);
/**
/**
...
...
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