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
dc24d6fc
Commit
dc24d6fc
authored
Mar 09, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
Minor fixes. Code cleaning.
parents
38a3f1b8
fde42439
Changes
24
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
517 additions
and
698 deletions
+517
-698
flat_hierarchy.pro
demos/flat_hierarchy/flat_hierarchy.pro
+76
-79
interf_u.pro
demos/interf_u/interf_u.pro
+5
-5
sonde xilinx.drl
demos/sonde xilinx/sonde xilinx.drl
+0
-105
sonde xilinx.pro
demos/sonde xilinx/sonde xilinx.pro
+2
-3
carte_test.pro
demos/test_xil_95108/carte_test.pro
+129
-133
video.pro
demos/video/video.pro
+101
-102
class_libentry.cpp
eeschema/class_libentry.cpp
+1
-1
netlist.cpp
eeschema/netlist.cpp
+3
-0
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
ar_protos.h
pcbnew/ar_protos.h
+14
-11
automove.cpp
pcbnew/automove.cpp
+16
-18
autoplac.cpp
pcbnew/autoplac.cpp
+9
-9
autorout.cpp
pcbnew/autorout.cpp
+14
-18
autorout.h
pcbnew/autorout.h
+18
-11
board.cpp
pcbnew/board.cpp
+81
-129
dist.cpp
pcbnew/dist.cpp
+4
-14
export_vrml.cpp
pcbnew/export_vrml.cpp
+2
-1
graphpcb.cpp
pcbnew/graphpcb.cpp
+34
-36
ioascii.cpp
pcbnew/ioascii.cpp
+1
-0
protos.h
pcbnew/protos.h
+0
-6
queue.cpp
pcbnew/queue.cpp
+0
-3
solve.cpp
pcbnew/solve.cpp
+6
-8
work.cpp
pcbnew/work.cpp
+0
-3
zones.h
pcbnew/zones.h
+0
-2
No files found.
demos/flat_hierarchy/flat_hierarchy.pro
View file @
dc24d6fc
update
=
18
/
4
/
2006
-
09
:
31
:
05
update
=
07
/
03
/
2011
07
:
10
:
44
last_client
=
pcbnew
last_client
=
cvpcb
[
general
]
[
general
]
version
=
1
version
=
1
RootSch
=
pic_programmer
.
sch
RootSch
=
pic_programmer
.
sch
BoardNm
=
pic_programmer
.
brd
BoardNm
=
pic_programmer
.
brd
[
cvpcb
]
version
=
1
NetITyp
=
0
NetIExt
=.
net
PkgIExt
=.
pkg
NetType
=
0
[
cvpcb
/
libraries
]
EquName1
=
devcms
[
common
]
[
common
]
NetDir
=
NetDir
=
[
pcbnew
]
[
pcbnew
]
...
@@ -69,11 +61,16 @@ MaxLnkS=3
...
@@ -69,11 +61,16 @@ MaxLnkS=3
ShowRat
=
0
ShowRat
=
0
ShowMRa
=
1
ShowMRa
=
1
[
pcbnew
/
libraries
]
[
pcbnew
/
libraries
]
LibName1
=
connect
LibName2
=
discret
LibName3
=
pin_array
LibName4
=
divers
LibName5
=
libcms
LibName6
=
display
LibName7
=
dip_sockets
LibDir
=
LibDir
=
LibName1
=
supports
[
cvpcb
]
LibName2
=
connect
version
=
1
LibName3
=
discret
NetIExt
=.
net
LibName4
=
pin_array
[
cvpcb
/
libraries
]
LibName5
=
divers
EquName1
=
devcms
LibName6
=
libcms
LibName7
=
display
demos/interf_u/interf_u.pro
View file @
dc24d6fc
update
=
17
/
02
/
2011
19
:
46
:
34
update
=
07
/
03
/
2011
19
:
57
:
09
version
=
1
version
=
1
last_client
=
pcbnew
last_client
=
pcbnew
[
common
]
[
common
]
...
@@ -55,13 +55,13 @@ LibName8=adc-dac
...
@@ -55,13 +55,13 @@ LibName8=adc-dac
LibName9
=
memory
LibName9
=
memory
LibName10
=
xilinx
LibName10
=
xilinx
LibName11
=
special
LibName11
=
special
LibName12
=
image
[
pcbnew
]
[
pcbnew
]
version
=
1
version
=
1
PadDrlX
=
354
PadDrlX
=
354
PadDimH
=
550
PadDimH
=
550
PadDimV
=
550
PadDimV
=
550
BoardThickness
=
630
BoardThickness
=
630
SgPcb45
=
1
TxtPcbV
=
800
TxtPcbV
=
800
TxtPcbH
=
600
TxtPcbH
=
600
TxtModV
=
600
TxtModV
=
600
...
@@ -71,10 +71,10 @@ VEgarde=100
...
@@ -71,10 +71,10 @@ VEgarde=100
DrawLar
=
150
DrawLar
=
150
EdgeLar
=
50
EdgeLar
=
50
TxtLar
=
170
TxtLar
=
170
MSegLar
=
40
0
MSegLar
=
15
0
LastNetListRead
=
interf_u
.
net
LastNetListRead
=
..
\\
pic_programmer
\\
pic_programmer
.
net
[
pcbnew
/
libraries
]
[
pcbnew
/
libraries
]
LibDir
=
F
:
\\
kicad
\\
share
\\
modules
\\
packages3d
LibDir
=
LibName1
=
connect
LibName1
=
connect
LibName2
=
discret
LibName2
=
discret
LibName3
=
dip_sockets
LibName3
=
dip_sockets
...
...
demos/sonde xilinx/sonde xilinx.drl
deleted
100644 → 0
View file @
38a3f1b8
M48
;DRILL file {PCBNEW (2007-04-24)} date 2/5/2007-08:54:51
;FORMAT={2:4 / absolute / Pouces / Format décimal}
R,T
VER,1
FMAT,2
INCH,TZ
TCST,OFF
ICI,OFF
ATC,ON
T1C0.002
T2C0.025
T3C0.032
T4C0.060
%
M47
G05
M72
T1
X4.050Y2.650
X4.050Y4.350
X7.250Y4.350
X7.250Y2.650
T2
X7.000Y3.200
X4.900Y3.450
X5.475Y3.950
T3
X5.400Y2.850
X5.800Y2.850
X4.800Y3.000
X4.400Y3.000
X6.400Y3.500
X6.000Y3.500
X5.950Y2.900
X6.350Y2.900
X4.800Y3.300
X4.400Y3.300
X4.800Y3.650
X4.400Y3.650
X4.800Y3.400
X4.400Y3.400
X4.800Y3.200
X4.400Y3.200
X4.800Y3.100
X4.400Y3.100
X6.400Y3.700
X6.000Y3.700
X6.400Y3.900
X6.000Y3.900
X6.400Y4.150
X6.000Y4.150
X4.800Y4.100
X4.400Y4.100
X5.300Y3.000
X5.800Y3.000
X6.000Y3.100
X6.300Y3.100
X5.000Y2.850
X5.300Y2.850
X5.550Y3.250
X5.550Y3.350
X5.550Y3.450
X5.550Y3.550
X5.550Y3.650
X5.550Y3.750
X5.550Y3.850
X5.850Y3.850
X5.850Y3.750
X5.850Y3.650
X5.850Y3.550
X5.850Y3.450
X5.850Y3.350
X5.850Y3.250
X5.000Y3.250
X5.000Y3.350
X5.000Y3.450
X5.000Y3.550
X5.000Y3.650
X5.000Y3.750
X5.000Y3.850
X5.300Y3.850
X5.300Y3.750
X5.300Y3.650
X5.300Y3.550
X5.300Y3.450
X5.300Y3.350
X5.300Y3.250
X5.550Y4.050
X5.550Y4.250
X5.950Y2.750
X6.150Y2.750
X5.700Y4.050
X5.700Y4.250
X5.850Y4.050
X5.850Y4.250
T4
X6.700Y3.200
X6.700Y3.400
X6.700Y3.000
X6.700Y3.600
X6.700Y3.800
X6.700Y4.000
T0
M30
demos/sonde xilinx/sonde xilinx.pro
View file @
dc24d6fc
update
=
27
/
05
/
2010
12
:
18
:
31
update
=
07
/
03
/
2011
09
:
04
:
59
version
=
1
version
=
1
last_client
=
pcbnew
last_client
=
pcbnew
[
cvpcb
]
[
cvpcb
]
...
@@ -77,7 +77,6 @@ PadDrlX=320
...
@@ -77,7 +77,6 @@ PadDrlX=320
PadDimH
=
620
PadDimH
=
620
PadDimV
=
900
PadDimV
=
900
BoardThickness
=
630
BoardThickness
=
630
SgPcb45
=
1
TxtPcbV
=
600
TxtPcbV
=
600
TxtPcbH
=
600
TxtPcbH
=
600
TxtModV
=
600
TxtModV
=
600
...
@@ -88,7 +87,7 @@ DrawLar=120
...
@@ -88,7 +87,7 @@ DrawLar=120
EdgeLar
=
120
EdgeLar
=
120
TxtLar
=
120
TxtLar
=
120
MSegLar
=
120
MSegLar
=
120
LastNetListRead
=
LastNetListRead
=
sonde
xilinx
.
net
[
pcbnew
/
libraries
]
[
pcbnew
/
libraries
]
LibDir
=
LibDir
=
LibName1
=
supports
LibName1
=
supports
...
...
demos/test_xil_95108/carte_test.pro
View file @
dc24d6fc
update
=
10
/
5
/
2004
-
12
:
26
:
41
update
=
07
/
03
/
2011
07
:
11
:
33
version
=
1
version
=
1
last_client
=
kicad
last_client
=
cvpcb
[
pcbnew
]
[
pcbnew
]
version
=
1
version
=
1
LibDir
=
LibDir
=
...
@@ -66,22 +66,13 @@ TimeOut=600
...
@@ -66,22 +66,13 @@ TimeOut=600
ShowRat
=
0
ShowRat
=
0
ShowMRa
=
0
ShowMRa
=
0
[
pcbnew
/
libraries
]
[
pcbnew
/
libraries
]
LibName1
=
supports
LibName1
=
connect
LibName2
=
connect
LibName2
=
discret
LibName3
=
discret
LibName3
=
pin_array
LibName4
=
pin_array
LibName4
=
divers
LibName5
=
divers
LibName5
=
libcms
LibName6
=
libcms
LibName6
=
dip_sockets
[
cvpcb
]
version
=
1
NetITyp
=
0
NetIExt
=.
net
PkgIExt
=.
pkg
NetDir
=
LibDir
=
LibDir
=
NetType
=
0
[
cvpcb
/
libraries
]
EquName1
=
devcms
[
eeschema
]
[
eeschema
]
version
=
1
version
=
1
LibDir
=
LibDir
=
...
@@ -131,3 +122,8 @@ LibName11=analog_switches
...
@@ -131,3 +122,8 @@ LibName11=analog_switches
version
=
1
version
=
1
RootSch
=
carte_test
.
sch
RootSch
=
carte_test
.
sch
BoardNm
=
carte_test
.
brd
BoardNm
=
carte_test
.
brd
[
cvpcb
]
version
=
1
NetIExt
=.
net
[
cvpcb
/
libraries
]
EquName1
=
devcms
demos/video/video.pro
View file @
dc24d6fc
update
=
04
/
12
/
2010
17
:
34
:
26
update
=
jeu
.
03
mars
2011
20
:
58
:
32
CET
version
=
1
version
=
1
last_client
=
pcbnew
last_client
=
pcbnew
[
general
]
[
general
]
...
@@ -80,7 +80,6 @@ PadDrlX=1200
...
@@ -80,7 +80,6 @@ PadDrlX=1200
PadDimH
=
1500
PadDimH
=
1500
PadDimV
=
2000
PadDimV
=
2000
BoardThickness
=
630
BoardThickness
=
630
SgPcb45
=
1
TxtPcbV
=
600
TxtPcbV
=
600
TxtPcbH
=
600
TxtPcbH
=
600
TxtModV
=
500
TxtModV
=
500
...
...
eeschema/class_libentry.cpp
View file @
dc24d6fc
...
@@ -1032,7 +1032,7 @@ void LIB_COMPONENT::deleteAllFields()
...
@@ -1032,7 +1032,7 @@ void LIB_COMPONENT::deleteAllFields()
}
}
// 'it' is not advanced, but should point to next in list after erase()
// 'it' is not advanced, but should point to next in list after erase()
drawings
.
erase
(
it
);
it
=
drawings
.
erase
(
it
);
}
}
}
}
...
...
eeschema/netlist.cpp
View file @
dc24d6fc
...
@@ -321,6 +321,9 @@ void SCH_EDIT_FRAME::BuildNetListBase()
...
@@ -321,6 +321,9 @@ void SCH_EDIT_FRAME::BuildNetListBase()
*/
*/
void
FindBestNetNameForEachNet
(
NETLIST_OBJECT_LIST
&
aNetItemBuffer
)
void
FindBestNetNameForEachNet
(
NETLIST_OBJECT_LIST
&
aNetItemBuffer
)
{
{
if
(
aNetItemBuffer
.
size
()
==
0
)
return
;
// Should not occur: if this function is called, obviously some items exist in list
NETLIST_OBJECT_LIST
candidates
;
NETLIST_OBJECT_LIST
candidates
;
int
netcode
=
0
;
// current netcode for tested items
int
netcode
=
0
;
// current netcode for tested items
unsigned
idxstart
=
0
;
// index of the first item of this net
unsigned
idxstart
=
0
;
// index of the first item of this net
...
...
include/wxPcbStruct.h
View file @
dc24d6fc
...
@@ -1104,7 +1104,7 @@ public:
...
@@ -1104,7 +1104,7 @@ public:
*/
*/
bool
ReOrientModules
(
const
wxString
&
ModuleMask
,
int
Orient
,
bool
ReOrientModules
(
const
wxString
&
ModuleMask
,
int
Orient
,
bool
include_fixe
);
bool
include_fixe
);
void
FixeModule
(
MODULE
*
Module
,
bool
Fixe
);
void
LockModule
(
MODULE
*
aModule
,
bool
aLocked
);
void
AutoMoveModulesOnPcb
(
bool
PlaceModulesHorsPcb
);
void
AutoMoveModulesOnPcb
(
bool
PlaceModulesHorsPcb
);
void
AutoPlaceModule
(
MODULE
*
Module
,
int
place_mode
,
wxDC
*
DC
);
void
AutoPlaceModule
(
MODULE
*
Module
,
int
place_mode
,
wxDC
*
DC
);
int
RecherchePlacementModule
(
MODULE
*
Module
,
wxDC
*
DC
);
int
RecherchePlacementModule
(
MODULE
*
Module
,
wxDC
*
DC
);
...
...
pcbnew/ar_protos.h
View file @
dc24d6fc
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
/* ar-proto.h */
/* ar-proto.h */
/**************/
/**************/
int
Propagation
(
PCB_EDIT_FRAME
*
frame
);
/* Initialize a value type, the cells included in the board surface of the
/* Initialize a value type, the cells included in the board surface of the
* pad edge by pt_pad, with the margin reserved for isolation. */
* pad edge by pt_pad, with the margin reserved for isolation. */
void
Place_1_Pad_Board
(
BOARD
*
Pcb
,
D_PAD
*
pt_pad
,
int
type
,
int
marge
,
void
Place_1_Pad_Board
(
BOARD
*
Pcb
,
D_PAD
*
pt_pad
,
int
type
,
int
marge
,
...
@@ -56,17 +59,17 @@ int GetApxDist( int, int, int, int );
...
@@ -56,17 +59,17 @@ int GetApxDist( int, int, int, int );
int
CalcDist
(
int
,
int
,
int
,
int
);
int
CalcDist
(
int
,
int
,
int
,
int
);
/* BOARD.CPP */
/* BOARD.CPP */
bool
ComputeMatriceSize
(
PCB_BASE_FRAME
*
frame
,
int
pas_route
);
bool
ComputeMatriceSize
(
BOARD
*
aPcb
,
int
aGridRouting
);
int
Build_Work
(
BOARD
*
Pcb
);
int
Build_Work
(
BOARD
*
Pcb
);
void
PlaceCells
(
BOARD
*
Pcb
,
int
net_code
,
int
flag
=
0
);
void
PlaceCells
(
BOARD
*
Pcb
,
int
net_code
,
int
flag
=
0
);
BoardCell
GetCell
(
int
,
int
,
int
);
MATRIX_CELL
GetCell
(
int
aRow
,
int
aCol
,
int
aSide
);
void
SetCell
(
int
,
int
,
int
,
BoardCell
);
void
SetCell
(
int
aRow
,
int
aCol
,
int
aSide
,
MATRIX_CELL
aCell
);
void
OrCell
(
int
,
int
,
int
,
BoardCell
);
void
OrCell
(
int
aRow
,
int
aCol
,
int
aSide
,
MATRIX_CELL
aCell
);
void
XorCell
(
int
,
int
,
int
,
BoardCell
);
void
XorCell
(
int
aRow
,
int
aCol
,
int
aSide
,
MATRIX_CELL
aCell
);
void
AndCell
(
int
,
int
,
int
,
BoardCell
);
void
AndCell
(
int
aRow
,
int
aCol
,
int
aSide
,
MATRIX_CELL
aCell
);
void
AddCell
(
int
,
int
,
int
,
BoardCell
);
void
AddCell
(
int
aRow
,
int
aCol
,
int
aSide
,
MATRIX_CELL
aCell
);
D
istCell
GetDist
(
int
,
int
,
int
);
D
IST_CELL
GetDist
(
int
aRow
,
int
aCol
,
int
aSide
);
void
SetDist
(
int
,
int
,
int
,
DistCell
);
void
SetDist
(
int
aRow
,
int
aCol
,
int
aSide
,
DIST_CELL
);
int
GetDir
(
int
,
int
,
int
);
int
GetDir
(
int
aRow
,
int
aCol
,
int
aSide
);
void
SetDir
(
int
,
int
,
int
,
int
);
void
SetDir
(
int
aRow
,
int
aCol
,
int
aSide
,
int
aDir
);
pcbnew/automove.cpp
View file @
dc24d6fc
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
#include <algorithm>
#include <algorithm>
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "class_drawpanel.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "confirm.h"
...
@@ -15,7 +14,6 @@
...
@@ -15,7 +14,6 @@
#include "autorout.h"
#include "autorout.h"
#include "cell.h"
#include "cell.h"
#include "pcbnew_id.h"
#include "pcbnew_id.h"
#include "protos.h"
#include "kicad_device_context.h"
#include "kicad_device_context.h"
...
@@ -74,19 +72,19 @@ void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event )
...
@@ -74,19 +72,19 @@ void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event )
return
;
return
;
case
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE
:
case
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE
:
FixeModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
TRUE
);
LockModule
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
true
);
return
;
return
;
case
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE
:
case
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE
:
Fixe
Module
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
FALSE
);
Lock
Module
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
FALSE
);
return
;
return
;
case
ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES
:
case
ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES
:
Fixe
Module
(
NULL
,
FALSE
);
Lock
Module
(
NULL
,
FALSE
);
return
;
return
;
case
ID_POPUP_PCB_AUTOPLACE_FIXE_ALL_MODULES
:
case
ID_POPUP_PCB_AUTOPLACE_FIXE_ALL_MODULES
:
FixeModule
(
NULL
,
TRUE
);
LockModule
(
NULL
,
true
);
return
;
return
;
case
ID_POPUP_CANCEL_CURRENT_COMMAND
:
case
ID_POPUP_CANCEL_CURRENT_COMMAND
:
...
@@ -130,7 +128,7 @@ void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event )
...
@@ -130,7 +128,7 @@ void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event )
break
;
break
;
case
ID_POPUP_PCB_AUTOMOVE_NEW_MODULES
:
case
ID_POPUP_PCB_AUTOMOVE_NEW_MODULES
:
AutoMoveModulesOnPcb
(
TRUE
);
AutoMoveModulesOnPcb
(
true
);
break
;
break
;
case
ID_POPUP_PCB_AUTOROUTE_ALL_MODULES
:
case
ID_POPUP_PCB_AUTOROUTE_ALL_MODULES
:
...
@@ -154,7 +152,7 @@ void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event )
...
@@ -154,7 +152,7 @@ void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event )
break
;
break
;
default
:
default
:
DisplayError
(
this
,
wxT
(
"AutoPlace command error"
)
);
wxMessageBox
(
wxT
(
"AutoPlace command error"
)
);
break
;
break
;
}
}
...
@@ -268,27 +266,27 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb )
...
@@ -268,27 +266,27 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb )
}
}
/*
Update (TRUE or FALSE) FIXED attribute on the module
Module
/*
Set or reset (true or FALSE) Lock attribute of a
Module
* or all
the modules if
Module == NULL
* or all
modules if a
Module == NULL
*/
*/
void
PCB_EDIT_FRAME
::
FixeModule
(
MODULE
*
Module
,
bool
Fixe
)
void
PCB_EDIT_FRAME
::
LockModule
(
MODULE
*
aModule
,
bool
aLocked
)
{
{
if
(
Module
)
if
(
a
Module
)
{
{
Module
->
SetLocked
(
Fixe
);
aModule
->
SetLocked
(
aLocked
);
Module
->
DisplayInfo
(
this
);
a
Module
->
DisplayInfo
(
this
);
OnModify
();
OnModify
();
}
}
else
else
{
{
Module
=
GetBoard
()
->
m_Modules
;
a
Module
=
GetBoard
()
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
Module
->
Next
()
)
for
(
;
aModule
!=
NULL
;
aModule
=
a
Module
->
Next
()
)
{
{
if
(
WildCompareString
(
ModulesMaskSelection
,
if
(
WildCompareString
(
ModulesMaskSelection
,
Module
->
m_Reference
->
m_Text
)
)
a
Module
->
m_Reference
->
m_Text
)
)
{
{
Module
->
SetLocked
(
Fixe
);
aModule
->
SetLocked
(
aLocked
);
OnModify
();
OnModify
();
}
}
}
}
...
...
pcbnew/autoplac.cpp
View file @
dc24d6fc
...
@@ -3,14 +3,12 @@
...
@@ -3,14 +3,12 @@
/*******************************************/
/*******************************************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "class_drawpanel.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "confirm.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "wxPcbStruct.h"
#include "autorout.h"
#include "autorout.h"
#include "zones.h"
#include "cell.h"
#include "cell.h"
#include "class_board_design_settings.h"
#include "class_board_design_settings.h"
#include "colors_selection.h"
#include "colors_selection.h"
...
@@ -313,14 +311,14 @@ void PCB_EDIT_FRAME::DrawInfoPlace( wxDC* DC )
...
@@ -313,14 +311,14 @@ void PCB_EDIT_FRAME::DrawInfoPlace( wxDC* DC )
{
{
int
color
,
ii
,
jj
;
int
color
,
ii
,
jj
;
int
ox
,
oy
;
int
ox
,
oy
;
BoardCell
top_state
,
bottom_state
;
MATRIX_CELL
top_state
,
bottom_state
;
GRSetDrawMode
(
DC
,
GR_COPY
);
GRSetDrawMode
(
DC
,
GR_COPY
);
for
(
ii
=
0
;
ii
<
Nrows
;
ii
++
)
for
(
ii
=
0
;
ii
<
Board
.
m_
Nrows
;
ii
++
)
{
{
oy
=
GetBoard
()
->
m_BoundaryBox
.
m_Pos
.
y
+
(
ii
*
g_GridRoutingSize
);
oy
=
GetBoard
()
->
m_BoundaryBox
.
m_Pos
.
y
+
(
ii
*
g_GridRoutingSize
);
for
(
jj
=
0
;
jj
<
Ncols
;
jj
++
)
for
(
jj
=
0
;
jj
<
Board
.
m_
Ncols
;
jj
++
)
{
{
ox
=
GetBoard
()
->
m_BoundaryBox
.
m_Pos
.
x
+
ox
=
GetBoard
()
->
m_BoundaryBox
.
m_Pos
.
x
+
(
jj
*
g_GridRoutingSize
);
(
jj
*
g_GridRoutingSize
);
...
@@ -393,8 +391,10 @@ int PCB_EDIT_FRAME::GenPlaceBoard()
...
@@ -393,8 +391,10 @@ int PCB_EDIT_FRAME::GenPlaceBoard()
g_GridRoutingSize
;
g_GridRoutingSize
;
/* The boundary box must have its end point on placing grid: */
/* The boundary box must have its end point on placing grid: */
wxPoint
end
=
GetBoard
()
->
m_BoundaryBox
.
GetEnd
();
wxPoint
end
=
GetBoard
()
->
m_BoundaryBox
.
GetEnd
();
end
.
x
-=
end
.
x
%
g_GridRoutingSize
;
end
.
x
+=
g_GridRoutingSize
;
end
.
x
-=
end
.
x
%
g_GridRoutingSize
;
end
.
y
-=
end
.
y
%
g_GridRoutingSize
;
end
.
y
+=
g_GridRoutingSize
;
end
.
x
+=
g_GridRoutingSize
;
end
.
y
-=
end
.
y
%
g_GridRoutingSize
;
end
.
y
+=
g_GridRoutingSize
;
GetBoard
()
->
m_BoundaryBox
.
SetEnd
(
end
);
GetBoard
()
->
m_BoundaryBox
.
SetEnd
(
end
);
Nrows
=
GetBoard
()
->
m_BoundaryBox
.
GetHeight
()
/
g_GridRoutingSize
;
Nrows
=
GetBoard
()
->
m_BoundaryBox
.
GetHeight
()
/
g_GridRoutingSize
;
...
@@ -479,7 +479,7 @@ int PCB_EDIT_FRAME::GenPlaceBoard()
...
@@ -479,7 +479,7 @@ int PCB_EDIT_FRAME::GenPlaceBoard()
/* Initialize top layer. */
/* Initialize top layer. */
if
(
Board
.
m_BoardSide
[
TOP
]
)
if
(
Board
.
m_BoardSide
[
TOP
]
)
memcpy
(
Board
.
m_BoardSide
[
TOP
],
Board
.
m_BoardSide
[
BOTTOM
],
memcpy
(
Board
.
m_BoardSide
[
TOP
],
Board
.
m_BoardSide
[
BOTTOM
],
NbCells
*
sizeof
(
BoardCell
)
);
NbCells
*
sizeof
(
MATRIX_CELL
)
);
return
1
;
return
1
;
}
}
...
@@ -921,7 +921,7 @@ static void TracePenaliteRectangle( BOARD* Pcb,
...
@@ -921,7 +921,7 @@ static void TracePenaliteRectangle( BOARD* Pcb,
int
row
,
col
;
int
row
,
col
;
int
row_min
,
row_max
,
col_min
,
col_max
,
pmarge
;
int
row_min
,
row_max
,
col_min
,
col_max
,
pmarge
;
int
trace
=
0
;
int
trace
=
0
;
D
istCell
data
,
LocalPenalite
;
D
IST_CELL
data
,
LocalPenalite
;
int
lgain
,
cgain
;
int
lgain
,
cgain
;
if
(
masque_layer
&
g_TabOneLayerMask
[
Route_Layer_BOTTOM
]
)
if
(
masque_layer
&
g_TabOneLayerMask
[
Route_Layer_BOTTOM
]
)
...
...
pcbnew/autorout.cpp
View file @
dc24d6fc
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
/***************************************/
/***************************************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "class_drawpanel.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "wxPcbStruct.h"
#include "autorout.h"
#include "autorout.h"
...
@@ -14,8 +12,6 @@
...
@@ -14,8 +12,6 @@
#include "zones.h"
#include "zones.h"
#include "class_board_design_settings.h"
#include "class_board_design_settings.h"
#include "protos.h"
int
E_scale
;
/* Scaling factor of distance tables. */
int
E_scale
;
/* Scaling factor of distance tables. */
int
Nb_Sides
;
/* Number of layer for autorouting (0 or 1) */
int
Nb_Sides
;
/* Number of layer for autorouting (0 or 1) */
...
@@ -27,7 +23,7 @@ int ClosNodes; /* total number of nodes closed */
...
@@ -27,7 +23,7 @@ int ClosNodes; /* total number of nodes closed */
int
MoveNodes
;
/* total number of nodes moved */
int
MoveNodes
;
/* total number of nodes moved */
int
MaxNodes
;
/* maximum number of nodes opened at one time */
int
MaxNodes
;
/* maximum number of nodes opened at one time */
BOARD
HEAD
Board
;
/* 2-sided board */
MATRIX_ROUTING_
HEAD
Board
;
/* 2-sided board */
/* init board, route traces*/
/* init board, route traces*/
...
@@ -41,8 +37,8 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
...
@@ -41,8 +37,8 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
if
(
GetBoard
()
->
GetCopperLayerCount
()
>
1
)
if
(
GetBoard
()
->
GetCopperLayerCount
()
>
1
)
{
{
Route_Layer_TOP
=
((
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Route_Layer_TOP
;
Route_Layer_TOP
=
GetScreen
(
)
->
m_Route_Layer_TOP
;
Route_Layer_BOTTOM
=
((
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Route_Layer_BOTTOM
;
Route_Layer_BOTTOM
=
GetScreen
(
)
->
m_Route_Layer_BOTTOM
;
}
}
else
else
{
{
...
@@ -68,7 +64,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
...
@@ -68,7 +64,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
}
}
if
(
autoroute_net_code
<=
0
)
if
(
autoroute_net_code
<=
0
)
{
{
DisplayError
(
this
,
_
(
"Net not selected"
)
);
return
;
wxMessageBox
(
_
(
"Net not selected"
)
);
return
;
}
}
break
;
break
;
...
@@ -76,7 +72,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
...
@@ -76,7 +72,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
Module
=
(
MODULE
*
)
GetScreen
()
->
GetCurItem
();
Module
=
(
MODULE
*
)
GetScreen
()
->
GetCurItem
();
if
(
(
Module
==
NULL
)
||
(
Module
->
Type
()
!=
TYPE_MODULE
)
)
if
(
(
Module
==
NULL
)
||
(
Module
->
Type
()
!=
TYPE_MODULE
)
)
{
{
DisplayError
(
this
,
_
(
"Module not selected"
)
);
wxMessageBox
(
_
(
"Module not selected"
)
);
return
;
return
;
}
}
break
;
break
;
...
@@ -85,14 +81,14 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
...
@@ -85,14 +81,14 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
Pad
=
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
();
Pad
=
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
();
if
(
(
Pad
==
NULL
)
||
(
Pad
->
Type
()
!=
TYPE_PAD
)
)
if
(
(
Pad
==
NULL
)
||
(
Pad
->
Type
()
!=
TYPE_PAD
)
)
{
{
DisplayError
(
this
,
_
(
"Pad not selected"
)
);
wxMessageBox
(
_
(
"Pad not selected"
)
);
return
;
return
;
}
}
break
;
break
;
}
}
if
(
(
GetBoard
()
->
m_Status_Pcb
&
LISTE_RATSNEST_ITEM_OK
)
==
0
)
if
(
(
GetBoard
()
->
m_Status_Pcb
&
LISTE_RATSNEST_ITEM_OK
)
==
0
)
Compile_Ratsnest
(
DC
,
TRUE
);
Compile_Ratsnest
(
DC
,
true
);
/* Set the flag on the ratsnest to CH_ROUTE_REQ. */
/* Set the flag on the ratsnest to CH_ROUTE_REQ. */
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
GetRatsnestsCount
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
GetRatsnestsCount
();
ii
++
)
...
@@ -142,7 +138,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
...
@@ -142,7 +138,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
E_scale
=
1
;
E_scale
=
1
;
/* Calculated ncol and nrow, matrix size for routing. */
/* Calculated ncol and nrow, matrix size for routing. */
ComputeMatriceSize
(
this
,
g_GridRoutingSize
);
ComputeMatriceSize
(
GetBoard
()
,
g_GridRoutingSize
);
MsgPanel
->
EraseMsgBox
();
MsgPanel
->
EraseMsgBox
();
...
@@ -153,7 +149,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
...
@@ -153,7 +149,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
if
(
Board
.
InitBoard
()
<
0
)
if
(
Board
.
InitBoard
()
<
0
)
{
{
DisplayError
(
this
,
_
(
"No memory for autorouting"
)
);
wxMessageBox
(
_
(
"No memory for autorouting"
)
);
Board
.
UnInitBoard
();
/* Free memory. */
Board
.
UnInitBoard
();
/* Free memory. */
return
;
return
;
}
}
...
@@ -181,14 +177,14 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
...
@@ -181,14 +177,14 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
}
}
/* Clear the flag
has CH_NOROUTABLE which is set to 1 by Solve()
/* Clear the flag
CH_NOROUTABLE which is set to 1 by Solve(),
*
When a ratsnets has not been
routed.
*
when a track was not
routed.
*
If this flag is 1 it is not reroute
*
(If this flag is 1 the corresponding track it is not rerouted)
*/
*/
void
PCB_EDIT_FRAME
::
Reset_Noroutable
(
wxDC
*
DC
)
void
PCB_EDIT_FRAME
::
Reset_Noroutable
(
wxDC
*
DC
)
{
{
if
(
(
GetBoard
()
->
m_Status_Pcb
&
LISTE_RATSNEST_ITEM_OK
)
==
0
)
if
(
(
GetBoard
()
->
m_Status_Pcb
&
LISTE_RATSNEST_ITEM_OK
)
==
0
)
Compile_Ratsnest
(
DC
,
TRUE
);
Compile_Ratsnest
(
DC
,
true
);
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
GetRatsnestsCount
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
GetRatsnestsCount
();
ii
++
)
{
{
...
@@ -197,7 +193,7 @@ void PCB_EDIT_FRAME::Reset_Noroutable( wxDC* DC )
...
@@ -197,7 +193,7 @@ void PCB_EDIT_FRAME::Reset_Noroutable( wxDC* DC )
}
}
/*
Function DEBUG: displays filling cells TOP and BOTTOM
*/
/*
DEBUG Function: displays the routing matrix
*/
void
DisplayBoard
(
EDA_DRAW_PANEL
*
panel
,
wxDC
*
DC
)
void
DisplayBoard
(
EDA_DRAW_PANEL
*
panel
,
wxDC
*
DC
)
{
{
int
row
,
col
,
i
,
j
;
int
row
,
col
,
i
,
j
;
...
...
pcbnew/autorout.h
View file @
dc24d6fc
...
@@ -31,6 +31,8 @@ extern int E_scale; /* Scaling factor of distance tables. */
...
@@ -31,6 +31,8 @@ extern int E_scale; /* Scaling factor of distance tables. */
#define ONE_SIDE 0
#define ONE_SIDE 0
#define TWO_SIDES 1
#define TWO_SIDES 1
#define MAX_SIDES_COUNT 2
extern
int
Nb_Sides
;
/* Number of layers for autorouting (0 or 1) */
extern
int
Nb_Sides
;
/* Number of layers for autorouting (0 or 1) */
#define FORCE_PADS 1
/* Force placement of pads for any Netcode */
#define FORCE_PADS 1
/* Force placement of pads for any Netcode */
...
@@ -46,32 +48,37 @@ extern int ClosNodes; /* total number of nodes closed */
...
@@ -46,32 +48,37 @@ extern int ClosNodes; /* total number of nodes closed */
extern
int
MoveNodes
;
/* total number of nodes moved */
extern
int
MoveNodes
;
/* total number of nodes moved */
extern
int
MaxNodes
;
/* maximum number of nodes opened at one time */
extern
int
MaxNodes
;
/* maximum number of nodes opened at one time */
/* Grid size for automatic routing */
extern
int
g_GridRoutingSize
;
/* Structures useful to the generation of board as bitmap. */
/* Structures useful to the generation of board as bitmap. */
typedef
char
BoardCell
;
typedef
char
MATRIX_CELL
;
typedef
int
DistCell
;
typedef
int
DIST_CELL
;
typedef
char
DIR_CELL
;
class
BOARDHEAD
/* header of blocks of BoardCell
*/
class
MATRIX_ROUTING_HEAD
/* header of blocks of MATRIX_CELL
*/
{
{
public
:
public
:
BoardCell
*
m_BoardSide
[
2
];
/* ptr to block of memory: 2-sided board */
MATRIX_CELL
*
m_BoardSide
[
MAX_SIDES_COUNT
];
/* ptr to block of memory: 2-sided board */
D
istCell
*
m_DistSide
[
2
];
/* ptr to block of memory: path distance to
D
IST_CELL
*
m_DistSide
[
MAX_SIDES_COUNT
];
/* ptr to block of memory: path distance to
* cells */
* cells */
char
*
m_DirSide
[
2
];
/* header of blocks of chars:pointers back to
DIR_CELL
*
m_DirSide
[
MAX_SIDES_COUNT
];
/* header of blocks of chars:pointers back to
* source */
* source */
bool
m_InitBoardDone
;
bool
m_InitBoardDone
;
int
m_Layers
;
int
m_Layers
;
int
m_GridRouting
;
// Size of grid for autoplace/autoroute
int
m_Nrows
,
m_Ncols
;
int
m_Nrows
,
m_Ncols
;
int
m_MemSize
;
int
m_MemSize
;
public
:
public
:
BOARD
HEAD
();
MATRIX_ROUTING_
HEAD
();
~
BOARD
HEAD
();
~
MATRIX_ROUTING_
HEAD
();
int
InitBoard
();
int
InitBoard
();
void
UnInitBoard
();
void
UnInitBoard
();
};
};
extern
BOARD
HEAD
Board
;
/* 2-sided board */
extern
MATRIX_ROUTING_
HEAD
Board
;
/* 2-sided board */
/* Constants used to trace the cells on the BOARD */
/* Constants used to trace the cells on the BOARD */
...
...
pcbnew/board.cpp
View file @
dc24d6fc
This diff is collapsed.
Click to expand it.
pcbnew/dist.cpp
View file @
dc24d6fc
...
@@ -3,29 +3,19 @@
...
@@ -3,29 +3,19 @@
/***************************************************************/
/***************************************************************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "autorout.h"
#include "autorout.h"
#include "cell.h"
#include "cell.h"
/* Routines exportees : */
int
GetApxDist
(
int
,
int
,
int
,
int
);
int
CalcDist
(
int
,
int
,
int
);
/* Les tables de distances et penalites sont etablies sur la base du pas
/* Les tables de distances et penalites sont etablies sur la base du pas
de routage de 50 unites(le pas entre les cellules est 50 unites)
de routage de 50 unites(le pas entre les cellules est 50 unites)
La distance vraie est calculee par un facteur d'echelle
La distance vraie est calculee par un facteur d'echelle
*/
*/
/* calculate approximate distance
/************************************************/
*/
/* int GetApxDist(int r1,int c1,int r2,int c2 ) */
/************************************************/
/* calculate approximate distance */
int
GetApxDist
(
int
r1
,
int
c1
,
int
r2
,
int
c2
)
int
GetApxDist
(
int
r1
,
int
c1
,
int
r2
,
int
c2
)
{
{
int
d1
,
d2
;
/* row and column deltas */
int
d1
,
d2
;
/* row and column deltas */
...
@@ -35,7 +25,7 @@ int d1, d2; /* row and column deltas */
...
@@ -35,7 +25,7 @@ int d1, d2; /* row and column deltas */
if
((
d2
=
c1
-
c2
)
<
0
)
/* get absolute column delta */
if
((
d2
=
c1
-
c2
)
<
0
)
/* get absolute column delta */
d2
=
-
d2
;
d2
=
-
d2
;
return
(
(
d1
+
d2
)
*
50
*
E_scale
);
return
(
(
d1
+
d2
)
*
50
*
E_scale
);
if
(
!
d1
)
/* in same row? */
if
(
!
d1
)
/* in same row? */
return
(
(
d2
*
50
*
E_scale
)
);
/* 50 mils per cell */
return
(
(
d2
*
50
*
E_scale
)
);
/* 50 mils per cell */
...
...
pcbnew/export_vrml.cpp
View file @
dc24d6fc
...
@@ -1037,10 +1037,11 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
...
@@ -1037,10 +1037,11 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
fname
.
Replace
(
wxT
(
"
\\
"
),
wxT
(
"/"
)
);
fname
.
Replace
(
wxT
(
"
\\
"
),
wxT
(
"/"
)
);
wxString
source_fname
=
fname
;
wxString
source_fname
=
fname
;
if
(
aExport3DFiles
)
if
(
aExport3DFiles
)
// Change dangerous characters in filenames
{
{
fname
.
Replace
(
wxT
(
"/"
),
wxT
(
"_"
)
);
fname
.
Replace
(
wxT
(
"/"
),
wxT
(
"_"
)
);
fname
.
Replace
(
wxT
(
":_"
),
wxT
(
"_"
)
);
fname
.
Replace
(
wxT
(
":_"
),
wxT
(
"_"
)
);
fname
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
fname
=
a3D_Subdir
+
wxT
(
"/"
)
+
fname
;
fname
=
a3D_Subdir
+
wxT
(
"/"
)
+
fname
;
if
(
!
wxFileExists
(
fname
)
)
if
(
!
wxFileExists
(
fname
)
)
wxCopyFile
(
source_fname
,
fname
);
wxCopyFile
(
source_fname
,
fname
);
...
...
pcbnew/graphpcb.cpp
View file @
dc24d6fc
...
@@ -3,12 +3,10 @@
...
@@ -3,12 +3,10 @@
/****************************************************/
/****************************************************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "autorout.h"
#include "autorout.h"
#include "zones.h"
#include "trigo.h"
#include "trigo.h"
#include "cell.h"
#include "cell.h"
...
@@ -42,7 +40,7 @@ static void DrawSegmentQcq( int ux0,
...
@@ -42,7 +40,7 @@ static void DrawSegmentQcq( int ux0,
static
void
TraceFilledCercle
(
BOARD
*
Pcb
,
static
void
TraceFilledCercle
(
BOARD
*
Pcb
,
int
cx
,
int
cx
,
int
cy
,
int
cy
,
int
ra
yon
,
int
ra
dius
,
int
masque_layer
,
int
masque_layer
,
int
color
,
int
color
,
int
op_logique
);
int
op_logique
);
...
@@ -151,7 +149,7 @@ void Place_1_Pad_Board( BOARD* Pcb,
...
@@ -151,7 +149,7 @@ void Place_1_Pad_Board( BOARD* Pcb,
void
TraceFilledCercle
(
BOARD
*
Pcb
,
void
TraceFilledCercle
(
BOARD
*
Pcb
,
int
cx
,
int
cx
,
int
cy
,
int
cy
,
int
ra
yon
,
int
ra
dius
,
int
masque_layer
,
int
masque_layer
,
int
color
,
int
color
,
int
op_logique
)
int
op_logique
)
...
@@ -162,7 +160,7 @@ void TraceFilledCercle( BOARD* Pcb,
...
@@ -162,7 +160,7 @@ void TraceFilledCercle( BOARD* Pcb,
int
trace
=
0
;
int
trace
=
0
;
float
fdistmin
,
fdistx
,
fdisty
;
float
fdistmin
,
fdistx
,
fdisty
;
void
(
*
WriteCell
)(
int
,
int
,
int
,
BoardCell
);
void
(
*
WriteCell
)(
int
,
int
,
int
,
MATRIX_CELL
);
int
tstwrite
=
0
;
int
tstwrite
=
0
;
int
distmin
;
int
distmin
;
...
@@ -208,13 +206,13 @@ void TraceFilledCercle( BOARD* Pcb,
...
@@ -208,13 +206,13 @@ void TraceFilledCercle( BOARD* Pcb,
cx
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
x
;
cx
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
x
;
cy
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
y
;
cy
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
y
;
distmin
=
ra
yon
;
distmin
=
ra
dius
;
/* Calculate the bounding rectangle of the circle. */
/* Calculate the bounding rectangle of the circle. */
ux0
=
cx
-
ra
yon
;
ux0
=
cx
-
ra
dius
;
uy0
=
cy
-
ra
yon
;
uy0
=
cy
-
ra
dius
;
ux1
=
cx
+
ra
yon
;
ux1
=
cx
+
ra
dius
;
uy1
=
cy
+
ra
yon
;
uy1
=
cy
+
ra
dius
;
/* Calculate limit coordinates of cells belonging to the rectangle. */
/* Calculate limit coordinates of cells belonging to the rectangle. */
row_max
=
uy1
/
g_GridRoutingSize
;
row_max
=
uy1
/
g_GridRoutingSize
;
...
@@ -384,7 +382,7 @@ void TraceLignePcb( int x0,
...
@@ -384,7 +382,7 @@ void TraceLignePcb( int x0,
int
dx
,
dy
,
lim
;
int
dx
,
dy
,
lim
;
int
cumul
,
inc
,
il
,
delta
;
int
cumul
,
inc
,
il
,
delta
;
void
(
*
WriteCell
)(
int
,
int
,
int
,
BoardCell
);
void
(
*
WriteCell
)(
int
,
int
,
int
,
MATRIX_CELL
);
switch
(
op_logique
)
switch
(
op_logique
)
{
{
...
@@ -537,7 +535,7 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
...
@@ -537,7 +535,7 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
int
row_min
,
row_max
,
col_min
,
col_max
;
int
row_min
,
row_max
,
col_min
,
col_max
;
int
trace
=
0
;
int
trace
=
0
;
void
(
*
WriteCell
)(
int
,
int
,
int
,
BoardCell
);
void
(
*
WriteCell
)(
int
,
int
,
int
,
MATRIX_CELL
);
if
(
masque_layer
&
g_TabOneLayerMask
[
Route_Layer_BOTTOM
]
)
if
(
masque_layer
&
g_TabOneLayerMask
[
Route_Layer_BOTTOM
]
)
trace
=
1
;
/* Trace on BOTTOM */
trace
=
1
;
/* Trace on BOTTOM */
...
@@ -623,12 +621,12 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
...
@@ -623,12 +621,12 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
{
{
int
row
,
col
;
int
row
,
col
;
int
cx
,
cy
;
/* Center of rectangle */
int
cx
,
cy
;
/* Center of rectangle */
int
ra
yon
;
/* Radius of the circle */
int
ra
dius
;
/* Radius of the circle */
int
row_min
,
row_max
,
col_min
,
col_max
;
int
row_min
,
row_max
,
col_min
,
col_max
;
int
rotrow
,
rotcol
;
int
rotrow
,
rotcol
;
int
trace
=
0
;
int
trace
=
0
;
void
(
*
WriteCell
)(
int
,
int
,
int
,
BoardCell
);
void
(
*
WriteCell
)(
int
,
int
,
int
,
MATRIX_CELL
);
if
(
masque_layer
&
g_TabOneLayerMask
[
Route_Layer_BOTTOM
]
)
if
(
masque_layer
&
g_TabOneLayerMask
[
Route_Layer_BOTTOM
]
)
trace
=
1
;
/* Trace on BOTTOM */
trace
=
1
;
/* Trace on BOTTOM */
...
@@ -671,16 +669,16 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
...
@@ -671,16 +669,16 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1,
cx
=
(
ux0
+
ux1
)
/
2
;
cx
=
(
ux0
+
ux1
)
/
2
;
cy
=
(
uy0
+
uy1
)
/
2
;
cy
=
(
uy0
+
uy1
)
/
2
;
ra
yon
=
(
int
)
sqrt
(
(
double
)
(
cx
-
ux0
)
*
(
cx
-
ux0
)
ra
dius
=
(
int
)
sqrt
(
(
double
)
(
cx
-
ux0
)
*
(
cx
-
ux0
)
+
(
double
)
(
cy
-
uy0
)
*
(
cy
-
uy0
)
);
+
(
double
)
(
cy
-
uy0
)
*
(
cy
-
uy0
)
);
/* Calculating coordinate limits belonging to the rectangle. */
/* Calculating coordinate limits belonging to the rectangle. */
row_max
=
(
cy
+
ra
yon
)
/
g_GridRoutingSize
;
row_max
=
(
cy
+
ra
dius
)
/
g_GridRoutingSize
;
col_max
=
(
cx
+
ra
yon
)
/
g_GridRoutingSize
;
col_max
=
(
cx
+
ra
dius
)
/
g_GridRoutingSize
;
row_min
=
(
cy
-
ra
yon
)
/
g_GridRoutingSize
;
row_min
=
(
cy
-
ra
dius
)
/
g_GridRoutingSize
;
if
(
uy0
>
row_min
*
g_GridRoutingSize
)
if
(
uy0
>
row_min
*
g_GridRoutingSize
)
row_min
++
;
row_min
++
;
col_min
=
(
cx
-
ra
yon
)
/
g_GridRoutingSize
;
col_min
=
(
cx
-
ra
dius
)
/
g_GridRoutingSize
;
if
(
ux0
>
col_min
*
g_GridRoutingSize
)
if
(
ux0
>
col_min
*
g_GridRoutingSize
)
col_min
++
;
col_min
++
;
...
@@ -730,7 +728,7 @@ void DrawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
...
@@ -730,7 +728,7 @@ void DrawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
int
row_max
,
col_max
,
row_min
,
col_min
;
int
row_max
,
col_max
,
row_min
,
col_min
;
int
demi_pas
;
int
demi_pas
;
void
(
*
WriteCell
)(
int
,
int
,
int
,
BoardCell
);
void
(
*
WriteCell
)(
int
,
int
,
int
,
MATRIX_CELL
);
int
angle
;
int
angle
;
int
cx
,
cy
,
dx
,
dy
;
int
cx
,
cy
,
dx
,
dy
;
...
@@ -859,19 +857,19 @@ void DrawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
...
@@ -859,19 +857,19 @@ void DrawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
void
TraceCercle
(
int
ux0
,
int
uy0
,
int
ux1
,
int
uy1
,
int
lg
,
int
layer
,
void
TraceCercle
(
int
ux0
,
int
uy0
,
int
ux1
,
int
uy1
,
int
lg
,
int
layer
,
int
color
,
int
op_logique
)
int
color
,
int
op_logique
)
{
{
int
ra
yon
,
nb_segm
;
int
ra
dius
,
nb_segm
;
int
x0
,
y0
,
// Starting point of the current segment trace.
int
x0
,
y0
,
// Starting point of the current segment trace.
x1
,
y1
;
// End point.
x1
,
y1
;
// End point.
int
ii
;
int
ii
;
int
angle
;
int
angle
;
ra
yon
=
(
int
)
hypot
(
(
double
)
(
ux1
-
ux0
),
(
double
)
(
uy1
-
uy0
)
);
ra
dius
=
(
int
)
hypot
(
(
double
)
(
ux1
-
ux0
),
(
double
)
(
uy1
-
uy0
)
);
x0
=
x1
=
ra
yon
;
x0
=
x1
=
ra
dius
;
y0
=
y1
=
0
;
y0
=
y1
=
0
;
if
(
lg
<
1
)
if
(
lg
<
1
)
lg
=
1
;
lg
=
1
;
nb_segm
=
(
2
*
ra
yon
)
/
lg
;
nb_segm
=
(
2
*
ra
dius
)
/
lg
;
if
(
nb_segm
<
5
)
if
(
nb_segm
<
5
)
nb_segm
=
5
;
nb_segm
=
5
;
if
(
nb_segm
>
100
)
if
(
nb_segm
>
100
)
...
@@ -879,42 +877,42 @@ void TraceCercle( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
...
@@ -879,42 +877,42 @@ void TraceCercle( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
for
(
ii
=
1
;
ii
<
nb_segm
;
ii
++
)
for
(
ii
=
1
;
ii
<
nb_segm
;
ii
++
)
{
{
angle
=
(
3600
*
ii
)
/
nb_segm
;
angle
=
(
3600
*
ii
)
/
nb_segm
;
x1
=
(
int
)
(
ra
yon
*
fcosinus
[
angle
]
);
x1
=
(
int
)
(
ra
dius
*
fcosinus
[
angle
]
);
y1
=
(
int
)
(
ra
yon
*
fsinus
[
angle
]
);
y1
=
(
int
)
(
ra
dius
*
fsinus
[
angle
]
);
DrawSegmentQcq
(
x0
+
ux0
,
y0
+
uy0
,
x1
+
ux0
,
y1
+
uy0
,
lg
,
DrawSegmentQcq
(
x0
+
ux0
,
y0
+
uy0
,
x1
+
ux0
,
y1
+
uy0
,
lg
,
layer
,
color
,
op_logique
);
layer
,
color
,
op_logique
);
x0
=
x1
;
x0
=
x1
;
y0
=
y1
;
y0
=
y1
;
}
}
DrawSegmentQcq
(
x1
+
ux0
,
y1
+
uy0
,
ux0
+
ra
yon
,
uy0
,
lg
,
layer
,
DrawSegmentQcq
(
x1
+
ux0
,
y1
+
uy0
,
ux0
+
ra
dius
,
uy0
,
lg
,
layer
,
color
,
op_logique
);
color
,
op_logique
);
}
}
/* Fills all cells
BOARD contained in the arc of "L" angle
/* Fills all cells
contained in arc with color , using op_logique.
* half-width lg ux center, starting in ux y0, y1 is set to color.
* half-width lg ux center, starting in ux y0, y1 is set to color.
* coord in PCB units (0.1 mil
lion
) relating to the origin
* coord in PCB units (0.1 mil) relating to the origin
*
Pt_pcb->m_PcbBox.m_Xmin, Y's
board.
*
of the
board.
*/
*/
void
TraceArc
(
int
ux0
,
int
uy0
,
int
ux1
,
int
uy1
,
int
ArcAngle
,
int
lg
,
void
TraceArc
(
int
ux0
,
int
uy0
,
int
ux1
,
int
uy1
,
int
ArcAngle
,
int
lg
,
int
layer
,
int
color
,
int
op_logique
)
int
layer
,
int
color
,
int
op_logique
)
{
{
int
ra
yon
,
nb_segm
;
int
ra
dius
,
nb_segm
;
int
x0
,
y0
,
// Starting point of the current segment trace
int
x0
,
y0
,
// Starting point of the current segment trace
x1
,
y1
;
// End point
x1
,
y1
;
// End point
int
ii
;
int
ii
;
int
angle
,
StAngle
;
int
angle
,
StAngle
;
ra
yon
=
(
int
)
hypot
(
(
double
)
(
ux1
-
ux0
),
(
double
)
(
uy1
-
uy0
)
);
ra
dius
=
(
int
)
hypot
(
(
double
)
(
ux1
-
ux0
),
(
double
)
(
uy1
-
uy0
)
);
x0
=
ux1
-
ux0
;
x0
=
ux1
-
ux0
;
y0
=
uy1
-
uy0
;
y0
=
uy1
-
uy0
;
StAngle
=
ArcTangente
(
uy1
-
uy0
,
ux1
-
ux0
);
StAngle
=
ArcTangente
(
uy1
-
uy0
,
ux1
-
ux0
);
if
(
lg
<
1
)
if
(
lg
<
1
)
lg
=
1
;
lg
=
1
;
nb_segm
=
(
2
*
ra
yon
)
/
lg
;
nb_segm
=
(
2
*
ra
dius
)
/
lg
;
nb_segm
=
(
nb_segm
*
abs
(
ArcAngle
)
)
/
3600
;
nb_segm
=
(
nb_segm
*
abs
(
ArcAngle
)
)
/
3600
;
if
(
nb_segm
<
5
)
if
(
nb_segm
<
5
)
nb_segm
=
5
;
nb_segm
=
5
;
...
@@ -932,14 +930,14 @@ void TraceArc( int ux0, int uy0, int ux1, int uy1, int ArcAngle, int lg,
...
@@ -932,14 +930,14 @@ void TraceArc( int ux0, int uy0, int ux1, int uy1, int ArcAngle, int lg,
while
(
angle
<
0
)
while
(
angle
<
0
)
angle
+=
3600
;
angle
+=
3600
;
x1
=
(
int
)
(
ra
yon
*
fcosinus
[
angle
]
);
x1
=
(
int
)
(
ra
dius
*
fcosinus
[
angle
]
);
y1
=
(
int
)
(
ra
yon
*
fsinus
[
angle
]
);
y1
=
(
int
)
(
ra
dius
*
fsinus
[
angle
]
);
DrawSegmentQcq
(
x0
+
ux0
,
y0
+
uy0
,
x1
+
ux0
,
y1
+
uy0
,
lg
,
layer
,
DrawSegmentQcq
(
x0
+
ux0
,
y0
+
uy0
,
x1
+
ux0
,
y1
+
uy0
,
lg
,
layer
,
color
,
op_logique
);
color
,
op_logique
);
x0
=
x1
;
x0
=
x1
;
y0
=
y1
;
y0
=
y1
;
}
}
// DrawSegmentQcq(x1+ux0,y1+uy0, ux0+ra
yon
, uy0,lg,layer, color,
// DrawSegmentQcq(x1+ux0,y1+uy0, ux0+ra
dius
, uy0,lg,layer, color,
// op_logique);
// op_logique);
}
}
pcbnew/ioascii.cpp
View file @
dc24d6fc
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include "pcbnew.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "wxPcbStruct.h"
#include "autorout.h"
#include "class_board_design_settings.h"
#include "class_board_design_settings.h"
#ifdef PCBNEW
#ifdef PCBNEW
...
...
pcbnew/protos.h
View file @
dc24d6fc
...
@@ -249,12 +249,6 @@ int ReturnEndsTrack( TRACK* RefTrack, int NbSegm, TRACK** StartTrack, TRACK** E
...
@@ -249,12 +249,6 @@ int ReturnEndsTrack( TRACK* RefTrack, int NbSegm, TRACK** StartTrack, TRACK** E
void
ListSetState
(
EDA_ITEM
*
Start
,
int
Nbitem
,
int
State
,
int
onoff
);
void
ListSetState
(
EDA_ITEM
*
Start
,
int
Nbitem
,
int
State
,
int
onoff
);
/************/
/* ZONES.CPP */
/************/
int
Propagation
(
PCB_EDIT_FRAME
*
frame
);
/***************/
/***************/
/* DUPLTRAC.CPP */
/* DUPLTRAC.CPP */
/***************/
/***************/
...
...
pcbnew/queue.cpp
View file @
dc24d6fc
...
@@ -3,14 +3,11 @@
...
@@ -3,14 +3,11 @@
/*************/
/*************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "autorout.h"
#include "autorout.h"
#include "protos.h"
#include "cell.h"
#include "cell.h"
struct
PcbQueue
/* search queue structure */
struct
PcbQueue
/* search queue structure */
...
...
pcbnew/solve.cpp
View file @
dc24d6fc
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
/*************/
/*************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "class_drawpanel.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "confirm.h"
...
@@ -12,7 +11,6 @@
...
@@ -12,7 +11,6 @@
#include "wxPcbStruct.h"
#include "wxPcbStruct.h"
#include "class_board_design_settings.h"
#include "class_board_design_settings.h"
#include "autorout.h"
#include "autorout.h"
#include "zones.h"
#include "protos.h"
#include "protos.h"
#include "cell.h"
#include "cell.h"
...
@@ -237,7 +235,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
...
@@ -237,7 +235,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
wxString
msg
;
wxString
msg
;
DrawPanel
->
m_AbortRequest
=
FALSE
;
DrawPanel
->
m_AbortRequest
=
FALSE
;
DrawPanel
->
m_AbortEnable
=
TRUE
;
DrawPanel
->
m_AbortEnable
=
true
;
s_Clearance
=
GetBoard
()
->
m_NetClasses
.
GetDefault
()
->
GetClearance
();
s_Clearance
=
GetBoard
()
->
m_NetClasses
.
GetDefault
()
->
GetClearance
();
...
@@ -263,7 +261,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
...
@@ -263,7 +261,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
if
(
IsOK
(
this
,
_
(
"Abort routing?"
)
)
)
if
(
IsOK
(
this
,
_
(
"Abort routing?"
)
)
)
{
{
success
=
STOP_FROM_ESC
;
success
=
STOP_FROM_ESC
;
stop
=
TRUE
;
stop
=
true
;
break
;
break
;
}
}
else
else
...
@@ -319,11 +317,11 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
...
@@ -319,11 +317,11 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
break
;
break
;
case
STOP_FROM_ESC
:
case
STOP_FROM_ESC
:
stop
=
TRUE
;
stop
=
true
;
break
;
break
;
case
ERR_MEMORY
:
case
ERR_MEMORY
:
stop
=
TRUE
;
stop
=
true
;
break
;
break
;
default
:
default
:
...
@@ -362,7 +360,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
...
@@ -362,7 +360,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
*
*
* Returns:
* Returns:
* SUCCESS if routed
* SUCCESS if routed
* TRIVIAL_SUCCESS if pads
connected by overlay (no track has learn
ed)
* TRIVIAL_SUCCESS if pads
are connected by overlay (no track need
ed)
* If failure NOSUCCESS
* If failure NOSUCCESS
* Escape STOP_FROM_ESC if demand
* Escape STOP_FROM_ESC if demand
* ERR_MEMORY if memory allocation failed.
* ERR_MEMORY if memory allocation failed.
...
@@ -406,7 +404,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe,
...
@@ -406,7 +404,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe,
via_marge
=
s_Clearance
+
(
pcbframe
->
GetBoard
()
->
GetCurrentViaSize
()
/
2
);
via_marge
=
s_Clearance
+
(
pcbframe
->
GetBoard
()
->
GetCurrentViaSize
()
/
2
);
/* clear direction flags */
/* clear direction flags */
i
=
Nrows
*
Ncols
*
sizeof
(
char
);
i
=
Nrows
*
Ncols
*
sizeof
(
DIR_CELL
);
memset
(
Board
.
m_DirSide
[
TOP
],
FROM_NOWHERE
,
i
);
memset
(
Board
.
m_DirSide
[
TOP
],
FROM_NOWHERE
,
i
);
memset
(
Board
.
m_DirSide
[
BOTTOM
],
FROM_NOWHERE
,
i
);
memset
(
Board
.
m_DirSide
[
BOTTOM
],
FROM_NOWHERE
,
i
);
...
...
pcbnew/work.cpp
View file @
dc24d6fc
...
@@ -3,15 +3,12 @@
...
@@ -3,15 +3,12 @@
/************************/
/************************/
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "common.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "autorout.h"
#include "autorout.h"
#include "cell.h"
#include "cell.h"
#include "protos.h"
struct
CWORK
/* a unit of work is a hole-pair to connect */
struct
CWORK
/* a unit of work is a hole-pair to connect */
{
{
...
...
pcbnew/zones.h
View file @
dc24d6fc
...
@@ -35,8 +35,6 @@ enum { // How pads are covered by copper in zone
...
@@ -35,8 +35,6 @@ enum { // How pads are covered by copper in zone
/* variables used in zone dialogs and functions */
/* variables used in zone dialogs and functions */
/************************************************/
/************************************************/
/* parametre grid size for automatic routing */
extern
int
g_GridRoutingSize
;
extern
bool
g_Zone_45_Only
;
extern
bool
g_Zone_45_Only
;
// Default setting used when creating a new zone
// Default setting used when creating a new zone
...
...
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