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
ba7cc834
Commit
ba7cc834
authored
Oct 01, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SEGVIA::Show() & BOARD_ITEM::MenuText()
parent
9dca39f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
class_track.cpp
pcbnew/class_track.cpp
+5
-2
editrack-part2.cpp
pcbnew/editrack-part2.cpp
+16
-8
router.cpp
pcbnew/router.cpp
+1
-0
No files found.
pcbnew/class_track.cpp
View file @
ba7cc834
...
...
@@ -178,6 +178,7 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
// see class_track.h
bool
SEGVIA
::
IsOnLayer
(
int
layer_number
)
const
{
/* its the same logic, don't need this
int via_type = Shape();
if( via_type == VIA_NORMALE )
...
...
@@ -189,12 +190,13 @@ bool SEGVIA::IsOnLayer( int layer_number ) const
}
// VIA_BORGNE ou VIA_ENTERREE:
*/
int
bottom_layer
,
top_layer
;
ReturnLayerPair
(
&
top_layer
,
&
bottom_layer
);
if
(
bottom_layer
<=
layer_number
&&
top_layer
>=
layer_numb
er
)
if
(
bottom_layer
<=
layer_number
&&
layer_number
<=
top_lay
er
)
return
true
;
else
return
false
;
...
...
@@ -242,7 +244,7 @@ void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
* m_Layer code les 2 couches limitant la via
*/
{
int
via_type
=
m_Shape
&
255
;
int
via_type
=
Shape
()
;
if
(
via_type
==
VIA_NORMALE
)
{
...
...
@@ -252,6 +254,7 @@ void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
if
(
bottom_layer
>
top_layer
)
EXCHG
(
bottom_layer
,
top_layer
);
m_Layer
=
(
top_layer
&
15
)
+
(
(
bottom_layer
&
15
)
<<
4
);
}
...
...
pcbnew/editrack-part2.cpp
View file @
ba7cc834
...
...
@@ -185,6 +185,7 @@ void WinEDA_PcbFrame::Other_Layer_Route( TRACK* track, wxDC* DC )
/* Avoid more than one via on the current location: */
if
(
Locate_Via
(
m_Pcb
,
g_CurrentTrackSegment
->
m_End
,
g_CurrentTrackSegment
->
GetLayer
()
)
)
return
;
pt_segm
=
g_FirstTrackSegment
;
for
(
ii
=
0
;
ii
<
g_TrackSegmentCount
-
1
;
ii
++
,
pt_segm
=
(
TRACK
*
)
pt_segm
->
Pnext
)
{
...
...
@@ -229,18 +230,25 @@ void WinEDA_PcbFrame::Other_Layer_Route( TRACK* track, wxDC* DC )
else
GetScreen
()
->
m_Active_Layer
=
GetScreen
()
->
m_Route_Layer_BOTTOM
;
/* Adjust the via layer pair */
if
(
(
Via
->
m_Shape
&
15
)
==
VIA_ENTERREE
)
if
(
Via
->
Shape
(
)
==
VIA_ENTERREE
)
{
Via
->
SetLayer
(
old_layer
|
GetScreen
()
->
m_Active_Layer
<<
4
);
Via
->
SetLayer
Pair
(
old_layer
,
GetScreen
()
->
m_Active_Layer
);
}
else
if
(
(
Via
->
m_Shape
&
15
)
==
VIA_BORGNE
)
//blind via
{
// A revoir! ( la via devrait deboucher sur 1 cote )
Via
->
SetLayer
(
old_layer
|
GetScreen
()
->
m_Active_Layer
<<
4
);
else
if
(
Via
->
Shape
()
==
VIA_BORGNE
)
//blind via
{
// A revoir! ( la via devrait deboucher sur 1 cote )
Via
->
SetLayerPair
(
old_layer
,
GetScreen
()
->
m_Active_Layer
);
}
else
Via
->
SetLayer
(
0x0F
);
// Usual via is from copper to component; layer pair is 0 and 0x0F
else
// @todo: why have this override behaviour? why does the user even need to tell us what kind of via, when we know which two layers are in play?
{
// Usual via is from copper to component; layer pair is 0 and 0x0F.
Via
->
SetLayerPair
(
LAYER_CUIVRE_N
,
LAYER_CMP_N
);
}
if
(
Drc_On
&&
(
Drc
(
this
,
DC
,
Via
,
m_Pcb
->
m_Track
,
1
)
==
BAD_DRC
)
)
{
/* DRC fault: the Via cannot be placed here ... */
...
...
pcbnew/router.cpp
View file @
ba7cc834
...
...
@@ -607,6 +607,7 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks( wxDC* DC )
NewVia
->
m_Shape
=
VIA_NORMALE
;
else
NewVia
->
m_Shape
=
VIA_ENTERREE
;
NewVia
->
Insert
(
m_Pcb
,
NULL
);
NbTrack
++
;
break
;
...
...
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