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
Show 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 )
...
@@ -2702,36 +2702,32 @@ void SPECCTRA_DB::doWIRE( WIRE* growth ) throw( IOError )
switch
(
tok
)
switch
(
tok
)
{
{
case
T_rect
:
case
T_rect
:
case
T_circle
:
if
(
growth
->
shape
)
case
T_path
:
case
T_polygon
:
case
T_qarc
:
if
(
growth
->
rectangle
||
growth
->
circle
||
growth
->
path
||
growth
->
qarc
)
unexpected
(
tok
);
unexpected
(
tok
);
default
:
;
growth
->
shape
=
new
RECTANGLE
(
growth
);
}
doRECTANGLE
(
(
RECTANGLE
*
)
growth
->
shape
);
switch
(
tok
)
{
case
T_rect
:
growth
->
rectangle
=
new
RECTANGLE
(
growth
);
doRECTANGLE
(
growth
->
rectangle
);
break
;
break
;
case
T_circle
:
case
T_circle
:
growth
->
circle
=
new
CIRCLE
(
growth
);
if
(
growth
->
shape
)
doCIRCLE
(
growth
->
circle
);
unexpected
(
tok
);
growth
->
shape
=
new
CIRCLE
(
growth
);
doCIRCLE
(
(
CIRCLE
*
)
growth
->
shape
);
break
;
break
;
case
T_path
:
case
T_path
:
case
T_polygon
:
case
T_polygon
:
growth
->
path
=
new
PATH
(
growth
,
tok
);
if
(
growth
->
shape
)
doPATH
(
growth
->
path
);
unexpected
(
tok
);
growth
->
shape
=
new
PATH
(
growth
,
tok
);
doPATH
(
(
PATH
*
)
growth
->
shape
);
break
;
break
;
case
T_qarc
:
case
T_qarc
:
growth
->
qarc
=
new
QARC
(
growth
);
if
(
growth
->
shape
)
doQARC
(
growth
->
qarc
);
unexpected
(
tok
);
growth
->
shape
=
new
QARC
(
growth
);
doQARC
(
(
QARC
*
)
growth
->
shape
);
break
;
break
;
case
T_net
:
case
T_net
:
...
@@ -3472,6 +3468,7 @@ PCB* SPECCTRA_DB::MakePCB()
...
@@ -3472,6 +3468,7 @@ PCB* SPECCTRA_DB::MakePCB()
pcb
->
structure
->
rules
=
new
RULE
(
pcb
->
structure
,
T_rule
);
pcb
->
structure
->
rules
=
new
RULE
(
pcb
->
structure
,
T_rule
);
pcb
->
placement
=
new
PLACEMENT
(
pcb
);
pcb
->
placement
=
new
PLACEMENT
(
pcb
);
pcb
->
placement
->
flip_style
=
T_mirror_first
;
pcb
->
library
=
new
LIBRARY
(
pcb
);
pcb
->
library
=
new
LIBRARY
(
pcb
);
...
...
pcbnew/specctra.h
View file @
e775cee9
...
@@ -1782,7 +1782,7 @@ public:
...
@@ -1782,7 +1782,7 @@ public:
ELEM
(
T_placement
,
aParent
)
ELEM
(
T_placement
,
aParent
)
{
{
unit
=
0
;
unit
=
0
;
flip_style
=
T_
NONE
;
flip_style
=
T_
mirror_first
;
}
}
~
PLACEMENT
()
~
PLACEMENT
()
...
@@ -2660,12 +2660,14 @@ class WIRE : public ELEM
...
@@ -2660,12 +2660,14 @@ class WIRE : public ELEM
{
{
friend
class
SPECCTRA_DB
;
friend
class
SPECCTRA_DB
;
//----- only one of these is used, like a union -----
/* <shape_descriptor >::=
PATH
*
path
;
///< used for both path and polygon
[<rectangle_descriptor> |
RECTANGLE
*
rectangle
;
<circle_descriptor> |
CIRCLE
*
circle
;
<polygon_descriptor> |
QARC
*
qarc
;
<path_descriptor> |
//---------------------------------------------------
<qarc_descriptor> ]
*/
ELEM
*
shape
;
std
::
string
net_id
;
std
::
string
net_id
;
int
turret
;
int
turret
;
...
@@ -2680,10 +2682,7 @@ public:
...
@@ -2680,10 +2682,7 @@ public:
WIRE
(
ELEM
*
aParent
)
:
WIRE
(
ELEM
*
aParent
)
:
ELEM
(
T_wire
,
aParent
)
ELEM
(
T_wire
,
aParent
)
{
{
path
=
0
;
shape
=
0
;
rectangle
=
0
;
circle
=
0
;
qarc
=
0
;
connect
=
0
;
connect
=
0
;
turret
=
-
1
;
turret
=
-
1
;
...
@@ -2694,27 +2693,29 @@ public:
...
@@ -2694,27 +2693,29 @@ public:
~
WIRE
()
~
WIRE
()
{
{
delete
path
;
delete
shape
;
delete
rectangle
;
delete
circle
;
delete
qarc
;
delete
connect
;
delete
connect
;
}
}
void
FormatContents
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
throw
(
IOError
)
void
SetShape
(
ELEM
*
aShape
)
{
{
// these are mutually exclusive
delete
shape
;
if
(
rectangle
)
shape
=
aShape
;
rectangle
->
Format
(
out
,
nestLevel
);
else
if
(
path
)
if
(
aShape
)
path
->
Format
(
out
,
nestLevel
);
{
wxASSERT
(
aShape
->
Type
()
==
T_rect
||
aShape
->
Type
()
==
T_circle
||
aShape
->
Type
()
==
T_qarc
||
aShape
->
Type
()
==
T_path
||
aShape
->
Type
()
==
T_polygon
);
else
if
(
circle
)
aShape
->
SetParent
(
this
);
circle
->
Format
(
out
,
nestLevel
);
}
}
else
if
(
qarc
)
void
FormatContents
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
throw
(
IOError
)
qarc
->
Format
(
out
,
nestLevel
);
{
if
(
shape
)
shape
->
Format
(
out
,
nestLevel
);
if
(
net_id
.
size
()
)
if
(
net_id
.
size
()
)
{
{
...
@@ -3406,6 +3407,9 @@ class SPECCTRA_DB : public OUTPUTFORMATTER
...
@@ -3406,6 +3407,9 @@ class SPECCTRA_DB : public OUTPUTFORMATTER
STRINGFORMATTER
sf
;
STRINGFORMATTER
sf
;
// FromBOARD() uses this
STRINGS
layerIds
;
/**
/**
* Function nextTok
* Function nextTok
...
...
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