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
76765f22
Commit
76765f22
authored
May 24, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more eagle plugin work
parent
43caa734
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
593 additions
and
228 deletions
+593
-228
class_drawsegment.h
pcbnew/class_drawsegment.h
+3
-3
eagle_plugin.cpp
pcbnew/eagle_plugin.cpp
+568
-170
eagle_plugin.h
pcbnew/eagle_plugin.h
+20
-52
legacy_plugin.cpp
pcbnew/legacy_plugin.cpp
+2
-3
No files found.
pcbnew/class_drawsegment.h
View file @
76765f22
...
...
@@ -140,14 +140,14 @@ public:
MODULE
*
GetParentModule
()
const
;
const
std
::
vector
<
wxPoint
>&
GetBezierPoints
()
const
{
return
m_BezierPoints
;
};
const
std
::
vector
<
wxPoint
>&
GetPolyPoints
()
const
{
return
m_PolyPoints
;
};
const
std
::
vector
<
wxPoint
>&
GetPolyPoints
()
const
{
return
m_PolyPoints
;
};
void
SetBezierPoints
(
std
::
vector
<
wxPoint
>&
aPoints
)
void
SetBezierPoints
(
const
std
::
vector
<
wxPoint
>&
aPoints
)
{
m_BezierPoints
=
aPoints
;
}
void
SetPolyPoints
(
std
::
vector
<
wxPoint
>&
aPoints
)
void
SetPolyPoints
(
const
std
::
vector
<
wxPoint
>&
aPoints
)
{
m_PolyPoints
=
aPoints
;
}
...
...
pcbnew/eagle_plugin.cpp
View file @
76765f22
This diff is collapsed.
Click to expand it.
pcbnew/eagle_plugin.h
View file @
76765f22
...
...
@@ -34,6 +34,8 @@
#include <boost/property_tree/ptree_fwd.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <time.h>
class
MODULE
;
typedef
boost
::
ptr_map
<
std
::
string
,
MODULE
>
MODULE_MAP
;
...
...
@@ -56,9 +58,12 @@ typedef boost::property_tree::ptree PTREE;
typedef
const
PTREE
CPTREE
;
struct
EWIRE
;
struct
EVIA
;
struct
EROT
;
struct
EATTR
;
struct
ECIRCLE
;
struct
ETEXT
;
struct
ERECT
;
/**
...
...
@@ -117,6 +122,8 @@ private:
int
kicad
(
double
d
)
const
;
int
kicad_y
(
double
y
)
const
{
return
-
kicad
(
y
);
}
int
kicad_x
(
double
x
)
const
{
return
kicad
(
x
);
}
wxSize
kicad_fontz
(
double
d
)
const
;
static
int
kicad_layer
(
int
aLayer
);
...
...
@@ -126,49 +133,6 @@ private:
#if 0
/**
* Function dblParse
* parses an ASCII decimal floating point value and reports any error by throwing
* an exception using the xpath in the error message text.
*
* @param aValue is the ASCII value in C locale form with possible leading whitespace
*
* @param aXpath tells where the value is within the XML document.
*
* @return double - aValue in binary, not scaled.
*/
static double dblParse( const char* aValue, const std::string& aXpath );
/**
* Function biuParse
* parses an ASCII decimal floating point value and scales it into a BIU
* according to the current mm_per_biu. This fuction is the complement of
* fmtBIU(). One has to know what the other is doing.
*
* @param aValue is the ASCII value in C locale form with possible leading whitespace
*
* @param aXpath tells where the value is within the XML document.
*
* @return BIU - the converted Board Internal Unit.
*/
BIU biuParse( const char* aValue, const std::string& aXpath );
/**
* Function degParse
* parses an ASCII decimal floating point value which is certainly an angle. This
* is a dedicated function for encapsulating support for the migration from
* tenths of degrees to degrees in floating point. This function is the complement of
* fmtDEG(). One has to know what the other is doing.
*
* @param aValue is the ASCII value in C locale form with possible leading whitespace
*
* @param nptrptr may be NULL, but if not, then it tells where to put a
* pointer to the next unconsumed input text. See "man strtod" for more information.
*
* @return double - the string converted to a primitive double type
*/
double degParse( const char* aValue, const char** nptrptr = NULL );
/// encapsulate the BIU formatting tricks in one place.
int biuSprintf( char* buf, BIU aValue ) const;
...
...
@@ -199,7 +163,7 @@ private:
void
loadPlain
(
CPTREE
&
aPlain
,
const
std
::
string
&
aXpath
);
void
load
NetsAndTrack
s
(
CPTREE
&
aSignals
,
const
std
::
string
&
aXpath
);
void
load
Signal
s
(
CPTREE
&
aSignals
,
const
std
::
string
&
aXpath
);
void
loadLibraries
(
CPTREE
&
aLibs
,
const
std
::
string
&
aXpath
);
...
...
@@ -212,7 +176,11 @@ private:
*/
EWIRE
ewire
(
CPTREE
&
aWire
)
const
;
EVIA
evia
(
CPTREE
&
aVia
)
const
;
ECIRCLE
ecircle
(
CPTREE
&
aCircle
)
const
;
ETEXT
etext
(
CPTREE
&
aText
)
const
;
ERECT
erect
(
CPTREE
&
aRect
)
const
;
EROT
erot
(
const
std
::
string
&
aRot
)
const
;
...
...
@@ -238,14 +206,14 @@ private:
*/
MODULE
*
makeModule
(
CPTREE
&
aPackage
,
const
std
::
string
&
aPkgName
)
const
;
void
packageWire
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packagePad
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packageText
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packageRectangle
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packagePolygon
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packageCircle
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packageHole
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packageSMD
(
MODULE
*
aModule
,
CPTREE
aTree
)
const
;
void
packageWire
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
void
packagePad
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
void
packageText
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
void
packageRectangle
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
void
packagePolygon
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
void
packageCircle
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
void
packageHole
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
void
packageSMD
(
MODULE
*
aModule
,
CPTREE
&
aTree
)
const
;
};
...
...
pcbnew/legacy_plugin.cpp
View file @
76765f22
...
...
@@ -1786,14 +1786,14 @@ void LEGACY_PLUGIN::loadPCB_TEXT()
if
(
TESTLINE
(
"Te"
)
)
// Text line (or first line for multi line texts)
{
ReadDelimitedText
(
text
,
line
+
2
,
sizeof
(
text
)
);
ReadDelimitedText
(
text
,
line
+
SZ
(
"Te"
)
,
sizeof
(
text
)
);
pcbtxt
->
SetText
(
FROM_UTF8
(
text
)
);
}
else
if
(
TESTLINE
(
"nl"
)
)
// next line of the current text
{
ReadDelimitedText
(
text
,
line
+
SZ
(
"nl"
),
sizeof
(
text
)
);
pcbtxt
->
SetText
(
pcbtxt
->
GetText
()
+
'\n'
+
FROM_UTF8
(
text
)
);
pcbtxt
->
SetText
(
pcbtxt
->
GetText
()
+
wxChar
(
'\n'
)
+
FROM_UTF8
(
text
)
);
}
else
if
(
TESTLINE
(
"Po"
)
)
...
...
@@ -1874,7 +1874,6 @@ void LEGACY_PLUGIN::loadPCB_TEXT()
layer
=
LAST_NO_COPPER_LAYER
;
pcbtxt
->
SetLayer
(
layer
);
}
else
if
(
TESTLINE
(
"$EndTEXTPCB"
)
)
...
...
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