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
b2c11207
Commit
b2c11207
authored
Dec 13, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew/class_track.h: remove duplicate class members.
parent
a63a2006
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
class_board_connected_item.h
pcbnew/class_board_connected_item.h
+2
-1
class_track.h
pcbnew/class_track.h
+0
-2
connect.cpp
pcbnew/connect.cpp
+15
-10
No files found.
pcbnew/class_board_connected_item.h
View file @
b2c11207
...
@@ -24,11 +24,12 @@ class BOARD_CONNECTED_ITEM : public BOARD_ITEM
...
@@ -24,11 +24,12 @@ class BOARD_CONNECTED_ITEM : public BOARD_ITEM
{
{
friend
class
CONNECTIONS
;
friend
class
CONNECTIONS
;
p
rivate
:
p
ublic
:
// These 2 members are used for temporary storage during connections calculations:
// These 2 members are used for temporary storage during connections calculations:
std
::
vector
<
TRACK
*>
m_TracksConnected
;
// list of other tracks connected to me
std
::
vector
<
TRACK
*>
m_TracksConnected
;
// list of other tracks connected to me
std
::
vector
<
D_PAD
*>
m_PadsConnected
;
// list of other pads connected to me
std
::
vector
<
D_PAD
*>
m_PadsConnected
;
// list of other pads connected to me
private
:
int
m_NetCode
;
// Net number
int
m_NetCode
;
// Net number
int
m_Subnet
;
/* In rastnest routines : for the current net, block number
int
m_Subnet
;
/* In rastnest routines : for the current net, block number
...
...
pcbnew/class_track.h
View file @
b2c11207
...
@@ -64,8 +64,6 @@ protected:
...
@@ -64,8 +64,6 @@ protected:
public
:
public
:
BOARD_CONNECTED_ITEM
*
start
;
// pointers to a connected item (pad or track)
BOARD_CONNECTED_ITEM
*
start
;
// pointers to a connected item (pad or track)
BOARD_CONNECTED_ITEM
*
end
;
BOARD_CONNECTED_ITEM
*
end
;
std
::
vector
<
TRACK
*>
m_TracksConnected
;
// list of other tracks connected to me
std
::
vector
<
D_PAD
*>
m_PadsConnected
;
// list of pads connected to me
int
m_Param
;
// Auxiliary variable ( used in some computations )
int
m_Param
;
// Auxiliary variable ( used in some computations )
...
...
pcbnew/connect.cpp
View file @
b2c11207
...
@@ -89,6 +89,11 @@ public:
...
@@ -89,6 +89,11 @@ public:
*/
*/
void
BuildPadsList
(
int
aNetcode
=
-
1
);
void
BuildPadsList
(
int
aNetcode
=
-
1
);
/**
* @return the pads list used in connections calculations
*/
std
::
vector
<
D_PAD
*>&
GetPadsList
()
{
return
m_sortedPads
;
}
/**
/**
* Function Build_CurrNet_SubNets_Connections
* Function Build_CurrNet_SubNets_Connections
* Connections to pads are assumed to be already initialized,
* Connections to pads are assumed to be already initialized,
...
@@ -106,13 +111,13 @@ public:
...
@@ -106,13 +111,13 @@ public:
void
Build_CurrNet_SubNets_Connections
(
TRACK
*
aFirstTrack
,
TRACK
*
aLastTrack
);
void
Build_CurrNet_SubNets_Connections
(
TRACK
*
aFirstTrack
,
TRACK
*
aLastTrack
);
/**
/**
* Function BuildCandidatesList
* Function Build
Tracks
CandidatesList
* Fills m_Candidates with all connecting points (track ends or via location)
* Fills m_Candidates with all connecting points (track ends or via location)
* with tracks from aBegin to aEnd.
* with tracks from aBegin to aEnd.
* if aBegin == NULL, use first track in brd list
* if aBegin == NULL, use first track in brd list
* if aEnd == NULL, uses all tracks from aBegin in brd list
* if aEnd == NULL, uses all tracks from aBegin in brd list
*/
*/
void
BuildCandidatesList
(
TRACK
*
aBegin
=
NULL
,
TRACK
*
aEnd
=
NULL
);
void
Build
Tracks
CandidatesList
(
TRACK
*
aBegin
=
NULL
,
TRACK
*
aEnd
=
NULL
);
/**
/**
* function SearchConnectedTracks
* function SearchConnectedTracks
...
@@ -134,15 +139,15 @@ public:
...
@@ -134,15 +139,15 @@ public:
}
}
/**
/**
* function SearchConnectedToPads
* function Search
Tracks
ConnectedToPads
* Explores the list of pads and adds to m_PadsConnected member
* Explores the list of pads and adds to m_PadsConnected member
* of each track connected the pad(s) connected to
* of each track connected the pad(s) connected to
*/
*/
void
SearchConnectedToPads
();
void
Search
Tracks
ConnectedToPads
();
/**
/**
* function CollectItemsNearTo
* function CollectItemsNearTo
* Used by SearchConnectedToPads
* Used by Search
Tracks
ConnectedToPads
* Fills aList with pads near to aPosition
* Fills aList with pads near to aPosition
* near means aPosition to pad position <= aDistMax
* near means aPosition to pad position <= aDistMax
* @param aList = list to fill
* @param aList = list to fill
...
@@ -232,7 +237,7 @@ void CONNECTIONS::BuildPadsList( int aNetcode )
...
@@ -232,7 +237,7 @@ void CONNECTIONS::BuildPadsList( int aNetcode )
}
}
void
CONNECTIONS
::
SearchConnectedToPads
()
void
CONNECTIONS
::
Search
Tracks
ConnectedToPads
()
{
{
std
::
vector
<
CONNECTED_POINT
*>
candidates
;
std
::
vector
<
CONNECTED_POINT
*>
candidates
;
...
@@ -345,7 +350,7 @@ static bool sortConnectedPointByXthenYCoordinates( const CONNECTED_POINT & aRef,
...
@@ -345,7 +350,7 @@ static bool sortConnectedPointByXthenYCoordinates( const CONNECTED_POINT & aRef,
return
aRef
.
GetPoint
().
x
<
aTst
.
GetPoint
().
x
;
return
aRef
.
GetPoint
().
x
<
aTst
.
GetPoint
().
x
;
}
}
void
CONNECTIONS
::
BuildCandidatesList
(
TRACK
*
aBegin
,
TRACK
*
aEnd
)
void
CONNECTIONS
::
Build
Tracks
CandidatesList
(
TRACK
*
aBegin
,
TRACK
*
aEnd
)
{
{
m_candidates
.
clear
();
m_candidates
.
clear
();
...
@@ -505,7 +510,7 @@ void CONNECTIONS::Build_CurrNet_SubNets_Connections( TRACK* aFirstTrack, TRACK*
...
@@ -505,7 +510,7 @@ void CONNECTIONS::Build_CurrNet_SubNets_Connections( TRACK* aFirstTrack, TRACK*
// Pads subnets are expected already cleared, because this function
// Pads subnets are expected already cleared, because this function
// does not know the full list of pads
// does not know the full list of pads
BuildCandidatesList
(
aFirstTrack
,
aLastTrack
);
Build
Tracks
CandidatesList
(
aFirstTrack
,
aLastTrack
);
for
(
curr_track
=
aFirstTrack
;
curr_track
!=
NULL
;
curr_track
=
curr_track
->
Next
()
)
for
(
curr_track
=
aFirstTrack
;
curr_track
!=
NULL
;
curr_track
=
curr_track
->
Next
()
)
{
{
// Clear track subnet id (Pads subnets are cleared outside this function)
// Clear track subnet id (Pads subnets are cleared outside this function)
...
@@ -807,10 +812,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
...
@@ -807,10 +812,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
CONNECTIONS
connections
(
m_Pcb
);
CONNECTIONS
connections
(
m_Pcb
);
connections
.
BuildPadsList
();
connections
.
BuildPadsList
();
connections
.
BuildCandidatesList
();
connections
.
Build
Tracks
CandidatesList
();
// First pass: build connections between track segments and pads.
// First pass: build connections between track segments and pads.
connections
.
SearchConnectedToPads
();
connections
.
Search
Tracks
ConnectedToPads
();
/* For tracks connected to at least one pad,
/* For tracks connected to at least one pad,
* set the track net code to the pad netcode
* set the track net code to the pad netcode
...
...
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