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
eaa1c223
Commit
eaa1c223
authored
Jan 23, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more specctra export work
parent
bbae2b12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletion
+42
-1
specctra_export.cpp
pcbnew/specctra_export.cpp
+42
-1
No files found.
pcbnew/specctra_export.cpp
View file @
eaa1c223
...
@@ -198,7 +198,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
...
@@ -198,7 +198,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
{
{
// get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N,
// get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N,
// and those segments comprize the board's perimeter.
// and those segments comprize the board's perimeter.
const
KICAD_T
scanDRAWSEGMENTS
[]
=
{
TYPEDRAWSEGMENT
,
EOT
};
static
const
KICAD_T
scanDRAWSEGMENTS
[]
=
{
TYPEDRAWSEGMENT
,
EOT
};
items
.
Collect
(
aBoard
,
scanDRAWSEGMENTS
);
items
.
Collect
(
aBoard
,
scanDRAWSEGMENTS
);
bool
haveEdges
=
false
;
bool
haveEdges
=
false
;
...
@@ -304,7 +304,48 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
...
@@ -304,7 +304,48 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
}
}
}
}
//-----<zone containers become planes>--------------------------------------------
{
static
const
KICAD_T
scanZONEs
[]
=
{
TYPEZONE_CONTAINER
,
EOT
};
items
.
Collect
(
aBoard
,
scanZONEs
);
for
(
int
i
=
0
;
i
<
items
.
GetCount
();
++
i
)
{
ZONE_CONTAINER
*
item
=
(
ZONE_CONTAINER
*
)
items
[
i
];
wxString
layerName
=
aBoard
->
GetLayerName
(
item
->
GetLayer
()
);
COPPER_PLANE
*
plane
=
new
COPPER_PLANE
(
pcb
->
structure
);
PATH
*
polygon
=
new
PATH
(
plane
,
T_polygon
);
plane
->
path
=
polygon
;
plane
->
name
=
CONV_TO_UTF8
(
item
->
m_Netname
);
polygon
->
layer_id
=
CONV_TO_UTF8
(
layerName
);
int
count
=
item
->
m_Poly
->
corner
.
size
();
for
(
int
j
=
0
;
j
<
count
;
++
j
)
{
wxPoint
point
(
item
->
m_Poly
->
corner
[
j
].
x
,
item
->
m_Poly
->
corner
[
j
].
y
);
polygon
->
points
.
push_back
(
mapPt
(
point
)
);
}
pcb
->
structure
->
planes
.
push_back
(
plane
);
}
}
//-----<build the padstack list here, no output>------------------------
//-----<build the padstack list here, no output>------------------------
{
// get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N,
// and those segments comprize the board's perimeter.
static
const
KICAD_T
scanPADnVIAs
[]
=
{
TYPEPAD
,
TYPEVIA
,
EOT
};
items
.
Collect
(
aBoard
,
scanPADnVIAs
);
for
(
int
i
=
0
;
i
<
items
.
GetCount
();
++
i
)
{
// items[i]->Show( 0, std::cout );
}
}
//-----<via_descriptor>-------------------------------------------------
//-----<via_descriptor>-------------------------------------------------
...
...
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