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
79eca85b
Commit
79eca85b
authored
Mar 04, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Magnetism
parent
c254c13e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
178 additions
and
120 deletions
+178
-120
controle.cpp
pcbnew/controle.cpp
+150
-96
locate.cpp
pcbnew/locate.cpp
+19
-23
protos.h
pcbnew/protos.h
+9
-1
No files found.
pcbnew/controle.cpp
View file @
79eca85b
This diff is collapsed.
Click to expand it.
pcbnew/locate.cpp
View file @
79eca85b
...
@@ -42,51 +42,47 @@ TRACK* Locate_Via( BOARD* Pcb, const wxPoint& pos, int layer )
...
@@ -42,51 +42,47 @@ TRACK* Locate_Via( BOARD* Pcb, const wxPoint& pos, int layer )
* (TRACK*) adresse de la via
* (TRACK*) adresse de la via
*/
*/
{
{
TRACK
*
T
rack
;
TRACK
*
t
rack
;
for
(
Track
=
Pcb
->
m_Track
;
Track
!=
NULL
;
Track
=
T
rack
->
Next
()
)
for
(
track
=
Pcb
->
m_Track
;
track
;
track
=
t
rack
->
Next
()
)
{
{
if
(
T
rack
->
Type
()
!=
TYPEVIA
)
if
(
t
rack
->
Type
()
!=
TYPEVIA
)
continue
;
continue
;
if
(
T
rack
->
m_Start
!=
pos
)
if
(
t
rack
->
m_Start
!=
pos
)
continue
;
continue
;
if
(
T
rack
->
GetState
(
BUSY
|
DELETED
)
)
if
(
t
rack
->
GetState
(
BUSY
|
DELETED
)
)
continue
;
continue
;
if
(
layer
<
0
)
if
(
layer
<
0
)
return
Trac
k
;
brea
k
;
if
(
T
rack
->
IsOnLayer
(
layer
)
)
if
(
t
rack
->
IsOnLayer
(
layer
)
)
return
Trac
k
;
brea
k
;
}
}
return
NULL
;
return
track
;
}
}
/*******************************************************************/
/*******************************************************************/
TRACK
*
Locate_Via_Area
(
BOARD
*
Pcb
,
const
wxPoint
&
pos
,
int
layer
)
TRACK
*
Locate_Via_Area
(
TRACK
*
aStart
,
const
wxPoint
&
pos
,
int
layer
)
/*******************************************************************/
/*******************************************************************/
/*
* Like Locate_Via, but finds any via covering the cursor position
*/
{
{
TRACK
*
T
rack
;
TRACK
*
t
rack
;
for
(
Track
=
Pcb
->
m_Track
;
Track
!=
NULL
;
Track
=
T
rack
->
Next
()
)
for
(
track
=
aStart
;
track
;
track
=
t
rack
->
Next
()
)
{
{
if
(
T
rack
->
Type
()
!=
TYPEVIA
)
if
(
t
rack
->
Type
()
!=
TYPEVIA
)
continue
;
continue
;
if
(
!
Track
->
HitTest
(
pos
)
)
if
(
!
track
->
HitTest
(
pos
)
)
continue
;
continue
;
if
(
T
rack
->
GetState
(
BUSY
|
DELETED
)
)
if
(
t
rack
->
GetState
(
BUSY
|
DELETED
)
)
continue
;
continue
;
if
(
layer
<
0
)
if
(
layer
<
0
)
return
Trac
k
;
brea
k
;
if
(
T
rack
->
IsOnLayer
(
layer
)
)
if
(
t
rack
->
IsOnLayer
(
layer
)
)
return
Trac
k
;
brea
k
;
}
}
return
NULL
;
return
track
;
}
}
...
...
pcbnew/protos.h
View file @
79eca85b
...
@@ -77,7 +77,15 @@ void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module, int ox,
...
@@ -77,7 +77,15 @@ void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module, int ox,
TRACK
*
Locate_Via
(
BOARD
*
Pcb
,
const
wxPoint
&
pos
,
int
layer
=
-
1
);
TRACK
*
Locate_Via
(
BOARD
*
Pcb
,
const
wxPoint
&
pos
,
int
layer
=
-
1
);
TRACK
*
Locate_Via_Area
(
BOARD
*
Pcb
,
const
wxPoint
&
pos
,
int
layer
=
-
1
);
/**
* Function Locate_Via_Area
* finds the first SEGVIA which covers the given aPos with a matching layer.
* @param aStart The starting TRACK or SEGVIA in the BOARD's list.
* @param aPos The wxPoint to HitTest() against.
* @param aLayer The layer to match, pass -1 for a don't care.
* @return TRACK* - actually a SEGVIA* if found, else NULL.
*/
TRACK
*
Locate_Via_Area
(
TRACK
*
aStart
,
const
wxPoint
&
aPos
,
int
aLayer
=
-
1
);
TRACK
*
Fast_Locate_Via
(
TRACK
*
start_adr
,
TRACK
*
end_adr
,
TRACK
*
Fast_Locate_Via
(
TRACK
*
start_adr
,
TRACK
*
end_adr
,
const
wxPoint
&
pos
,
int
masquelayer
);
const
wxPoint
&
pos
,
int
masquelayer
);
...
...
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