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
fe405674
Commit
fe405674
authored
Mar 02, 2015
by
Tomasz Włostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
router: shove now respects diff pair gap
parent
bf3128c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
30 deletions
+4
-30
pns_diff_pair_placer.cpp
pcbnew/router/pns_diff_pair_placer.cpp
+1
-12
pns_router.cpp
pcbnew/router/pns_router.cpp
+3
-16
pns_shove.cpp
pcbnew/router/pns_shove.cpp
+0
-2
No files found.
pcbnew/router/pns_diff_pair_placer.cpp
View file @
fe405674
...
...
@@ -167,29 +167,20 @@ bool PNS_DIFF_PAIR_PLACER::attemptWalk ( PNS_NODE* aNode, PNS_DIFF_PAIR* aCurren
int
mask
=
aSolidsOnly
?
PNS_ITEM
::
SOLID
:
PNS_ITEM
::
ANY
;
Router
()
->
DisplayDebugLine
(
aCurrent
->
CP
(),
4
,
10000
);
Router
()
->
DisplayDebugLine
(
aCurrent
->
CN
(),
5
,
10000
);
printf
(
"WStart
\n
"
);
do
{
PNS_LINE
preWalk
=
(
currentIsP
?
cur
.
PLine
()
:
cur
.
NLine
()
);
PNS_LINE
preShove
=
(
currentIsP
?
cur
.
NLine
()
:
cur
.
PLine
()
);
PNS_LINE
postWalk
;
printf
(
"iter %d
\n
"
,
iter
);
if
(
!
aNode
->
CheckColliding
(
&
preWalk
,
mask
)
)
{
printf
(
"PreWalkIsColl
\n
"
);
currentIsP
=
!
currentIsP
;
if
(
!
aNode
->
CheckColliding
(
&
preShove
,
mask
)
)
break
;
else
{
printf
(
"PreShoveIsColl
\n
"
);
continue
;
}
}
wf1
=
walkaround
.
Route
(
preWalk
,
postWalk
,
false
);
...
...
@@ -199,7 +190,7 @@ bool PNS_DIFF_PAIR_PLACER::attemptWalk ( PNS_NODE* aNode, PNS_DIFF_PAIR* aCurren
PNS_LINE
postShove
(
preShove
);
shove
.
ForceClearance
(
true
,
cur
.
Gap
()
);
shove
.
ForceClearance
(
true
,
cur
.
Gap
()
-
2
*
PNS_HULL_MARGIN
);
PNS_SHOVE
::
SHOVE_STATUS
sh1
;
...
...
@@ -474,7 +465,6 @@ bool PNS_DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, PNS_ITEM* aI
BOARD
*
brd
=
Router
()
->
GetBoard
();
PNS_ITEM
*
primRef
=
NULL
,
*
primP
=
NULL
,
*
primN
=
NULL
;
// printf("Current %p\n", m_currentNode);
int
refNet
;
wxString
suffix
;
...
...
@@ -503,7 +493,6 @@ bool PNS_DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, PNS_ITEM* aI
else
refNet
=
netP
;
// printf("Net: P: %s N: %s\n", (const char *)(netNameP.c_str()), (const char *)(netNameN.c_str()));
std
::
set
<
PNS_ITEM
*>
items
;
...
...
pcbnew/router/pns_router.cpp
View file @
fe405674
...
...
@@ -82,8 +82,6 @@ PNS_PCBNEW_CLEARANCE_FUNC::PNS_PCBNEW_CLEARANCE_FUNC( PNS_ROUTER *aRouter ) :
CLEARANCE_ENT
ent
;
ent
.
coupledNet
=
topo
.
DpCoupledNet
(
i
);
printf
(
"net %d coupled %d
\n
"
,
i
,
ent
.
coupledNet
);
wxString
netClassName
=
ni
->
GetClassName
();
NETCLASSPTR
nc
=
brd
->
GetDesignSettings
().
m_NetClasses
.
Find
(
netClassName
);
...
...
@@ -122,22 +120,11 @@ int PNS_PCBNEW_CLEARANCE_FUNC::operator()( const PNS_ITEM* aA, const PNS_ITEM* a
int
net_b
=
aB
->
Net
();
int
cl_b
=
(
net_b
>=
0
?
m_clearanceCache
[
net_b
].
clearance
:
m_defaultClearance
);
bool
segsOnly
=
aA
->
OfKind
(
PNS_ITEM
::
SEGMENT
)
&&
aB
->
OfKind
(
PNS_ITEM
::
SEGMENT
);
bool
linesOnly
=
aA
->
OfKind
(
PNS_ITEM
::
SEGMENT
|
PNS_ITEM
::
LINE
)
&&
aB
->
OfKind
(
PNS_ITEM
::
SEGMENT
|
PNS_ITEM
::
LINE
);
#if 0
if( segsOnly && net_a >= 0 && net_b >= 0 && m_clearanceCache[net_a].coupledNet == net_b )
{
cl_a = cl_b = m_router->Sizes().DiffPairGap() - 3 * PNS_HULL_MARGIN;
printf("Cl %d\n", cl_a);
}
#endif
if
(
m_overrideEnabled
&&
segsOnly
)
if
(
linesOnly
&&
net_a
>=
0
&&
net_b
>=
0
&&
m_clearanceCache
[
net_a
].
coupledNet
==
net_b
)
{
if
(
net_a
==
m_overrideNetA
&&
net_b
==
m_overrideNetB
)
return
m_overrideClearance
;
else
if
(
net_a
==
m_overrideNetB
&&
net_b
==
m_overrideNetA
)
return
m_overrideClearance
;
cl_a
=
cl_b
=
m_router
->
Sizes
().
DiffPairGap
()
-
2
*
PNS_HULL_MARGIN
;
}
int
pad_a
=
localPadClearance
(
aA
);
...
...
pcbnew/router/pns_shove.cpp
View file @
fe405674
...
...
@@ -387,8 +387,6 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingLine( PNS_LINE* aCurrent, PNS_LINE
PNS_SHOVE
::
SHOVE_STATUS
PNS_SHOVE
::
onCollidingSolid
(
PNS_LINE
*
aCurrent
,
PNS_SOLID
*
aObstacleSolid
)
{
//printf("pre2-v %d\n", aCurrent->EndsWithVia());
PNS_WALKAROUND
walkaround
(
m_currentNode
,
Router
()
);
PNS_LINE
*
walkaroundLine
=
clone
(
aCurrent
);
...
...
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