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
e775cee9
Commit
e775cee9
authored
Jan 31, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more amazing free software
parent
b91f11ad
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
118 deletions
+195
-118
specctra.cpp
pcbnew/specctra.cpp
+16
-19
specctra.h
pcbnew/specctra.h
+37
-33
specctra_export.cpp
pcbnew/specctra_export.cpp
+142
-66
No files found.
pcbnew/specctra.cpp
View file @
e775cee9
...
...
@@ -2702,36 +2702,32 @@ void SPECCTRA_DB::doWIRE( WIRE* growth ) throw( IOError )
switch
(
tok
)
{
case
T_rect
:
case
T_circle
:
case
T_path
:
case
T_polygon
:
case
T_qarc
:
if
(
growth
->
rectangle
||
growth
->
circle
||
growth
->
path
||
growth
->
qarc
)
if
(
growth
->
shape
)
unexpected
(
tok
);
default
:
;
}
switch
(
tok
)
{
case
T_rect
:
growth
->
rectangle
=
new
RECTANGLE
(
growth
);
doRECTANGLE
(
growth
->
rectangle
);
growth
->
shape
=
new
RECTANGLE
(
growth
);
doRECTANGLE
(
(
RECTANGLE
*
)
growth
->
shape
);
break
;
case
T_circle
:
growth
->
circle
=
new
CIRCLE
(
growth
);
doCIRCLE
(
growth
->
circle
);
if
(
growth
->
shape
)
unexpected
(
tok
);
growth
->
shape
=
new
CIRCLE
(
growth
);
doCIRCLE
(
(
CIRCLE
*
)
growth
->
shape
);
break
;
case
T_path
:
case
T_polygon
:
growth
->
path
=
new
PATH
(
growth
,
tok
);
doPATH
(
growth
->
path
);
if
(
growth
->
shape
)
unexpected
(
tok
);
growth
->
shape
=
new
PATH
(
growth
,
tok
);
doPATH
(
(
PATH
*
)
growth
->
shape
);
break
;
case
T_qarc
:
growth
->
qarc
=
new
QARC
(
growth
);
doQARC
(
growth
->
qarc
);
if
(
growth
->
shape
)
unexpected
(
tok
);
growth
->
shape
=
new
QARC
(
growth
);
doQARC
(
(
QARC
*
)
growth
->
shape
);
break
;
case
T_net
:
...
...
@@ -3472,6 +3468,7 @@ PCB* SPECCTRA_DB::MakePCB()
pcb
->
structure
->
rules
=
new
RULE
(
pcb
->
structure
,
T_rule
);
pcb
->
placement
=
new
PLACEMENT
(
pcb
);
pcb
->
placement
->
flip_style
=
T_mirror_first
;
pcb
->
library
=
new
LIBRARY
(
pcb
);
...
...
pcbnew/specctra.h
View file @
e775cee9
...
...
@@ -1782,7 +1782,7 @@ public:
ELEM
(
T_placement
,
aParent
)
{
unit
=
0
;
flip_style
=
T_
NONE
;
flip_style
=
T_
mirror_first
;
}
~
PLACEMENT
()
...
...
@@ -2660,12 +2660,14 @@ class WIRE : public ELEM
{
friend
class
SPECCTRA_DB
;
//----- only one of these is used, like a union -----
PATH
*
path
;
///< used for both path and polygon
RECTANGLE
*
rectangle
;
CIRCLE
*
circle
;
QARC
*
qarc
;
//---------------------------------------------------
/* <shape_descriptor >::=
[<rectangle_descriptor> |
<circle_descriptor> |
<polygon_descriptor> |
<path_descriptor> |
<qarc_descriptor> ]
*/
ELEM
*
shape
;
std
::
string
net_id
;
int
turret
;
...
...
@@ -2680,10 +2682,7 @@ public:
WIRE
(
ELEM
*
aParent
)
:
ELEM
(
T_wire
,
aParent
)
{
path
=
0
;
rectangle
=
0
;
circle
=
0
;
qarc
=
0
;
shape
=
0
;
connect
=
0
;
turret
=
-
1
;
...
...
@@ -2694,27 +2693,29 @@ public:
~
WIRE
()
{
delete
path
;
delete
rectangle
;
delete
circle
;
delete
qarc
;
delete
shape
;
delete
connect
;
}
void
FormatContents
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
throw
(
IOError
)
void
SetShape
(
ELEM
*
aShape
)
{
// these are mutually exclusive
if
(
rectangle
)
rectangle
->
Format
(
out
,
nestLevel
);
else
if
(
path
)
path
->
Format
(
out
,
nestLevel
);
delete
shape
;
shape
=
aShape
;
else
if
(
circle
)
circle
->
Format
(
out
,
nestLevel
);
else
if
(
qarc
)
qarc
->
Format
(
out
,
nestLevel
);
if
(
aShape
)
{
wxASSERT
(
aShape
->
Type
()
==
T_rect
||
aShape
->
Type
()
==
T_circle
||
aShape
->
Type
()
==
T_qarc
||
aShape
->
Type
()
==
T_path
||
aShape
->
Type
()
==
T_polygon
);
aShape
->
SetParent
(
this
);
}
}
void
FormatContents
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
throw
(
IOError
)
{
if
(
shape
)
shape
->
Format
(
out
,
nestLevel
);
if
(
net_id
.
size
()
)
{
...
...
@@ -3392,19 +3393,22 @@ public:
*/
class
SPECCTRA_DB
:
public
OUTPUTFORMATTER
{
LEXER
*
lexer
;
LEXER
*
lexer
;
PCB
*
pcb
;
PCB
*
pcb
;
SESSION
*
session
;
SESSION
*
session
;
FILE
*
fp
;
FILE
*
fp
;
wxString
filename
;
wxString
filename
;
std
::
string
quote_char
;
std
::
string
quote_char
;
STRINGFORMATTER
sf
;
// FromBOARD() uses this
STRINGS
layerIds
;
/**
...
...
pcbnew/specctra_export.cpp
View file @
e775cee9
This diff is collapsed.
Click to expand it.
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