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
31aee8ef
Commit
31aee8ef
authored
Feb 06, 2009
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specctra export zone 'cutout' support
parent
d73e1324
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
10 deletions
+56
-10
CHANGELOG.txt
CHANGELOG.txt
+7
-1
specctra.h
pcbnew/specctra.h
+10
-2
specctra_export.cpp
pcbnew/specctra_export.cpp
+39
-7
No files found.
CHANGELOG.txt
View file @
31aee8ef
...
...
@@ -5,6 +5,11 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2009-Feb-06 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++pcbnew
added "cutout" from a ZONE_CONTAINER capability to the SPECCTRA export.
2009-Feb-6 Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
...
...
@@ -37,6 +42,7 @@ email address.
automatically scrolling the drawing.
>>>>>>> .r1562
2009-Feb-4 UPDATE Vesa Solonen <vesa.solonen@hut.fi>
================================================================================
++pcbnew:
...
...
pcbnew/specctra.h
View file @
31aee8ef
...
...
@@ -1005,6 +1005,12 @@ public:
}
}
void
AddWindow
(
WINDOW
*
aWindow
)
{
aWindow
->
SetParent
(
this
);
windows
.
push_back
(
aWindow
);
}
void
Format
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
throw
(
IOError
)
{
const
char
*
newline
=
"
\n
"
;
...
...
@@ -1047,8 +1053,10 @@ public:
for
(
WINDOWS
::
iterator
i
=
windows
.
begin
();
i
!=
windows
.
end
();
++
i
)
i
->
Format
(
out
,
nestLevel
+
1
);
}
out
->
Print
(
nestLevel
,
")
\n
"
);
}
else
out
->
Print
(
0
,
")
\n
"
);
}
};
...
...
pcbnew/specctra_export.cpp
View file @
31aee8ef
...
...
@@ -1036,19 +1036,51 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
COPPER_PLANE
*
plane
=
new
COPPER_PLANE
(
pcb
->
structure
);
pcb
->
structure
->
planes
.
push_back
(
plane
);
PATH
*
p
olygon
=
new
PATH
(
plane
,
T_polygon
);
plane
->
SetShape
(
p
olygon
);
PATH
*
mainP
olygon
=
new
PATH
(
plane
,
T_polygon
);
plane
->
SetShape
(
mainP
olygon
);
plane
->
name
=
CONV_TO_UTF8
(
item
->
m_Netname
);
p
olygon
->
layer_id
=
layerIds
[
kicadLayer2pcb
[
item
->
GetLayer
()
]
];
mainP
olygon
->
layer_id
=
layerIds
[
kicadLayer2pcb
[
item
->
GetLayer
()
]
];
int
count
=
item
->
m_Poly
->
corner
.
size
();
for
(
int
j
=
0
;
j
<
count
;
++
j
)
int
ndx
=
0
;
// used in 2 for() loops below
for
(
;
ndx
<
count
;
++
ndx
)
{
wxPoint
point
(
item
->
m_Poly
->
corner
[
j
].
x
,
item
->
m_Poly
->
corner
[
j
].
y
);
polygon
->
AppendPoint
(
mapPt
(
point
)
);
wxPoint
point
(
item
->
m_Poly
->
corner
[
ndx
].
x
,
item
->
m_Poly
->
corner
[
ndx
].
y
);
mainPolygon
->
AppendPoint
(
mapPt
(
point
)
);
// this was the end of the main polygon
if
(
item
->
m_Poly
->
corner
[
ndx
].
end_contour
)
break
;
}
WINDOW
*
window
=
0
;
PATH
*
cutout
=
0
;
// handle the cutouts
// http://www.freerouting.net/fen/viewtopic.php?f=6&t=19
for
(
++
ndx
;
ndx
<
count
;
++
ndx
)
{
if
(
item
->
m_Poly
->
corner
[
ndx
-
1
].
end_contour
)
{
window
=
new
WINDOW
(
plane
);
plane
->
AddWindow
(
window
);
cutout
=
new
PATH
(
window
,
T_path
);
// cutout = new PATH( window, T_polygon );
window
->
SetShape
(
cutout
);
cutout
->
layer_id
=
layerIds
[
kicadLayer2pcb
[
item
->
GetLayer
()
]
];
}
wxASSERT
(
window
);
wxASSERT
(
cutout
);
wxPoint
point
(
item
->
m_Poly
->
corner
[
ndx
].
x
,
item
->
m_Poly
->
corner
[
ndx
].
y
);
cutout
->
AppendPoint
(
mapPt
(
point
)
);
}
}
}
...
...
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