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
05faa369
Commit
05faa369
authored
Dec 01, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Plain Diff
KICAD_PLUG intermediate work, for eventual nanometer boards
parents
d9e0ab02
1b5edd6d
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
416 additions
and
202 deletions
+416
-202
base_struct.h
include/base_struct.h
+4
-1
class_board_item.h
include/class_board_item.h
+16
-11
class_board_item.cpp
pcbnew/class_board_item.cpp
+1
-1
class_drawsegment.cpp
pcbnew/class_drawsegment.cpp
+1
-1
class_edge_mod.cpp
pcbnew/class_edge_mod.cpp
+4
-4
class_edge_mod.h
pcbnew/class_edge_mod.h
+1
-1
class_track.h
pcbnew/class_track.h
+2
-2
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+371
-178
kicad_plugin.h
pcbnew/kicad_plugin.h
+13
-0
specctra_export.cpp
pcbnew/specctra_export.cpp
+3
-3
No files found.
include/base_struct.h
View file @
05faa369
...
...
@@ -761,7 +761,7 @@ public:
wxString
m_Text
;
/* text! */
wxPoint
m_Pos
;
/* XY position of anchor text. */
wxSize
m_Size
;
/* XY size of text */
bool
m_Mirror
;
/
* Display Normal / mirror */
bool
m_Mirror
;
/
//< true iff mirrored
int
m_Attributs
;
/* flags (visible...) */
bool
m_Italic
;
/* true to simulate (or use if exists)
* an italic font... */
...
...
@@ -798,6 +798,9 @@ public:
void
SetItalic
(
bool
isItalic
)
{
m_Italic
=
isItalic
;
}
bool
IsItalic
()
const
{
return
m_Italic
;
}
void
SetMirrored
(
bool
doMirror
)
{
m_Mirror
=
doMirror
;
}
bool
IsMirrored
()
const
{
return
m_Mirror
;
}
/**
* Function SetSize
* sets text size.
...
...
include/class_board_item.h
View file @
05faa369
...
...
@@ -16,15 +16,20 @@ class BOARD;
class
EDA_DRAW_PANEL
;
/* Shapes for segments (graphic segments and tracks) ( .m_Shape member ) */
enum
Track_Shapes
{
S_SEGMENT
=
0
,
/* usual segment : line with rounded ends */
S_RECT
,
/* segment with non rounded ends */
S_ARC
,
/* Arcs (with rounded ends) */
S_CIRCLE
,
/* ring */
S_POLYGON
,
/* polygon (not yet used for tracks, but could be in microwave apps) */
S_CURVE
,
/* Bezier Curve */
S_LAST
/* last value for this list */
/**
* Enum STROKE_T
* is the set of shapes for segments (graphic segments and tracks) which are often
* in the .m_Shape member
*/
enum
STROKE_T
{
S_SEGMENT
=
0
,
///< usual segment : line with rounded ends
S_RECT
,
///< segment with non rounded ends
S_ARC
,
///< Arcs (with rounded ends)
S_CIRCLE
,
///< ring
S_POLYGON
,
///< polygon (not yet used for tracks, but could be in microwave apps)
S_CURVE
,
///< Bezier Curve
S_LAST
///< last value for this list
};
...
...
@@ -165,9 +170,9 @@ public:
/**
* Function ShowShape
* converts the enum
Track_Shapes
integer value to a wxString.
* converts the enum
STROKE_T
integer value to a wxString.
*/
static
wxString
ShowShape
(
Track_Shapes
aShape
);
static
wxString
ShowShape
(
STROKE_T
aShape
);
/**
* Function Save
...
...
pcbnew/class_board_item.cpp
View file @
05faa369
...
...
@@ -10,7 +10,7 @@
#include "class_board.h"
wxString
BOARD_ITEM
::
ShowShape
(
Track_Shapes
aShape
)
wxString
BOARD_ITEM
::
ShowShape
(
STROKE_T
aShape
)
{
switch
(
aShape
)
{
...
...
pcbnew/class_drawsegment.cpp
View file @
05faa369
...
...
@@ -566,7 +566,7 @@ wxString DRAWSEGMENT::GetSelectMenuText() const
wxString
temp
;
text
.
Printf
(
_
(
"Pcb Graphic: %s length: %s on %s"
),
GetChars
(
ShowShape
(
(
Track_Shapes
)
m_Shape
)
),
GetChars
(
ShowShape
(
(
STROKE_T
)
m_Shape
)
),
GetChars
(
valeur_param
(
GetLength
(),
temp
)
),
GetChars
(
GetLayerName
()
)
);
...
...
pcbnew/class_edge_mod.cpp
View file @
05faa369
...
...
@@ -30,10 +30,10 @@
/* class EDGE_MODULE */
/*********************/
EDGE_MODULE
::
EDGE_MODULE
(
MODULE
*
parent
)
:
EDGE_MODULE
::
EDGE_MODULE
(
MODULE
*
parent
,
STROKE_T
aShape
)
:
DRAWSEGMENT
(
parent
,
PCB_MODULE_EDGE_T
)
{
m_Shape
=
S_SEGMENT
;
m_Shape
=
aShape
;
m_Angle
=
0
;
m_Width
=
120
;
}
...
...
@@ -422,7 +422,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
{
wxString
text
;
text
<<
_
(
"Graphic"
)
<<
wxT
(
" "
)
<<
ShowShape
(
(
Track_Shapes
)
m_Shape
);
text
<<
_
(
"Graphic"
)
<<
wxT
(
" "
)
<<
ShowShape
(
(
STROKE_T
)
m_Shape
);
text
<<
wxT
(
" ("
)
<<
GetLayerName
()
<<
wxT
(
")"
);
text
<<
_
(
" of "
)
<<
(
(
MODULE
*
)
GetParent
()
)
->
GetReference
();
...
...
@@ -441,7 +441,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
*/
void
EDGE_MODULE
::
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
{
wxString
shape
=
ShowShape
(
(
Track_Shapes
)
m_Shape
);
wxString
shape
=
ShowShape
(
(
STROKE_T
)
m_Shape
);
// for now, make it look like XML:
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
...
...
pcbnew/class_edge_mod.h
View file @
05faa369
...
...
@@ -22,7 +22,7 @@ public:
wxPoint
m_End0
;
// End point, relative to module origin, orient 0.
public
:
EDGE_MODULE
(
MODULE
*
parent
);
EDGE_MODULE
(
MODULE
*
parent
,
STROKE_T
aShape
=
S_SEGMENT
);
EDGE_MODULE
(
EDGE_MODULE
*
edge
);
~
EDGE_MODULE
();
...
...
pcbnew/class_track.h
View file @
05faa369
...
...
@@ -100,7 +100,7 @@ public:
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
m_Start
+=
aMoveVector
;
m_End
+=
aMoveVector
;
m_End
+=
aMoveVector
;
}
/**
...
...
@@ -128,7 +128,7 @@ public:
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
// overload
void
SetEnd
(
const
wxPoint
&
aEnd
)
{
m_
Start
=
aEnd
;
}
void
SetEnd
(
const
wxPoint
&
aEnd
)
{
m_
End
=
aEnd
;
}
EDA_RECT
GetBoundingBox
()
const
;
...
...
pcbnew/kicad_plugin.cpp
View file @
05faa369
This diff is collapsed.
Click to expand it.
pcbnew/kicad_plugin.h
View file @
05faa369
...
...
@@ -102,6 +102,19 @@ protected:
*/
BIU
biuParse
(
const
char
*
aValue
,
const
char
**
nptrptr
=
NULL
);
/**
* Function dblParse
* parses an ASCII decimal floating point value without scaling into a double.
*
* @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
dblParse
(
const
char
*
aValue
,
const
char
**
nptrptr
=
NULL
);
// load / parse functions
void
loadAllSections
(
bool
doAppend
);
...
...
pcbnew/specctra_export.cpp
View file @
05faa369
...
...
@@ -229,7 +229,7 @@ static DRAWSEGMENT* findPoint( const wxPoint& aPoint, TYPE_COLLECTOR* items )
DRAWSEGMENT
*
graphic
=
(
DRAWSEGMENT
*
)
(
*
items
)[
i
];
printf
(
"type=%s, GetStart()=%d,%d GetEnd()=%d,%d
\n
"
,
TO_UTF8
(
BOARD_ITEM
::
ShowShape
(
(
Track_Shapes
)
graphic
->
m_Shape
)
),
TO_UTF8
(
BOARD_ITEM
::
ShowShape
(
(
STROKE_T
)
graphic
->
m_Shape
)
),
graphic
->
GetStart
().
x
,
graphic
->
GetStart
().
y
,
graphic
->
GetEnd
().
x
,
...
...
@@ -667,7 +667,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
case
S_ARC
:
default
:
D
(
printf
(
"makeIMAGE(): unsupported shape %s
\n
"
,
TO_UTF8
(
BOARD_ITEM
::
ShowShape
(
(
Track_Shapes
)
graphic
->
m_Shape
))
);)
TO_UTF8
(
BOARD_ITEM
::
ShowShape
(
(
STROKE_T
)
graphic
->
m_Shape
))
);)
continue
;
}
}
...
...
@@ -858,7 +858,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER
wxString
error
;
error
.
Printf
(
_
(
"Unsupported DRAWSEGMENT type %s"
),
GetChars
(
BOARD_ITEM
::
ShowShape
(
(
Track_Shapes
)
graphic
->
m_Shape
)
)
);
GetChars
(
BOARD_ITEM
::
ShowShape
(
(
STROKE_T
)
graphic
->
m_Shape
)
)
);
ThrowIOError
(
error
);
}
...
...
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