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
625e8b06
Commit
625e8b06
authored
Apr 29, 2013
by
Felix Morgner
Browse files
Options
Browse Files
Download
Plain Diff
merge with upstream
parents
bb6fffa5
f92cfcae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
14 deletions
+19
-14
class_pcb_text.cpp
pcbnew/class_pcb_text.cpp
+1
-1
specctra.cpp
pcbnew/specctra.cpp
+2
-2
specctra.h
pcbnew/specctra.h
+7
-3
specctra_export.cpp
pcbnew/specctra_export.cpp
+1
-1
specctra_import.cpp
pcbnew/specctra_import.cpp
+8
-7
No files found.
pcbnew/class_pcb_text.cpp
View file @
625e8b06
...
@@ -112,7 +112,7 @@ void TEXTE_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
...
@@ -112,7 +112,7 @@ void TEXTE_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
{
{
wxString
msg
;
wxString
msg
;
#if defined(
DEBUG
)
#if defined(
__WXDEBUG__
)
BOARD_ITEM
*
parent
=
(
BOARD_ITEM
*
)
m_Parent
;
BOARD_ITEM
*
parent
=
(
BOARD_ITEM
*
)
m_Parent
;
wxASSERT
(
parent
);
wxASSERT
(
parent
);
...
...
pcbnew/specctra.cpp
View file @
625e8b06
...
@@ -96,14 +96,14 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard )
...
@@ -96,14 +96,14 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard )
}
}
LAYER_NUM
SPECCTRA_DB
::
findLayerName
(
const
std
::
string
&
aLayerName
)
const
int
SPECCTRA_DB
::
findLayerName
(
const
std
::
string
&
aLayerName
)
const
{
{
for
(
LAYER_NUM
i
=
FIRST_LAYER
;
i
<
int
(
layerIds
.
size
());
++
i
)
for
(
LAYER_NUM
i
=
FIRST_LAYER
;
i
<
int
(
layerIds
.
size
());
++
i
)
{
{
if
(
0
==
aLayerName
.
compare
(
layerIds
[
i
]
)
)
if
(
0
==
aLayerName
.
compare
(
layerIds
[
i
]
)
)
return
i
;
return
i
;
}
}
return
UNDEFINED_LAYER
;
return
-
1
;
}
}
...
...
pcbnew/specctra.h
View file @
625e8b06
...
@@ -3577,7 +3577,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
...
@@ -3577,7 +3577,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
STRINGS
layerIds
;
///< indexed by PCB layer number
STRINGS
layerIds
;
///< indexed by PCB layer number
/// maps BOARD layer number to PCB layer numbers
/// maps BOARD layer number to PCB layer numbers
std
::
vector
<
LAYER_NUM
>
kicadLayer2pcb
;
std
::
vector
<
int
>
kicadLayer2pcb
;
/// maps PCB layer number to BOARD layer numbers
/// maps PCB layer number to BOARD layer numbers
std
::
vector
<
LAYER_NUM
>
pcbLayer2kicad
;
std
::
vector
<
LAYER_NUM
>
pcbLayer2kicad
;
...
@@ -3606,9 +3606,13 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
...
@@ -3606,9 +3606,13 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
/**
/**
* Function findLayerName
* Function findLayerName
* returns the PCB layer index for a given layer name
* returns the PCB layer index for a given layer name, within the specctra session
* file.
*
* @return int - the layer index within the specctra session file, or -1 if
* aLayerName is not found.
*/
*/
LAYER_NUM
findLayerName
(
const
std
::
string
&
aLayerName
)
const
;
int
findLayerName
(
const
std
::
string
&
aLayerName
)
const
;
/**
/**
* Function readCOMPnPIN
* Function readCOMPnPIN
...
...
pcbnew/specctra_export.cpp
View file @
625e8b06
...
@@ -783,8 +783,8 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER
...
@@ -783,8 +783,8 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER
}
}
else
// remove graphics not on EDGE_N layer
else
// remove graphics not on EDGE_N layer
{
{
++
i
;
D
(
items
[
i
]
->
Show
(
0
,
std
::
cout
);)
D
(
items
[
i
]
->
Show
(
0
,
std
::
cout
);)
++
i
;
}
}
}
}
...
...
pcbnew/specctra_import.cpp
View file @
625e8b06
...
@@ -319,8 +319,9 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
...
@@ -319,8 +319,9 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
}
}
else
// VIA_MICROVIA or VIA_BLIND_BURIED
else
// VIA_MICROVIA or VIA_BLIND_BURIED
{
{
LAYER_NUM
topLayerNdx
=
UNDEFINED_LAYER
;
int
topLayerNdx
=
-
1
;
// session layer detectors
LAYER_NUM
botLayerNdx
=
7000
;
// Ask Dick if this number loses its magic
int
botLayerNdx
=
INT_MAX
;
int
viaDiam
=
-
1
;
int
viaDiam
=
-
1
;
for
(
int
i
=
0
;
i
<
shapeCount
;
++
i
)
for
(
int
i
=
0
;
i
<
shapeCount
;
++
i
)
...
@@ -333,8 +334,8 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
...
@@ -333,8 +334,8 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
CIRCLE
*
circle
=
(
CIRCLE
*
)
shape
->
shape
;
CIRCLE
*
circle
=
(
CIRCLE
*
)
shape
->
shape
;
LAYER_NUM
layerNdx
=
findLayerName
(
circle
->
layer_id
);
int
layerNdx
=
findLayerName
(
circle
->
layer_id
);
if
(
layerNdx
==
UNDEFINED_LAYER
)
if
(
layerNdx
==
-
1
)
{
{
wxString
layerName
=
FROM_UTF8
(
circle
->
layer_id
.
c_str
()
);
wxString
layerName
=
FROM_UTF8
(
circle
->
layer_id
.
c_str
()
);
ThrowIOError
(
_
(
"Session file uses invalid layer id
\"
%s
\"
"
),
ThrowIOError
(
_
(
"Session file uses invalid layer id
\"
%s
\"
"
),
...
@@ -363,10 +364,10 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
...
@@ -363,10 +364,10 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
via
->
SetWidth
(
viaDiam
);
via
->
SetWidth
(
viaDiam
);
topLayerNdx
=
pcbLayer2kicad
[
topLayerNdx
];
LAYER_NUM
topLayer
=
pcbLayer2kicad
[
topLayerNdx
];
botLayerNdx
=
pcbLayer2kicad
[
botLayerNdx
];
LAYER_NUM
botLayer
=
pcbLayer2kicad
[
botLayerNdx
];
via
->
SetLayerPair
(
topLayer
Ndx
,
botLayerNdx
);
via
->
SetLayerPair
(
topLayer
,
botLayer
);
}
}
if
(
via
)
if
(
via
)
...
...
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