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
4ac27702
Commit
4ac27702
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code formatting.
parent
77d8b2d8
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
144 deletions
+130
-144
dxf2brd_items.cpp
pcbnew/import_dxf/dxf2brd_items.cpp
+77
-89
dxf2brd_items.h
pcbnew/import_dxf/dxf2brd_items.h
+53
-55
No files found.
pcbnew/import_dxf/dxf2brd_items.cpp
View file @
4ac27702
This diff is collapsed.
Click to expand it.
pcbnew/import_dxf/dxf2brd_items.h
View file @
4ac27702
...
...
@@ -41,9 +41,8 @@ class BOARD_ITEM;
class
DXF2BRD_CONVERTER
:
public
DRW_Interface
{
private
:
std
::
vector
<
BOARD_ITEM
*>
m_newItemsList
;
// The list of new items added
// to the board
BOARD
*
m_brd
;
std
::
vector
<
BOARD_ITEM
*>
m_newItemsList
;
// The list of new items added to the board
BOARD
*
m_brd
;
double
m_xOffset
;
// X coord offset for conversion (in mm)
double
m_yOffset
;
// Y coord offset for conversion (in mm)
double
m_defaultThickness
;
// default line thickness for conversion (in mm)
...
...
@@ -85,7 +84,7 @@ public:
* @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
);
/**
* @return the list of new BOARD_ITEM
...
...
@@ -104,65 +103,65 @@ private:
// Add aItem the the board
// this item is also added to the list of new items
// (for undo command for instance)
void
appendToBoard
(
BOARD_ITEM
*
aItem
);
void
appendToBoard
(
BOARD_ITEM
*
aItem
);
// Methods from DRW_CreationInterface:
// They are "call back" fonctions, called when the corresponding object
// is read in dxf file
// Depending of the application, they can do something or not
virtual
void
addHeader
(
const
DRW_Header
*
d
ata
);
virtual
void
addLType
(
const
DRW_LType
&
data
)
{}
virtual
void
addLayer
(
const
DRW_Layer
&
d
ata
);
virtual
void
addDimStyle
(
const
DRW_Dimstyle
&
data
)
{}
virtual
void
addBlock
(
const
DRW_Block
&
data
)
{}
virtual
void
endBlock
(){}
virtual
void
addPoint
(
const
DRW_Point
&
data
)
{}
virtual
void
addLine
(
const
DRW_Line
&
d
ata
);
virtual
void
addRay
(
const
DRW_Ray
&
data
)
{}
virtual
void
addXline
(
const
DRW_Xline
&
data
)
{}
virtual
void
addCircle
(
const
DRW_Circle
&
d
ata
);
virtual
void
addArc
(
const
DRW_Arc
&
d
ata
);
virtual
void
addEllipse
(
const
DRW_Ellipse
&
data
)
{}
virtual
void
addLWPolyline
(
const
DRW_LWPolyline
&
d
ata
);
virtual
void
addText
(
const
DRW_Text
&
d
ata
);
virtual
void
addPolyline
(
const
DRW_Polyline
&
d
ata
);
virtual
void
addSpline
(
const
DRW_Spline
*
data
)
{}
virtual
void
addKnot
(
const
DRW_Entity
&
)
{}
virtual
void
addInsert
(
const
DRW_Insert
&
d
ata
){}
virtual
void
addTrace
(
const
DRW_Trace
&
d
ata
){}
virtual
void
addSolid
(
const
DRW_Solid
&
d
ata
){}
virtual
void
addMText
(
const
DRW_MText
&
d
ata
);
virtual
void
addDimAlign
(
const
DRW_DimAligned
*
data
)
{}
virtual
void
addDimLinear
(
const
DRW_DimLinear
*
data
)
{}
virtual
void
addDimRadial
(
const
DRW_DimRadial
*
data
)
{}
virtual
void
addDimDiametric
(
const
DRW_DimDiametric
*
data
)
{}
virtual
void
addDimAngular
(
const
DRW_DimAngular
*
data
)
{}
virtual
void
addDimAngular3P
(
const
DRW_DimAngular3p
*
data
)
{}
virtual
void
addDimOrdinate
(
const
DRW_DimOrdinate
*
data
)
{}
virtual
void
addLeader
(
const
DRW_Leader
*
data
)
{}
virtual
void
addHatch
(
const
DRW_Hatch
*
data
)
{}
virtual
void
addImage
(
const
DRW_Image
*
data
)
{}
virtual
void
linkImage
(
const
DRW_ImageDef
*
data
)
{}
virtual
void
add3dFace
(
const
DRW_3Dface
&
data
)
{}
virtual
void
addComment
(
const
char
*
)
{}
virtual
void
addVport
(
const
DRW_Vport
&
data
)
{}
virtual
void
addTextStyle
(
const
DRW_Textstyle
&
data
);
virtual
void
addViewport
(
const
DRW_Viewport
&
data
)
{}
virtual
void
setBlock
(
const
int
handle
)
{}
static
wxString
toDxfString
(
const
wxString
&
str
);
static
wxString
toNativeString
(
const
wxString
&
data
);
virtual
void
addHeader
(
const
DRW_Header
*
aD
ata
);
virtual
void
addLType
(
const
DRW_LType
&
aData
)
{}
virtual
void
addLayer
(
const
DRW_Layer
&
aD
ata
);
virtual
void
addDimStyle
(
const
DRW_Dimstyle
&
aData
)
{}
virtual
void
addBlock
(
const
DRW_Block
&
aData
)
{}
virtual
void
endBlock
()
{}
virtual
void
addPoint
(
const
DRW_Point
&
aData
)
{}
virtual
void
addLine
(
const
DRW_Line
&
aD
ata
);
virtual
void
addRay
(
const
DRW_Ray
&
aData
)
{}
virtual
void
addXline
(
const
DRW_Xline
&
aData
)
{}
virtual
void
addCircle
(
const
DRW_Circle
&
aD
ata
);
virtual
void
addArc
(
const
DRW_Arc
&
aD
ata
);
virtual
void
addEllipse
(
const
DRW_Ellipse
&
aData
)
{}
virtual
void
addLWPolyline
(
const
DRW_LWPolyline
&
aD
ata
);
virtual
void
addText
(
const
DRW_Text
&
aD
ata
);
virtual
void
addPolyline
(
const
DRW_Polyline
&
aD
ata
);
virtual
void
addSpline
(
const
DRW_Spline
*
aData
)
{}
virtual
void
addKnot
(
const
DRW_Entity
&
)
{}
virtual
void
addInsert
(
const
DRW_Insert
&
aD
ata
){}
virtual
void
addTrace
(
const
DRW_Trace
&
aD
ata
){}
virtual
void
addSolid
(
const
DRW_Solid
&
aD
ata
){}
virtual
void
addMText
(
const
DRW_MText
&
aD
ata
);
virtual
void
addDimAlign
(
const
DRW_DimAligned
*
aData
)
{}
virtual
void
addDimLinear
(
const
DRW_DimLinear
*
aData
)
{}
virtual
void
addDimRadial
(
const
DRW_DimRadial
*
aData
)
{}
virtual
void
addDimDiametric
(
const
DRW_DimDiametric
*
aData
)
{}
virtual
void
addDimAngular
(
const
DRW_DimAngular
*
aData
)
{}
virtual
void
addDimAngular3P
(
const
DRW_DimAngular3p
*
aData
)
{}
virtual
void
addDimOrdinate
(
const
DRW_DimOrdinate
*
aData
)
{}
virtual
void
addLeader
(
const
DRW_Leader
*
aData
)
{}
virtual
void
addHatch
(
const
DRW_Hatch
*
aData
)
{}
virtual
void
addImage
(
const
DRW_Image
*
aData
)
{}
virtual
void
linkImage
(
const
DRW_ImageDef
*
aData
)
{}
virtual
void
add3dFace
(
const
DRW_3Dface
&
aData
)
{}
virtual
void
addComment
(
const
char
*
)
{}
virtual
void
addVport
(
const
DRW_Vport
&
aData
)
{}
virtual
void
addTextStyle
(
const
DRW_Textstyle
&
aData
);
virtual
void
addViewport
(
const
DRW_Viewport
&
aData
)
{}
virtual
void
setBlock
(
const
int
aHandle
)
{}
static
wxString
toDxfString
(
const
wxString
&
aStr
);
static
wxString
toNativeString
(
const
wxString
&
aData
);
// These functions are not used in Kicad.
// But because they are virtual pure in DRW_Interface, they should be defined
virtual
void
writeTextstyles
()
{}
virtual
void
writeVports
()
{}
virtual
void
writeHeader
(
DRW_Header
&
data
)
{}
virtual
void
writeHeader
(
DRW_Header
&
aData
)
{}
virtual
void
writeEntities
()
{}
virtual
void
writeLTypes
()
{}
virtual
void
writeLayers
()
{}
...
...
@@ -172,7 +171,6 @@ private:
void
writeLine
();
void
writeMtext
();
};
#endif // FILTERDXFRW_H
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