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
2619ceae
Commit
2619ceae
authored
May 31, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PNS formatting code.
parent
b1a19b12
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
pns_line_placer.cpp
pcbnew/router/pns_line_placer.cpp
+3
-3
pns_router.cpp
pcbnew/router/pns_router.cpp
+10
-11
router_tool.cpp
pcbnew/router/router_tool.cpp
+1
-1
No files found.
pcbnew/router/pns_line_placer.cpp
View file @
2619ceae
...
@@ -402,7 +402,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead )
...
@@ -402,7 +402,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead )
}
}
bool
PNS_LINE_PLACER
::
rhWalkOnly
(
const
VECTOR2I
&
aP
,
PNS_LINE
&
aNewHead
)
bool
PNS_LINE_PLACER
::
rhWalkOnly
(
const
VECTOR2I
&
aP
,
PNS_LINE
&
aNewHead
)
{
{
SHAPE_LINE_CHAIN
line
=
m_direction
.
BuildInitialTrace
(
m_p_start
,
aP
);
SHAPE_LINE_CHAIN
line
=
m_direction
.
BuildInitialTrace
(
m_p_start
,
aP
);
PNS_LINE
initTrack
(
m_head
,
line
),
walkFull
;
PNS_LINE
initTrack
(
m_head
,
line
),
walkFull
;
...
@@ -829,9 +829,9 @@ void PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem )
...
@@ -829,9 +829,9 @@ void PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem )
if
(
!
current
.
PointCount
()
)
if
(
!
current
.
PointCount
()
)
m_currentEnd
=
m_p_start
;
m_currentEnd
=
m_p_start
;
else
else
m_currentEnd
=
current
.
CLine
().
CPoint
(
-
1
);
m_currentEnd
=
current
.
CLine
().
CPoint
(
-
1
);
PNS_NODE
*
latestNode
=
m_currentNode
;
PNS_NODE
*
latestNode
=
m_currentNode
;
m_lastNode
=
latestNode
->
Branch
();
m_lastNode
=
latestNode
->
Branch
();
if
(
eiDepth
>=
0
&&
aEndItem
&&
latestNode
->
Depth
()
>
eiDepth
&&
if
(
eiDepth
>=
0
&&
aEndItem
&&
latestNode
->
Depth
()
>
eiDepth
&&
...
...
pcbnew/router/pns_router.cpp
View file @
2619ceae
...
@@ -235,7 +235,6 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia )
...
@@ -235,7 +235,6 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia )
aVia
->
GetDrillValue
(),
aVia
->
GetDrillValue
(),
aVia
->
GetNetCode
()
);
aVia
->
GetNetCode
()
);
v
->
SetDrill
(
aVia
->
GetDrill
()
);
v
->
SetParent
(
aVia
);
v
->
SetParent
(
aVia
);
return
v
;
return
v
;
...
@@ -463,7 +462,7 @@ bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem )
...
@@ -463,7 +462,7 @@ bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem )
if
(
!
aStartItem
||
aStartItem
->
OfKind
(
PNS_ITEM
::
SOLID
)
)
if
(
!
aStartItem
||
aStartItem
->
OfKind
(
PNS_ITEM
::
SOLID
)
)
return
false
;
return
false
;
m_dragger
=
new
PNS_DRAGGER
(
this
);
m_dragger
=
new
PNS_DRAGGER
(
this
);
m_dragger
->
SetWorld
(
m_world
);
m_dragger
->
SetWorld
(
m_world
);
if
(
m_dragger
->
Start
(
aP
,
aStartItem
)
)
if
(
m_dragger
->
Start
(
aP
,
aStartItem
)
)
...
@@ -485,7 +484,7 @@ bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem )
...
@@ -485,7 +484,7 @@ bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem )
m_placer
=
new
PNS_LINE_PLACER
(
this
);
m_placer
=
new
PNS_LINE_PLACER
(
this
);
m_placer
->
SetLayer
(
m_currentLayer
);
m_placer
->
SetLayer
(
m_currentLayer
);
m_placer
->
SetWidth
(
m_settings
.
GetTrackWidth
()
);
m_placer
->
SetWidth
(
m_settings
.
GetTrackWidth
()
);
m_placer
->
Start
(
aP
,
aStartItem
);
m_placer
->
Start
(
aP
,
aStartItem
);
m_currentEnd
=
aP
;
m_currentEnd
=
aP
;
m_currentEndItem
=
NULL
;
m_currentEndItem
=
NULL
;
...
@@ -575,7 +574,7 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem )
...
@@ -575,7 +574,7 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem )
break
;
break
;
case
DRAG_SEGMENT
:
case
DRAG_SEGMENT
:
moveDragging
(
aP
,
endItem
);
moveDragging
(
aP
,
endItem
);
break
;
break
;
default
:
default
:
...
@@ -598,7 +597,7 @@ void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* aEndItem )
...
@@ -598,7 +597,7 @@ void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* aEndItem )
void
PNS_ROUTER
::
markViolations
(
PNS_NODE
*
aNode
,
PNS_ITEMSET
&
aCurrent
,
void
PNS_ROUTER
::
markViolations
(
PNS_NODE
*
aNode
,
PNS_ITEMSET
&
aCurrent
,
PNS_NODE
::
ITEM_VECTOR
&
aRemoved
)
PNS_NODE
::
ITEM_VECTOR
&
aRemoved
)
{
{
BOOST_FOREACH
(
PNS_ITEM
*
item
,
aCurrent
.
Items
()
)
BOOST_FOREACH
(
PNS_ITEM
*
item
,
aCurrent
.
Items
()
)
{
{
PNS_NODE
::
OBSTACLES
obstacles
;
PNS_NODE
::
OBSTACLES
obstacles
;
...
@@ -606,11 +605,11 @@ void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent,
...
@@ -606,11 +605,11 @@ void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent,
if
(
item
->
OfKind
(
PNS_ITEM
::
LINE
)
)
if
(
item
->
OfKind
(
PNS_ITEM
::
LINE
)
)
{
{
PNS_LINE
*
l
=
static_cast
<
PNS_LINE
*>
(
item
);
PNS_LINE
*
l
=
static_cast
<
PNS_LINE
*>
(
item
);
if
(
l
->
EndsWithVia
()
)
if
(
l
->
EndsWithVia
()
)
{
{
PNS_VIA
v
(
l
->
Via
()
);
PNS_VIA
v
(
l
->
Via
()
);
aNode
->
QueryColliding
(
&
v
,
obstacles
,
PNS_ITEM
::
ANY
);
aNode
->
QueryColliding
(
&
v
,
obstacles
,
PNS_ITEM
::
ANY
);
}
}
}
}
...
@@ -685,8 +684,8 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem )
...
@@ -685,8 +684,8 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem )
if
(
current
.
EndsWithVia
()
)
if
(
current
.
EndsWithVia
()
)
DisplayItem
(
&
current
.
Via
()
);
DisplayItem
(
&
current
.
Via
()
);
PNS_ITEMSET
tmp
(
&
current
);
PNS_ITEMSET
tmp
(
&
current
);
updateView
(
m_placer
->
CurrentNode
(
true
),
tmp
);
updateView
(
m_placer
->
CurrentNode
(
true
),
tmp
);
}
}
...
@@ -836,7 +835,7 @@ void PNS_ROUTER::FlipPosture()
...
@@ -836,7 +835,7 @@ void PNS_ROUTER::FlipPosture()
if
(
m_state
==
ROUTE_TRACK
)
if
(
m_state
==
ROUTE_TRACK
)
{
{
m_placer
->
FlipPosture
();
m_placer
->
FlipPosture
();
m_placer
->
Move
(
m_currentEnd
,
m_currentEndItem
);
m_placer
->
Move
(
m_currentEnd
,
m_currentEndItem
);
}
}
}
}
...
@@ -915,5 +914,5 @@ void PNS_ROUTER::DumpLog()
...
@@ -915,5 +914,5 @@ void PNS_ROUTER::DumpLog()
}
}
if
(
logger
)
if
(
logger
)
logger
->
Save
(
"/tmp/shove.log"
);
logger
->
Save
(
"/tmp/shove.log"
);
}
}
pcbnew/router/router_tool.cpp
View file @
2619ceae
...
@@ -264,7 +264,7 @@ int ROUTER_TOOL::getDefaultWidth( int aNetCode )
...
@@ -264,7 +264,7 @@ int ROUTER_TOOL::getDefaultWidth( int aNetCode )
void
ROUTER_TOOL
::
getNetclassDimensions
(
int
aNetCode
,
int
&
aWidth
,
void
ROUTER_TOOL
::
getNetclassDimensions
(
int
aNetCode
,
int
&
aWidth
,
int
&
aViaDiameter
,
int
&
aViaDrill
)
int
&
aViaDiameter
,
int
&
aViaDrill
)
{
{
BOARD
*
board
=
getModel
<
BOARD
>
(
PCB_T
);
BOARD
*
board
=
getModel
<
BOARD
>
(
PCB_T
);
BOARD_DESIGN_SETTINGS
&
bds
=
board
->
GetDesignSettings
();
BOARD_DESIGN_SETTINGS
&
bds
=
board
->
GetDesignSettings
();
...
...
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