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
0dd4c05c
Commit
0dd4c05c
authored
Jun 30, 2011
by
Andrey Fedorushkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew: add trace length from pad to die on chip (module)
parent
f7009397
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
common.cpp
common/common.cpp
+1
-1
class_netinfo_item.cpp
pcbnew/class_netinfo_item.cpp
+12
-1
class_pad.cpp
pcbnew/class_pad.cpp
+10
-0
class_pad.h
pcbnew/class_pad.h
+3
-0
No files found.
common/common.cpp
View file @
0dd4c05c
...
...
@@ -632,7 +632,7 @@ const wxString& valeur_param( int valeur, wxString& buf_texte )
switch
(
g_UserUnit
)
{
case
MILLIMETRES
:
buf_texte
.
Printf
(
wxT
(
"%3.3f mm"
),
valeur
*
0.00254
);
buf_texte
.
Printf
(
_
(
"%3.3f mm"
),
valeur
*
0.00254
);
break
;
case
INCHES
:
...
...
pcbnew/class_netinfo_item.cpp
View file @
0dd4c05c
...
...
@@ -128,6 +128,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
MODULE
*
module
;
D_PAD
*
pad
;
double
lengthnet
=
0
;
double
lengthdie
=
0
;
frame
->
ClearMsgPanel
();
...
...
@@ -143,7 +144,10 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
for
(
pad
=
module
->
m_Pads
;
pad
!=
0
;
pad
=
pad
->
Next
()
)
{
if
(
pad
->
GetNet
()
==
GetNet
()
)
{
count
++
;
lengthdie
+=
pad
->
m_LengthDie
;
}
}
}
...
...
@@ -165,8 +169,15 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
txt
.
Printf
(
wxT
(
"%d"
),
count
);
frame
->
AppendMsgPanel
(
_
(
"Vias"
),
txt
,
BLUE
);
valeur_param
(
(
int
)
(
lengthnet
+
lengthdie
),
txt
);
frame
->
AppendMsgPanel
(
_
(
"Net Length:"
),
txt
,
RED
);
valeur_param
(
(
int
)
lengthnet
,
txt
);
frame
->
AppendMsgPanel
(
_
(
"Net Length"
),
txt
,
RED
);
frame
->
AppendMsgPanel
(
_
(
"on pcb"
),
txt
,
RED
);
valeur_param
(
(
int
)
lengthdie
,
txt
);
frame
->
AppendMsgPanel
(
_
(
"on die"
),
txt
,
RED
);
}
...
...
pcbnew/class_pad.cpp
View file @
0dd4c05c
...
...
@@ -210,6 +210,7 @@ void D_PAD::Copy( D_PAD* source )
m_PadShape
=
source
->
m_PadShape
;
m_Attribut
=
source
->
m_Attribut
;
m_Orient
=
source
->
m_Orient
;
m_LengthDie
=
source
->
m_LengthDie
;
m_LocalClearance
=
source
->
m_LocalClearance
;
m_LocalSolderMaskMargin
=
source
->
m_LocalSolderMaskMargin
;
m_LocalSolderPasteMargin
=
source
->
m_LocalSolderPasteMargin
;
...
...
@@ -475,6 +476,12 @@ int D_PAD::ReadDescr( LINE_READER* aReader )
m_Pos
=
m_Pos0
;
break
;
case
'L'
:
int
lengthdie
;
nn
=
sscanf
(
PtLine
,
"%d"
,
&
lengthdie
);
m_LengthDie
=
lengthdie
;
break
;
case
'.'
:
/* Read specific data */
if
(
strnicmp
(
Line
,
".SolderMask "
,
12
)
==
0
)
m_LocalSolderMaskMargin
=
atoi
(
Line
+
12
);
...
...
@@ -562,6 +569,9 @@ bool D_PAD::Save( FILE* aFile ) const
fprintf
(
aFile
,
"Po %d %d
\n
"
,
m_Pos0
.
x
,
m_Pos0
.
y
);
if
(
m_LengthDie
!=
0
)
fprintf
(
aFile
,
"Le %d
\n
"
,
m_LengthDie
);
if
(
m_LocalSolderMaskMargin
!=
0
)
fprintf
(
aFile
,
".SolderMask %d
\n
"
,
m_LocalSolderMaskMargin
);
...
...
pcbnew/class_pad.h
View file @
0dd4c05c
...
...
@@ -100,6 +100,9 @@ public:
static
int
m_PadSketchModePenSize
;
// Pen size used to draw pads in sketch mode
// (mode used to print pads on silkscreen layer)
// Length net from pad to die on chip
int
m_LengthDie
;
// Local clearance. When null, the module default value is used.
// when the module default value is null, the netclass value is used
// Usually the local clearance is null
...
...
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