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
69098439
Commit
69098439
authored
Jan 25, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed problem when trying to place a micro via
parent
f3278c16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
27 deletions
+29
-27
edit.cpp
pcbnew/edit.cpp
+0
-1
editrack-part2.cpp
pcbnew/editrack-part2.cpp
+29
-26
No files found.
pcbnew/edit.cpp
View file @
69098439
...
@@ -342,7 +342,6 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -342,7 +342,6 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_PLACE_MICROVIA
:
case
ID_POPUP_PCB_PLACE_MICROVIA
:
if
(
!
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
IsMicroViaAcceptable
()
)
if
(
!
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
IsMicroViaAcceptable
()
)
break
;
break
;
case
ID_POPUP_PCB_PLACE_VIA
:
case
ID_POPUP_PCB_PLACE_VIA
:
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
if
(
GetCurItem
()
->
m_Flags
&
IS_DRAGGED
)
if
(
GetCurItem
()
->
m_Flags
&
IS_DRAGGED
)
...
...
pcbnew/editrack-part2.cpp
View file @
69098439
...
@@ -184,54 +184,55 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
...
@@ -184,54 +184,55 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
via
->
m_Width
=
GetBoard
()
->
GetCurrentViaSize
();
via
->
m_Width
=
GetBoard
()
->
GetCurrentViaSize
();
via
->
SetNet
(
g_HighLight_NetCode
);
via
->
SetNet
(
g_HighLight_NetCode
);
via
->
m_Start
=
via
->
m_End
=
g_CurrentTrackSegment
->
m_End
;
via
->
m_Start
=
via
->
m_End
=
g_CurrentTrackSegment
->
m_End
;
int
old_layer
=
getActiveLayer
();
// Usual via is from copper to component.
// layer pair is LAYER_N_BACK and LAYER_N_FRONT.
// swap the layers.
via
->
SetLayerPair
(
LAYER_N_BACK
,
LAYER_N_FRONT
);
if
(
getActiveLayer
()
!=
via
->
SetDrillValue
(
GetBoard
()
->
GetCurrentViaDrill
()
);
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
)
setActiveLayer
(((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
);
int
first_layer
=
getActiveLayer
();
int
last_layer
;
// prepare switch to new active layer:
if
(
first_layer
!=
GetScreen
()
->
m_Route_Layer_TOP
)
last_layer
=
GetScreen
()
->
m_Route_Layer_TOP
;
else
else
setActiveLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_BOTTOM
)
;
last_layer
=
GetScreen
()
->
m_Route_Layer_BOTTOM
;
/* Adjust the via layer pair */
/* Adjust the
actual
via layer pair */
switch
(
via
->
Shape
()
)
switch
(
via
->
Shape
()
)
{
{
case
VIA_BLIND_BURIED
:
case
VIA_BLIND_BURIED
:
via
->
SetLayerPair
(
old_layer
,
getActiveLayer
()
);
via
->
SetLayerPair
(
first_layer
,
last_layer
);
via
->
SetDrillValue
(
GetBoard
()
->
GetCurrentViaDrill
()
);
break
;
break
;
case
VIA_MICROVIA
:
// from external to the near neighbor inner layer
case
VIA_MICROVIA
:
// from external to the near neighbor inner layer
if
(
old_layer
==
LAYER_N_BACK
)
{
setActiveLayer
(
LAYER_N_2
);
int
last_inner_layer
=
GetBoard
()
->
m_BoardSettings
->
GetCopperLayerCount
()
-
2
;
else
if
(
old_layer
==
LAYER_N_FRONT
)
if
(
first_layer
==
LAYER_N_BACK
)
setActiveLayer
(
GetBoard
()
->
m_BoardSettings
->
GetCopperLayerCount
()
-
2
);
last_layer
=
LAYER_N_2
;
else
if
(
old_layer
==
LAYER_N_2
)
else
if
(
first_layer
==
LAYER_N_FRONT
)
setActiveLayer
(
LAYER_N_BACK
);
last_layer
=
last_inner_layer
;
else
if
(
old_layer
==
GetBoard
()
->
m_BoardSettings
->
GetCopperLayerCount
()
-
2
);
else
if
(
first_layer
==
LAYER_N_2
)
setActiveLayer
(
LAYER_N_FRONT
);
last_layer
=
LAYER_N_BACK
;
// else error
else
if
(
first_layer
==
last_inner_layer
)
via
->
SetLayerPair
(
old_layer
,
getActiveLayer
()
);
last_layer
=
LAYER_N_FRONT
;
// else error: will be removed later
via
->
SetLayerPair
(
first_layer
,
last_layer
);
{
{
NETINFO_ITEM
*
net
=
GetBoard
()
->
FindNet
(
via
->
GetNet
()
);
NETINFO_ITEM
*
net
=
GetBoard
()
->
FindNet
(
via
->
GetNet
()
);
via
->
m_Width
=
net
->
GetMicroViaSize
();
via
->
m_Width
=
net
->
GetMicroViaSize
();
}
}
}
break
;
break
;
default
:
default
:
// Usual via is from copper to component; layer pair is 0 and 0x0F.
via
->
SetDrillValue
(
GetBoard
()
->
GetCurrentViaDrill
()
);
via
->
SetLayerPair
(
LAYER_N_BACK
,
LAYER_N_FRONT
);
break
;
break
;
}
}
if
(
Drc_On
&&
BAD_DRC
==
m_drc
->
Drc
(
via
,
GetBoard
()
->
m_Track
)
)
if
(
Drc_On
&&
BAD_DRC
==
m_drc
->
Drc
(
via
,
GetBoard
()
->
m_Track
)
)
{
{
/* DRC fault: the Via cannot be placed here ... */
/* DRC fault: the Via cannot be placed here ... */
delete
via
;
delete
via
;
setActiveLayer
(
old_layer
);
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
// delete the track(s) added in Begin_Route()
// delete the track(s) added in Begin_Route()
...
@@ -248,6 +249,8 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
...
@@ -248,6 +249,8 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
return
false
;
return
false
;
}
}
setActiveLayer
(
last_layer
);
TRACK
*
lastNonVia
=
g_CurrentTrackSegment
;
TRACK
*
lastNonVia
=
g_CurrentTrackSegment
;
/* A new via was created. It was Ok.
/* A new via was created. It was Ok.
...
...
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