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
3f970c85
Commit
3f970c85
authored
May 25, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more cleanup and enhancements about rats nest (work in progress)
parent
e073bdc0
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
349 additions
and
408 deletions
+349
-408
CMakeLists.txt
common/CMakeLists.txt
+1
-1
pcbstruct.h
include/pcbstruct.h
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
class_board.h
pcbnew/class_board.h
+1
-1
class_netinfo.h
pcbnew/class_netinfo.h
+212
-212
class_netinfo_item.cpp
pcbnew/class_netinfo_item.cpp
+25
-5
editrack.cpp
pcbnew/editrack.cpp
+2
-2
move_or_drag_track.cpp
pcbnew/move_or_drag_track.cpp
+3
-3
protos.h
pcbnew/protos.h
+1
-1
ratsnest.cpp
pcbnew/ratsnest.cpp
+102
-181
No files found.
common/CMakeLists.txt
View file @
3f970c85
...
...
@@ -56,7 +56,7 @@ set(PCB_COMMON_SRCS
../pcbnew/class_drawsegment.cpp
../pcbnew/class_drc_item.cpp
../pcbnew/class_edge_mod.cpp
../pcbnew/class_
equipot
.cpp
../pcbnew/class_
netinfo_item
.cpp
../pcbnew/class_netinfolist.cpp
../pcbnew/class_marker.cpp
../pcbnew/class_mire.cpp
...
...
include/pcbstruct.h
View file @
3f970c85
...
...
@@ -250,7 +250,7 @@ public:
#include "class_edge_mod.h" // Class for footprint graphic elements
#include "class_text_mod.h" // Class for footprint fields
#include "class_module.h" // Class for the footprint
#include "class_
equipot.h"
#include "class_
netinfo.h" // Class for nets
/***********************************/
...
...
include/wxPcbStruct.h
View file @
3f970c85
...
...
@@ -286,7 +286,7 @@ public:
void
Build_Board_Ratsnest
(
wxDC
*
DC
);
void
DrawGeneralRatsnest
(
wxDC
*
DC
,
int
net_code
=
0
);
void
trace_ratsnest_pad
(
wxDC
*
DC
);
int
*
build_ratsnest_pad
(
EDA_BaseStruct
*
ref
,
void
build_ratsnest_pad
(
BOARD_ITEM
*
ref
,
const
wxPoint
&
refpos
,
bool
init
);
...
...
pcbnew/class_board.h
View file @
3f970c85
...
...
@@ -7,7 +7,7 @@
#include "dlist.h"
#include "class_
equipot
.h"
#include "class_
netinfo
.h"
class
ZONE_CONTAINER
;
...
...
pcbnew/class_
equipot
.h
→
pcbnew/class_
netinfo
.h
View file @
3f970c85
pcbnew/class_
equipot
.cpp
→
pcbnew/class_
netinfo_item
.cpp
View file @
3f970c85
...
...
@@ -3,14 +3,14 @@
/*************************************************************************/
#include "fctsys.h"
#include "
wxstruct
.h"
#include "
class_drawpanel
.h"
#include "common.h"
#include "kicad_string.h"
#include "pcbnew.h"
/*********************************************************/
/* class NETINFO_ITEM: hand data relative to a given net */
/* class NETINFO_ITEM: hand
le
data relative to a given net */
/*********************************************************/
/* Constructor */
...
...
@@ -24,7 +24,7 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent )
}
/* destructo
t
*/
/* destructo
r
*/
NETINFO_ITEM
::~
NETINFO_ITEM
()
{
...
...
@@ -107,9 +107,8 @@ void NETINFO_ITEM::SetNetname( const wxString & aNetname )
/** function Draw (TODO)
* we actually could show a NET, simply show all the tracks and pads or net name on pad and vias
*/
void
NETINFO_ITEM
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
aDrawMode
,
const
wxPoint
&
o
ffset
)
void
NETINFO_ITEM
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
aDrawMode
,
const
wxPoint
&
aO
ffset
)
{
}
...
...
@@ -169,3 +168,24 @@ void NETINFO_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const
valeur_param
(
(
int
)
lengthnet
,
txt
);
Affiche_1_Parametre
(
frame
,
60
,
_
(
"Net Length"
),
txt
,
RED
);
}
/***********************/
/* class RATSNEST_ITEM */
/***********************/
/** function Draw
* Draws a line from the starting pad to the ending pad
*/
void
RATSNEST_ITEM
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
aDrawMode
,
const
wxPoint
&
aOffset
)
{
EDA_Colors
color
=
(
EDA_Colors
)
g_DesignSettings
.
m_RatsnestColor
;
if
(
(
m_Status
&
LOCAL_RATSNEST_ITEM
)
)
color
=
YELLOW
;
GRLine
(
&
panel
->
m_ClipBox
,
DC
,
m_PadStart
->
m_Pos
.
x
+
aOffset
.
x
,
m_PadStart
->
m_Pos
.
y
+
aOffset
.
y
,
m_PadEnd
->
m_Pos
.
x
+
aOffset
.
x
,
m_PadEnd
->
m_Pos
.
y
+
aOffset
.
y
,
0
,
color
);
}
pcbnew/editrack.cpp
View file @
3f970c85
...
...
@@ -86,7 +86,7 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
D_PAD
*
pt_pad
=
NULL
;
TRACK
*
TrackOnStartPoint
=
NULL
;
int
masquelayer
=
g_TabOneLayerMask
[((
PCB_SCREEN
*
)
GetScreen
())
->
m_Active_Layer
];
EDA_BaseStruct
*
LockPoint
;
BOARD_ITEM
*
LockPoint
;
wxPoint
pos
=
GetScreen
()
->
m_Curseur
;
static
int
InitialTrackWidthValue
;
/* first track segment width.
...
...
@@ -457,7 +457,7 @@ void WinEDA_PcbFrame::End_Route( TRACK* aTrack, wxDC* DC )
* ceci contribue a la reduction du temps de calcul */
/* Accrochage de la fin de la piste */
EDA_BaseStruct
*
LockPoint
=
LocateLockPoint
(
GetBoard
(),
pos
,
masquelayer
);
BOARD_ITEM
*
LockPoint
=
LocateLockPoint
(
GetBoard
(),
pos
,
masquelayer
);
if
(
LockPoint
)
/* La fin de la piste est sur un PAD */
{
...
...
pcbnew/move_or_drag_track.cpp
View file @
3f970c85
...
...
@@ -924,7 +924,7 @@ bool WinEDA_PcbFrame::PlaceDraggedTrackSegment( TRACK* Track, wxDC* DC )
Track
->
SetState
(
EDIT
,
OFF
);
Track
->
Draw
(
DrawPanel
,
DC
,
draw_mode
);
/*
Tracage des segments dragge
s */
/*
Draw ddragged track
s */
pt_drag
=
g_DragSegmentList
;
for
(
;
pt_drag
;
pt_drag
=
pt_drag
->
Pnext
)
{
...
...
@@ -954,10 +954,10 @@ bool WinEDA_PcbFrame::PlaceDraggedTrackSegment( TRACK* Track, wxDC* DC )
/************************************************************************/
EDA_BaseStruct
*
LocateLockPoint
(
BOARD
*
Pcb
,
wxPoint
pos
,
int
LayerMask
)
BOARD_ITEM
*
LocateLockPoint
(
BOARD
*
Pcb
,
wxPoint
pos
,
int
LayerMask
)
/************************************************************************/
/* Routine trouvant le point "
d'accrochage
" d'une extremite de piste.
/* Routine trouvant le point "
d'accrochage
" d'une extremite de piste.
* Ce point peut etre un PAD ou un autre segment de piste
* Retourne:
* - pointeur sur ce PAD ou:
...
...
pcbnew/protos.h
View file @
3f970c85
...
...
@@ -353,7 +353,7 @@ void MasqueAttributs( int* masque_set, int* masque_clr );
/* DUPLTRAC.CPP */
/***************/
EDA_BaseStruct
*
LocateLockPoint
(
BOARD
*
Pcb
,
wxPoint
pos
,
int
LayerMask
);
BOARD_ITEM
*
LocateLockPoint
(
BOARD
*
Pcb
,
wxPoint
pos
,
int
LayerMask
);
/* Routine trouvant le point " d'accrochage " d'une extremite de piste.
* Ce point peut etre un PAD ou un autre segment de piste
...
...
pcbnew/ratsnest.cpp
View file @
3f970c85
This diff is collapsed.
Click to expand it.
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