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
Show 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:
...
@@ -761,7 +761,7 @@ public:
wxString
m_Text
;
/* text! */
wxString
m_Text
;
/* text! */
wxPoint
m_Pos
;
/* XY position of anchor text. */
wxPoint
m_Pos
;
/* XY position of anchor text. */
wxSize
m_Size
;
/* XY size of 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...) */
int
m_Attributs
;
/* flags (visible...) */
bool
m_Italic
;
/* true to simulate (or use if exists)
bool
m_Italic
;
/* true to simulate (or use if exists)
* an italic font... */
* an italic font... */
...
@@ -798,6 +798,9 @@ public:
...
@@ -798,6 +798,9 @@ public:
void
SetItalic
(
bool
isItalic
)
{
m_Italic
=
isItalic
;
}
void
SetItalic
(
bool
isItalic
)
{
m_Italic
=
isItalic
;
}
bool
IsItalic
()
const
{
return
m_Italic
;
}
bool
IsItalic
()
const
{
return
m_Italic
;
}
void
SetMirrored
(
bool
doMirror
)
{
m_Mirror
=
doMirror
;
}
bool
IsMirrored
()
const
{
return
m_Mirror
;
}
/**
/**
* Function SetSize
* Function SetSize
* sets text size.
* sets text size.
...
...
include/class_board_item.h
View file @
05faa369
...
@@ -16,15 +16,20 @@ class BOARD;
...
@@ -16,15 +16,20 @@ class BOARD;
class
EDA_DRAW_PANEL
;
class
EDA_DRAW_PANEL
;
/* Shapes for segments (graphic segments and tracks) ( .m_Shape member ) */
/**
enum
Track_Shapes
{
* Enum STROKE_T
S_SEGMENT
=
0
,
/* usual segment : line with rounded ends */
* is the set of shapes for segments (graphic segments and tracks) which are often
S_RECT
,
/* segment with non rounded ends */
* in the .m_Shape member
S_ARC
,
/* Arcs (with rounded ends) */
*/
S_CIRCLE
,
/* ring */
enum
STROKE_T
S_POLYGON
,
/* polygon (not yet used for tracks, but could be in microwave apps) */
{
S_CURVE
,
/* Bezier Curve */
S_SEGMENT
=
0
,
///< usual segment : line with rounded ends
S_LAST
/* last value for this list */
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:
...
@@ -165,9 +170,9 @@ public:
/**
/**
* Function ShowShape
* 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
* Function Save
...
...
pcbnew/class_board_item.cpp
View file @
05faa369
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include "class_board.h"
#include "class_board.h"
wxString
BOARD_ITEM
::
ShowShape
(
Track_Shapes
aShape
)
wxString
BOARD_ITEM
::
ShowShape
(
STROKE_T
aShape
)
{
{
switch
(
aShape
)
switch
(
aShape
)
{
{
...
...
pcbnew/class_drawsegment.cpp
View file @
05faa369
...
@@ -566,7 +566,7 @@ wxString DRAWSEGMENT::GetSelectMenuText() const
...
@@ -566,7 +566,7 @@ wxString DRAWSEGMENT::GetSelectMenuText() const
wxString
temp
;
wxString
temp
;
text
.
Printf
(
_
(
"Pcb Graphic: %s length: %s on %s"
),
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
(
valeur_param
(
GetLength
(),
temp
)
),
GetChars
(
GetLayerName
()
)
);
GetChars
(
GetLayerName
()
)
);
...
...
pcbnew/class_edge_mod.cpp
View file @
05faa369
...
@@ -30,10 +30,10 @@
...
@@ -30,10 +30,10 @@
/* class EDGE_MODULE */
/* class EDGE_MODULE */
/*********************/
/*********************/
EDGE_MODULE
::
EDGE_MODULE
(
MODULE
*
parent
)
:
EDGE_MODULE
::
EDGE_MODULE
(
MODULE
*
parent
,
STROKE_T
aShape
)
:
DRAWSEGMENT
(
parent
,
PCB_MODULE_EDGE_T
)
DRAWSEGMENT
(
parent
,
PCB_MODULE_EDGE_T
)
{
{
m_Shape
=
S_SEGMENT
;
m_Shape
=
aShape
;
m_Angle
=
0
;
m_Angle
=
0
;
m_Width
=
120
;
m_Width
=
120
;
}
}
...
@@ -422,7 +422,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
...
@@ -422,7 +422,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
{
{
wxString
text
;
wxString
text
;
text
<<
_
(
"Graphic"
)
<<
wxT
(
" "
)
<<
ShowShape
(
(
Track_Shapes
)
m_Shape
);
text
<<
_
(
"Graphic"
)
<<
wxT
(
" "
)
<<
ShowShape
(
(
STROKE_T
)
m_Shape
);
text
<<
wxT
(
" ("
)
<<
GetLayerName
()
<<
wxT
(
")"
);
text
<<
wxT
(
" ("
)
<<
GetLayerName
()
<<
wxT
(
")"
);
text
<<
_
(
" of "
)
<<
(
(
MODULE
*
)
GetParent
()
)
->
GetReference
();
text
<<
_
(
" of "
)
<<
(
(
MODULE
*
)
GetParent
()
)
->
GetReference
();
...
@@ -441,7 +441,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
...
@@ -441,7 +441,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
*/
*/
void
EDGE_MODULE
::
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
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:
// for now, make it look like XML:
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
...
...
pcbnew/class_edge_mod.h
View file @
05faa369
...
@@ -22,7 +22,7 @@ public:
...
@@ -22,7 +22,7 @@ public:
wxPoint
m_End0
;
// End point, relative to module origin, orient 0.
wxPoint
m_End0
;
// End point, relative to module origin, orient 0.
public
:
public
:
EDGE_MODULE
(
MODULE
*
parent
);
EDGE_MODULE
(
MODULE
*
parent
,
STROKE_T
aShape
=
S_SEGMENT
);
EDGE_MODULE
(
EDGE_MODULE
*
edge
);
EDGE_MODULE
(
EDGE_MODULE
*
edge
);
~
EDGE_MODULE
();
~
EDGE_MODULE
();
...
...
pcbnew/class_track.h
View file @
05faa369
...
@@ -128,7 +128,7 @@ public:
...
@@ -128,7 +128,7 @@ public:
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
// overload
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
;
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:
...
@@ -102,6 +102,19 @@ protected:
*/
*/
BIU
biuParse
(
const
char
*
aValue
,
const
char
**
nptrptr
=
NULL
);
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
// load / parse functions
void
loadAllSections
(
bool
doAppend
);
void
loadAllSections
(
bool
doAppend
);
...
...
pcbnew/specctra_export.cpp
View file @
05faa369
...
@@ -229,7 +229,7 @@ static DRAWSEGMENT* findPoint( const wxPoint& aPoint, TYPE_COLLECTOR* items )
...
@@ -229,7 +229,7 @@ static DRAWSEGMENT* findPoint( const wxPoint& aPoint, TYPE_COLLECTOR* items )
DRAWSEGMENT
*
graphic
=
(
DRAWSEGMENT
*
)
(
*
items
)[
i
];
DRAWSEGMENT
*
graphic
=
(
DRAWSEGMENT
*
)
(
*
items
)[
i
];
printf
(
"type=%s, GetStart()=%d,%d GetEnd()=%d,%d
\n
"
,
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
().
x
,
graphic
->
GetStart
().
y
,
graphic
->
GetStart
().
y
,
graphic
->
GetEnd
().
x
,
graphic
->
GetEnd
().
x
,
...
@@ -667,7 +667,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
...
@@ -667,7 +667,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule )
case
S_ARC
:
case
S_ARC
:
default
:
default
:
D
(
printf
(
"makeIMAGE(): unsupported shape %s
\n
"
,
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
;
continue
;
}
}
}
}
...
@@ -858,7 +858,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER
...
@@ -858,7 +858,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER
wxString
error
;
wxString
error
;
error
.
Printf
(
_
(
"Unsupported DRAWSEGMENT type %s"
),
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
);
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