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
227fa1e2
Commit
227fa1e2
authored
Feb 03, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specctra_export's net handling
parent
431a85e0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
44 deletions
+72
-44
change_log.txt
change_log.txt
+27
-20
specctra.cpp
pcbnew/specctra.cpp
+9
-5
specctra.h
pcbnew/specctra.h
+2
-0
specctra_export.cpp
pcbnew/specctra_export.cpp
+34
-19
No files found.
change_log.txt
View file @
227fa1e2
...
...
@@ -5,6 +5,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Feb-3 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
specctra_export.cpp was not exporting the nets correctly. beautification
of a few modules.
2008-Feb-1 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew:
...
...
pcbnew/specctra.cpp
View file @
227fa1e2
...
...
@@ -3563,12 +3563,16 @@ int STRINGFORMATTER::Print( int nestLevel, const char* fmt, ... ) throw( IOError
void
STRINGFORMATTER
::
StripUseless
()
{
for
(
std
::
string
::
iterator
i
=
mystring
.
begin
();
i
!=
mystring
.
end
();
)
std
::
string
copy
=
mystring
;
mystring
.
clear
();
for
(
std
::
string
::
iterator
i
=
copy
.
begin
();
i
!=
copy
.
end
();
++
i
)
{
if
(
isspace
(
*
i
)
||
*
i
==
')'
||
*
i
==
'('
||
*
i
=
=
'"'
)
mystring
.
erase
(
i
);
else
++
i
;
if
(
!
isspace
(
*
i
)
&&
*
i
!=
')'
&&
*
i
!=
'('
&&
*
i
!
=
'"'
)
{
mystring
+=
*
i
;
}
}
}
...
...
pcbnew/specctra.h
View file @
227fa1e2
...
...
@@ -3470,6 +3470,8 @@ class SPECCTRA_DB : public OUTPUTFORMATTER
/// maps PCB layer number to BOARD layer numbers
std
::
vector
<
int
>
pcbLayer2kicad
;
static
const
KICAD_T
scanPADs
[];
/**
* Function nextTok
...
...
pcbnew/specctra_export.cpp
View file @
227fa1e2
...
...
@@ -121,6 +121,9 @@ struct POINT_PAIR
typedef
std
::
vector
<
POINT_PAIR
>
POINT_PAIRS
;
const
KICAD_T
SPECCTRA_DB
::
scanPADs
[]
=
{
TYPEPAD
,
EOT
};
static
inline
void
swap
(
POINT_PAIR
&
pair
)
{
POINT
temp
=
pair
.
start
;
...
...
@@ -332,7 +335,6 @@ IMAGE* SPECCTRA_DB::makeIMAGE( MODULE* aModule )
PADSTACKS
&
padstacks
=
pcb
->
library
->
padstacks
;
TYPE_COLLECTOR
pads
;
static
const
KICAD_T
scanPADs
[]
=
{
TYPEPAD
,
EOT
};
// get all the MODULE's pads.
pads
.
Collect
(
aModule
,
scanPADs
);
...
...
@@ -772,6 +774,9 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
POINT_PAIRS
ppairs
;
POINT_PAIR
pair
;
static
const
KICAD_T
scanMODULEs
[]
=
{
TYPEMODULE
,
EOT
};
if
(
!
pcb
)
pcb
=
SPECCTRA_DB
::
MakePCB
();
...
...
@@ -1021,7 +1026,6 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
//-----<build the initial padstack list>--------------------------------
{
TYPE_COLLECTOR
pads
;
static
const
KICAD_T
scanPADs
[]
=
{
TYPEPAD
,
EOT
};
// get all the D_PADs into 'pads'.
pads
.
Collect
(
aBoard
,
scanPADs
);
...
...
@@ -1037,7 +1041,6 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
//-----<build the images and components>---------------------------------
{
static
const
KICAD_T
scanMODULEs
[]
=
{
TYPEMODULE
,
EOT
};
items
.
Collect
(
aBoard
,
scanMODULEs
);
for
(
int
m
=
0
;
m
<
items
.
GetCount
();
++
m
)
...
...
@@ -1078,15 +1081,20 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
//-----<create the nets>------------------------------------------------
{
NETWORK
*
network
=
pcb
->
network
;
TYPE_COLLECTOR
nets
;
TYPE_COLLECTOR
pads
;
static
const
KICAD_T
scanNETs
[]
=
{
PCB_EQUIPOT_STRUCT_TYPE
,
EOT
};
items
.
Collect
(
aBoard
,
scanNETs
);
nets
.
Collect
(
aBoard
,
scanNETs
);
items
.
Collect
(
aBoard
,
scanMODULEs
);
PIN_REF
emptypin
(
0
);
for
(
int
i
=
0
;
i
<
items
.
GetCount
();
++
i
)
for
(
int
n
=
0
;
n
<
nets
.
GetCount
();
++
n
)
{
EQUIPOT
*
kinet
=
(
EQUIPOT
*
)
items
[
i
];
EQUIPOT
*
kinet
=
(
EQUIPOT
*
)
nets
[
n
];
if
(
kinet
->
GetNet
()
==
0
)
continue
;
...
...
@@ -1097,23 +1105,30 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
net
->
net_id
=
CONV_TO_UTF8
(
kinet
->
m_Netname
);
net
->
net_number
=
kinet
->
GetNet
();
D_PAD
**
ppad
=
kinet
->
m_PadzoneStart
;
for
(
;
ppad
<
kinet
->
m_PadzoneEnd
;
++
ppad
)
for
(
int
m
=
0
;
m
<
items
.
GetCount
();
++
m
)
{
D_PAD
*
pad
=
*
ppad
;
MODULE
*
module
=
(
MODULE
*
)
items
[
m
]
;
wxASSERT
(
pad
->
Type
()
==
TYPEPAD
);
pads
.
Collect
(
module
,
scanPADs
);
for
(
int
p
=
0
;
p
<
pads
.
GetCount
();
++
p
)
{
D_PAD
*
pad
=
(
D_PAD
*
)
pads
[
p
];
if
(
pad
->
GetNet
()
==
kinet
->
GetNet
()
)
{
// push on an empty one, then fill it via 'pin_ref'
net
->
pins
.
push_back
(
emptypin
);
PIN_REF
*
pin_ref
=
&
net
->
pins
.
back
();
pin_ref
->
SetParent
(
net
);
pin_ref
->
component_id
=
CONV_TO_UTF8
(
((
MODULE
*
)
pad
->
m_Parent
)
->
GetReference
()
);
;
pin_ref
->
component_id
=
CONV_TO_UTF8
(
module
->
GetReference
()
)
;
pin_ref
->
pin_id
=
CONV_TO_UTF8
(
pad
->
ReturnStringPadName
()
);
}
}
}
}
}
//-----<create the wires from tracks>-----------------------------------
...
...
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