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
bd5ca82f
Commit
bd5ca82f
authored
Jan 05, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use pad_shapes.h
parent
af47386c
Changes
35
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
217 additions
and
222 deletions
+217
-222
3d_draw.cpp
3d-viewer/3d_draw.cpp
+4
-4
trackball.cpp
3d-viewer/trackball.cpp
+1
-1
trackball.h
3d-viewer/trackball.h
+1
-1
change_log.txt
change_log.txt
+26
-14
listlib.cpp
cvpcb/listlib.cpp
+1
-1
netform.cpp
eeschema/netform.cpp
+1
-1
netlist.cpp
eeschema/netlist.cpp
+3
-3
netlist.h
eeschema/netlist.h
+1
-1
symbdraw.cpp
eeschema/symbdraw.cpp
+2
-2
rs274d.cpp
gerbview/rs274d.cpp
+3
-3
class_pad.cpp
pcbnew/class_pad.cpp
+52
-52
class_pad.h
pcbnew/class_pad.h
+7
-18
clean.cpp
pcbnew/clean.cpp
+6
-4
collectors.cpp
pcbnew/collectors.cpp
+1
-1
dialog_pad_edit.cpp
pcbnew/dialog_pad_edit.cpp
+1
-1
drc.cpp
pcbnew/drc.cpp
+18
-18
editpads.cpp
pcbnew/editpads.cpp
+20
-20
export_gencad.cpp
pcbnew/export_gencad.cpp
+6
-6
gen_self.h
pcbnew/gen_self.h
+2
-2
gendrill.cpp
pcbnew/gendrill.cpp
+7
-7
globaleditpad.cpp
pcbnew/globaleditpad.cpp
+4
-4
graphpcb.cpp
pcbnew/graphpcb.cpp
+2
-2
move-drag_pads.cpp
pcbnew/move-drag_pads.cpp
+4
-4
muonde.cpp
pcbnew/muonde.cpp
+4
-4
pcbcfg.h
pcbnew/pcbcfg.h
+1
-1
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+4
-4
plotgerb.cpp
pcbnew/plotgerb.cpp
+7
-7
plothpgl.cpp
pcbnew/plothpgl.cpp
+5
-5
plotps.cpp
pcbnew/plotps.cpp
+5
-5
protos.h
pcbnew/protos.h
+1
-1
router.cpp
pcbnew/router.cpp
+9
-9
sel_layer.cpp
pcbnew/sel_layer.cpp
+1
-1
work.cpp
pcbnew/work.cpp
+3
-3
zone_filling_algorithm.cpp
pcbnew/zone_filling_algorithm.cpp
+1
-1
PolyLine2Kicad.h
polygon/PolyLine2Kicad.h
+3
-11
No files found.
3d-viewer/3d_draw.cpp
View file @
bd5ca82f
...
@@ -495,7 +495,7 @@ int color;
...
@@ -495,7 +495,7 @@ int color;
Both
=
Oncu
&&
Oncmp
;
Both
=
Oncu
&&
Oncmp
;
switch
(
m_PadShape
&
0x7F
)
switch
(
m_PadShape
&
0x7F
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
x
=
xc
*
scale
;
x
=
xc
*
scale
;
y
=
yc
*
scale
;
y
=
yc
*
scale
;
r
=
(
double
)
dx
*
scale
;
r
=
(
double
)
dx
*
scale
;
...
@@ -519,7 +519,7 @@ int color;
...
@@ -519,7 +519,7 @@ int color;
}
}
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
/* calcul de l'entraxe de l'ellipse */
/* calcul de l'entraxe de l'ellipse */
if
(
dx
>
dy
)
/* ellipse horizontale */
if
(
dx
>
dy
)
/* ellipse horizontale */
{
{
...
@@ -563,9 +563,9 @@ int color;
...
@@ -563,9 +563,9 @@ int color;
}
}
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
// case SPECIAL_PAD:
// case SPECIAL_PAD:
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
{
int
ddx
,
ddy
;
int
ddx
,
ddy
;
ddx
=
m_DeltaSize
.
x
>>
1
;
ddx
=
m_DeltaSize
.
x
>>
1
;
...
...
3d-viewer/trackball.cpp
View file @
bd5ca82f
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
PAD_
CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
*
* US Government Users Restricted Rights
* US Government Users Restricted Rights
...
...
3d-viewer/trackball.h
View file @
bd5ca82f
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
PAD_
CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
*
* US Government Users Restricted Rights
* US Government Users Restricted Rights
...
...
change_log.txt
View file @
bd5ca82f
...
@@ -4,6 +4,18 @@ Started 2007-June-11
...
@@ -4,6 +4,18 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2008-Jan-5 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew:
* Added pad_shapes.h and blended it into class_pad.h and PolyLine2Kicad.h.
Renamed the pad shapes in there to avoid namespace conflicts.
RECT became PAD_RECT, CIRCLE became PAD_CIRCLE, etc.
* common.cpp's ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
has commented out code that I tested as part of a possible new scheme to support
custom layer names per project.
* More specctra dsn import export work.
2008-jan-05 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-jan-05 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
================================================================================
+pcbnew:
+pcbnew:
...
...
cvpcb/listlib.cpp
View file @
bd5ca82f
...
@@ -34,7 +34,7 @@ Module descr format:
...
@@ -34,7 +34,7 @@ Module descr format:
$MODULE c64acmd
$MODULE c64acmd
Li c64acmd
Li c64acmd
Cd Connecteur DIN Europe 96 Contacts AC male droit
Cd Connecteur DIN Europe 96 Contacts AC male droit
Kw CONN DIN
Kw
PAD_
CONN DIN
$EndMODULE
$EndMODULE
*/
*/
...
...
eeschema/netform.cpp
View file @
bd5ca82f
...
@@ -184,7 +184,7 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
...
@@ -184,7 +184,7 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
int
netcode
=
Pin
->
GetNet
();
int
netcode
=
Pin
->
GetNet
();
wxString
NetName
;
wxString
NetName
;
if
(
(
netcode
==
0
)
||
(
Pin
->
m_FlagOfConnection
!=
CONNECT
)
)
if
(
(
netcode
==
0
)
||
(
Pin
->
m_FlagOfConnection
!=
PAD_
CONNECT
)
)
{
{
return
NetName
;
return
NetName
;
}
}
...
...
eeschema/netlist.cpp
View file @
bd5ca82f
...
@@ -1166,7 +1166,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
...
@@ -1166,7 +1166,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
for
(
;
NetItemRef
<
Lim
;
NetItemRef
++
)
for
(
;
NetItemRef
<
Lim
;
NetItemRef
++
)
{
{
if
(
NetItemRef
->
m_Type
==
NET_NOCONNECT
)
if
(
NetItemRef
->
m_Type
==
NET_NOCONNECT
)
if
(
StateFlag
!=
CONNECT
)
if
(
StateFlag
!=
PAD_
CONNECT
)
StateFlag
=
NOCONNECT
;
StateFlag
=
NOCONNECT
;
/* Analyse du net en cours */
/* Analyse du net en cours */
...
@@ -1214,11 +1214,11 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
...
@@ -1214,11 +1214,11 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
case
NET_PIN
:
case
NET_PIN
:
if
(
NetItemRef
->
m_Type
==
NET_PIN
)
if
(
NetItemRef
->
m_Type
==
NET_PIN
)
StateFlag
=
CONNECT
;
StateFlag
=
PAD_
CONNECT
;
break
;
break
;
case
NET_NOCONNECT
:
case
NET_NOCONNECT
:
if
(
StateFlag
!=
CONNECT
)
if
(
StateFlag
!=
PAD_
CONNECT
)
StateFlag
=
NOCONNECT
;
StateFlag
=
NOCONNECT
;
break
;
break
;
}
}
...
...
eeschema/netlist.h
View file @
bd5ca82f
...
@@ -52,7 +52,7 @@ enum NetObjetType { /* Type des objets de Net */
...
@@ -52,7 +52,7 @@ enum NetObjetType { /* Type des objets de Net */
enum
IsConnectType
{
/* Valeur du Flag de connection */
enum
IsConnectType
{
/* Valeur du Flag de connection */
UNCONNECT
,
/* Pin ou Label non connecte */
UNCONNECT
,
/* Pin ou Label non connecte */
NOCONNECT
,
/* Pin volontairement non connectee (Symb. NoConnect utilise) */
NOCONNECT
,
/* Pin volontairement non connectee (Symb. NoConnect utilise) */
CONNECT
/* connexion normale */
PAD_
CONNECT
/* connexion normale */
};
};
...
...
eeschema/symbdraw.cpp
View file @
bd5ca82f
...
@@ -176,8 +176,8 @@ LibEDA_BaseStruct* WinEDA_LibeditFrame::CreateGraphicItem( wxDC* DC )
...
@@ -176,8 +176,8 @@ LibEDA_BaseStruct* WinEDA_LibeditFrame::CreateGraphicItem( wxDC* DC )
/* Routine de creation d'un nouvel element type LibraryDrawStruct
/* Routine de creation d'un nouvel element type LibraryDrawStruct
* POLYLINE
* POLYLINE
* ARC
* ARC
* CIRCLE
*
PAD_
CIRCLE
* RECTANGLE
*
PAD_
RECTANGLE
*/
*/
{
{
int
DrawType
;
int
DrawType
;
...
...
gerbview/rs274d.cpp
View file @
bd5ca82f
...
@@ -147,7 +147,7 @@ static void Append_1_Flash_GERBER( int Dcode_index,
...
@@ -147,7 +147,7 @@ static void Append_1_Flash_GERBER( int Dcode_index,
NEGATE
(
track
->
m_End
.
y
);
NEGATE
(
track
->
m_End
.
y
);
track
->
SetNet
(
Dcode_index
);
track
->
SetNet
(
Dcode_index
);
if
(
forme
==
OVALE
)
if
(
forme
==
PAD_OVAL
)
track
->
m_Shape
=
S_SPOT_OVALE
;
track
->
m_Shape
=
S_SPOT_OVALE
;
else
else
track
->
m_Shape
=
S_SPOT_RECT
;
// donc rectangle ou carr
track
->
m_Shape
=
S_SPOT_RECT
;
// donc rectangle ou carr
...
@@ -840,14 +840,14 @@ bool GERBER_Descr::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
...
@@ -840,14 +840,14 @@ bool GERBER_Descr::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
Append_1_Flash_GERBER
(
dcode
,
Append_1_Flash_GERBER
(
dcode
,
frame
,
DC
,
m_CurrentPos
,
frame
,
DC
,
m_CurrentPos
,
size
,
size
,
OVALE
);
PAD_OVAL
);
break
;
break
;
case
GERB_RECT
:
case
GERB_RECT
:
Append_1_Flash_GERBER
(
dcode
,
Append_1_Flash_GERBER
(
dcode
,
frame
,
DC
,
m_CurrentPos
,
frame
,
DC
,
m_CurrentPos
,
size
,
size
,
RECT
);
PAD_
RECT
);
break
;
break
;
default
:
// Special (Macro) : Non implant
default
:
// Special (Macro) : Non implant
...
...
pcbnew/class_pad.cpp
View file @
bd5ca82f
...
@@ -32,7 +32,7 @@ D_PAD::D_PAD( MODULE* parent ) :
...
@@ -32,7 +32,7 @@ D_PAD::D_PAD( MODULE* parent ) :
m_NumPadName
=
0
;
m_NumPadName
=
0
;
m_Masque_Layer
=
CUIVRE_LAYER
;
m_Masque_Layer
=
CUIVRE_LAYER
;
SetNet
(
0
);
/* Numero de net pour comparaisons rapides */
SetNet
(
0
);
/* Numero de net pour comparaisons rapides */
m_DrillShape
=
CIRCLE
;
// Drill shape = circle
m_DrillShape
=
PAD_
CIRCLE
;
// Drill shape = circle
m_Size
.
x
=
m_Size
.
y
=
500
;
m_Size
.
x
=
m_Size
.
y
=
500
;
...
@@ -41,8 +41,8 @@ D_PAD::D_PAD( MODULE* parent ) :
...
@@ -41,8 +41,8 @@ D_PAD::D_PAD( MODULE* parent ) :
m_Pos
=
(
(
MODULE
*
)
m_Parent
)
->
GetPosition
();
m_Pos
=
(
(
MODULE
*
)
m_Parent
)
->
GetPosition
();
}
}
m_PadShape
=
CIRCLE
;
// forme CERCLE, RECT OVALE TRAPEZE
ou libre
m_PadShape
=
PAD_CIRCLE
;
// forme CERCLE, PAD_RECT PAD_OVAL PAD_TRAPEZOID
ou libre
m_Attribut
=
STANDARD
;
// NORMAL, SMD,
CONN, Bit 7 = STACK
m_Attribut
=
PAD_STANDARD
;
// NORMAL, PAD_SMD, PAD_
CONN, Bit 7 = STACK
m_Orient
=
0
;
// en 1/10 degres
m_Orient
=
0
;
// en 1/10 degres
m_logical_connexion
=
0
;
m_logical_connexion
=
0
;
...
@@ -65,16 +65,16 @@ void D_PAD::ComputeRayon()
...
@@ -65,16 +65,16 @@ void D_PAD::ComputeRayon()
{
{
switch
(
m_PadShape
&
0x7F
)
switch
(
m_PadShape
&
0x7F
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
m_Rayon
=
m_Size
.
x
/
2
;
m_Rayon
=
m_Size
.
x
/
2
;
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
m_Rayon
=
MAX
(
m_Size
.
x
,
m_Size
.
y
)
/
2
;
m_Rayon
=
MAX
(
m_Size
.
x
,
m_Size
.
y
)
/
2
;
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
m_Rayon
=
(
int
)
(
sqrt
(
(
double
)
m_Size
.
y
*
m_Size
.
y
m_Rayon
=
(
int
)
(
sqrt
(
(
double
)
m_Size
.
y
*
m_Size
.
y
+
(
double
)
m_Size
.
x
*
m_Size
.
x
)
/
2
);
+
(
double
)
m_Size
.
x
*
m_Size
.
x
)
/
2
);
break
;
break
;
...
@@ -178,8 +178,8 @@ void D_PAD::Copy( D_PAD* source )
...
@@ -178,8 +178,8 @@ void D_PAD::Copy( D_PAD* source )
m_Pos0
=
source
->
m_Pos0
;
// Coord relatives a l'ancre du pad en
m_Pos0
=
source
->
m_Pos0
;
// Coord relatives a l'ancre du pad en
// orientation 0
// orientation 0
m_Rayon
=
source
->
m_Rayon
;
// rayon du cercle exinscrit du pad
m_Rayon
=
source
->
m_Rayon
;
// rayon du cercle exinscrit du pad
m_PadShape
=
source
->
m_PadShape
;
// forme CERCLE,
RECT OVALE TRAPEZE
ou libre
m_PadShape
=
source
->
m_PadShape
;
// forme CERCLE,
PAD_RECT PAD_OVAL PAD_TRAPEZOID
ou libre
m_Attribut
=
source
->
m_Attribut
;
// NORMAL,
SMD,
CONN, Bit 7 = STACK
m_Attribut
=
source
->
m_Attribut
;
// NORMAL,
PAD_SMD, PAD_
CONN, Bit 7 = STACK
m_Orient
=
source
->
m_Orient
;
// en 1/10 degres
m_Orient
=
source
->
m_Orient
;
// en 1/10 degres
m_logical_connexion
=
0
;
// variable utilisee lors du calcul du chevelu
m_logical_connexion
=
0
;
// variable utilisee lors du calcul du chevelu
...
@@ -332,8 +332,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -332,8 +332,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
//-----<test this>-----
//-----<test this>-----
// if SMD pad and high contrast mode
// if
PAD_
SMD pad and high contrast mode
if
(
m_Attribut
==
SMD
&&
DisplayOpt
.
ContrastModeDisplay
)
if
(
m_Attribut
==
PAD_
SMD
&&
DisplayOpt
.
ContrastModeDisplay
)
{
{
// when routing tracks
// when routing tracks
if
(
frame
&&
frame
->
m_ID_current_state
==
ID_TRACK_BUTT
)
if
(
frame
&&
frame
->
m_ID_current_state
==
ID_TRACK_BUTT
)
...
@@ -355,7 +355,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -355,7 +355,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
}
// else routing between an internal signal layer and some other layer.
// else routing between an internal signal layer and some other layer.
// grey out all SMD pads not on current or the single selected
// grey out all
PAD_
SMD pads not on current or the single selected
// external layer.
// external layer.
else
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
else
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
&&
!
IsOnLayer
(
routeTop
)
&&
!
IsOnLayer
(
routeTop
)
...
@@ -366,7 +366,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -366,7 +366,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
}
}
}
// when not edting tracks, show SMD components not on active layer as greyed out
// when not edting tracks, show
PAD_
SMD components not on active layer as greyed out
else
else
{
{
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
)
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
)
...
@@ -412,7 +412,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -412,7 +412,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
switch
(
m_PadShape
&
0x7F
)
switch
(
m_PadShape
&
0x7F
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
if
(
fillpad
)
if
(
fillpad
)
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
xc
,
yc
,
dx
,
0
,
color
,
color
);
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
xc
,
yc
,
dx
,
0
,
color
,
color
);
else
else
...
@@ -430,7 +430,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -430,7 +430,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
}
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
/* calcul de l'entraxe de l'ellipse */
/* calcul de l'entraxe de l'ellipse */
if
(
dx
>
dy
)
/* ellipse horizontale */
if
(
dx
>
dy
)
/* ellipse horizontale */
{
{
...
@@ -469,8 +469,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -469,8 +469,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
}
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
{
int
ddx
,
ddy
;
int
ddx
,
ddy
;
ddx
=
m_DeltaSize
.
x
>>
1
;
ddx
=
m_DeltaSize
.
x
>>
1
;
...
@@ -545,12 +545,12 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -545,12 +545,12 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
switch
(
m_DrillShape
)
switch
(
m_DrillShape
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
if
(
(
hole
/
zoom
)
>
1
)
/* draw hole if its size is enought */
if
(
(
hole
/
zoom
)
>
1
)
/* draw hole if its size is enought */
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
cx0
,
cy0
,
hole
,
0
,
color
,
color
);
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
cx0
,
cy0
,
hole
,
0
,
color
,
color
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
dx
=
m_Drill
.
x
>>
1
;
dx
=
m_Drill
.
x
>>
1
;
dy
=
m_Drill
.
y
>>
1
;
/* demi dim dx et dy */
dy
=
m_Drill
.
y
>>
1
;
/* demi dim dx et dy */
...
@@ -683,21 +683,21 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
...
@@ -683,21 +683,21 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
ll
=
0xFF
&
BufCar
[
0
];
ll
=
0xFF
&
BufCar
[
0
];
/* Mise a jour de la forme */
/* Mise a jour de la forme */
m_PadShape
=
CIRCLE
;
m_PadShape
=
PAD_
CIRCLE
;
switch
(
ll
)
switch
(
ll
)
{
{
case
'C'
:
case
'C'
:
m_PadShape
=
CIRCLE
;
break
;
m_PadShape
=
PAD_
CIRCLE
;
break
;
case
'R'
:
case
'R'
:
m_PadShape
=
RECT
;
break
;
m_PadShape
=
PAD_
RECT
;
break
;
case
'O'
:
case
'O'
:
m_PadShape
=
OVALE
;
break
;
m_PadShape
=
PAD_OVAL
;
break
;
case
'T'
:
case
'T'
:
m_PadShape
=
TRAPEZE
;
break
;
m_PadShape
=
PAD_TRAPEZOID
;
break
;
}
}
ComputeRayon
();
ComputeRayon
();
...
@@ -708,14 +708,14 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
...
@@ -708,14 +708,14 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
nn
=
sscanf
(
PtLine
,
"%d %d %d %s %d %d"
,
&
m_Drill
.
x
,
nn
=
sscanf
(
PtLine
,
"%d %d %d %s %d %d"
,
&
m_Drill
.
x
,
&
m_Offset
.
x
,
&
m_Offset
.
y
,
BufCar
,
&
dx
,
&
dy
);
&
m_Offset
.
x
,
&
m_Offset
.
y
,
BufCar
,
&
dx
,
&
dy
);
m_Drill
.
y
=
m_Drill
.
x
;
m_Drill
.
y
=
m_Drill
.
x
;
m_DrillShape
=
CIRCLE
;
m_DrillShape
=
PAD_
CIRCLE
;
if
(
nn
>=
6
)
// Drill shape = OVAL ?
if
(
nn
>=
6
)
// Drill shape = OVAL ?
{
{
if
(
BufCar
[
0
]
==
'O'
)
if
(
BufCar
[
0
]
==
'O'
)
{
{
m_Drill
.
x
=
dx
;
m_Drill
.
y
=
dy
;
m_Drill
.
x
=
dx
;
m_Drill
.
y
=
dy
;
m_DrillShape
=
OVALE
;
m_DrillShape
=
PAD_OVAL
;
}
}
}
}
break
;
break
;
...
@@ -727,15 +727,15 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
...
@@ -727,15 +727,15 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
/* Contenu de BufCar non encore utilise ( reserve pour evolutions
/* Contenu de BufCar non encore utilise ( reserve pour evolutions
* ulterieures */
* ulterieures */
/* Mise a jour de l'attribut */
/* Mise a jour de l'attribut */
m_Attribut
=
STANDARD
;
m_Attribut
=
PAD_
STANDARD
;
if
(
strncmp
(
BufLine
,
"SMD"
,
3
)
==
0
)
if
(
strncmp
(
BufLine
,
"SMD"
,
3
)
==
0
)
m_Attribut
=
SMD
;
m_Attribut
=
PAD_
SMD
;
if
(
strncmp
(
BufLine
,
"CONN"
,
4
)
==
0
)
if
(
strncmp
(
BufLine
,
"CONN"
,
4
)
==
0
)
m_Attribut
=
CONN
;
m_Attribut
=
PAD_
CONN
;
if
(
strncmp
(
BufLine
,
"HOLE"
,
4
)
==
0
)
if
(
strncmp
(
BufLine
,
"HOLE"
,
4
)
==
0
)
m_Attribut
=
P_HOLE
;
m_Attribut
=
P
AD_P
_HOLE
;
if
(
strncmp
(
BufLine
,
"MECA"
,
4
)
==
0
)
if
(
strncmp
(
BufLine
,
"MECA"
,
4
)
==
0
)
m_Attribut
=
MECA
;
m_Attribut
=
PAD_
MECA
;
break
;
break
;
case
'N'
:
/* Lecture du netname */
case
'N'
:
/* Lecture du netname */
...
@@ -784,16 +784,16 @@ int D_PAD::WriteDescr( FILE* File )
...
@@ -784,16 +784,16 @@ int D_PAD::WriteDescr( FILE* File )
switch( m_PadShape )
switch( m_PadShape )
{
{
case CIRCLE:
case
PAD_
CIRCLE:
cshape = 'C'; break;
cshape = 'C'; break;
case RECT:
case
PAD_
RECT:
cshape = 'R'; break;
cshape = 'R'; break;
case
OVALE
:
case
PAD_OVAL
:
cshape = 'O'; break;
cshape = 'O'; break;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
cshape = 'T'; break;
cshape = 'T'; break;
default:
default:
...
@@ -807,7 +807,7 @@ int D_PAD::WriteDescr( FILE* File )
...
@@ -807,7 +807,7 @@ int D_PAD::WriteDescr( FILE* File )
m_DeltaSize.x, m_DeltaSize.y, m_Orient );
m_DeltaSize.x, m_DeltaSize.y, m_Orient );
NbLigne++;
NbLigne++;
fprintf( File, "Dr %d %d %d", m_Drill.x, m_Offset.x, m_Offset.y );
fprintf( File, "Dr %d %d %d", m_Drill.x, m_Offset.x, m_Offset.y );
if( m_DrillShape ==
OVALE
)
if( m_DrillShape ==
PAD_OVAL
)
{
{
fprintf( File, " %c %d %d", 'O', m_Drill.x, m_Drill.y );
fprintf( File, " %c %d %d", 'O', m_Drill.x, m_Drill.y );
}
}
...
@@ -817,16 +817,16 @@ int D_PAD::WriteDescr( FILE* File )
...
@@ -817,16 +817,16 @@ int D_PAD::WriteDescr( FILE* File )
switch( m_Attribut )
switch( m_Attribut )
{
{
case STANDARD:
case
PAD_
STANDARD:
texttype = "STD"; break;
texttype = "STD"; break;
case SMD:
case
PAD_
SMD:
texttype = "SMD"; break;
texttype = "SMD"; break;
case CONN:
case
PAD_
CONN:
texttype = "CONN"; break;
texttype = "CONN"; break;
case P_HOLE:
case P
AD_P
_HOLE:
texttype = "HOLE"; break;
texttype = "HOLE"; break;
case MECA:
case MECA:
...
@@ -870,16 +870,16 @@ bool D_PAD::Save( FILE* aFile ) const
...
@@ -870,16 +870,16 @@ bool D_PAD::Save( FILE* aFile ) const
switch
(
m_PadShape
)
switch
(
m_PadShape
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
cshape
=
'C'
;
break
;
cshape
=
'C'
;
break
;
case
RECT
:
case
PAD_
RECT
:
cshape
=
'R'
;
break
;
cshape
=
'R'
;
break
;
case
OVALE
:
case
PAD_OVAL
:
cshape
=
'O'
;
break
;
cshape
=
'O'
;
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
cshape
=
'T'
;
break
;
cshape
=
'T'
;
break
;
default
:
default
:
...
@@ -893,7 +893,7 @@ bool D_PAD::Save( FILE* aFile ) const
...
@@ -893,7 +893,7 @@ bool D_PAD::Save( FILE* aFile ) const
m_DeltaSize
.
x
,
m_DeltaSize
.
y
,
m_Orient
);
m_DeltaSize
.
x
,
m_DeltaSize
.
y
,
m_Orient
);
fprintf
(
aFile
,
"Dr %d %d %d"
,
m_Drill
.
x
,
m_Offset
.
x
,
m_Offset
.
y
);
fprintf
(
aFile
,
"Dr %d %d %d"
,
m_Drill
.
x
,
m_Offset
.
x
,
m_Offset
.
y
);
if
(
m_DrillShape
==
OVALE
)
if
(
m_DrillShape
==
PAD_OVAL
)
{
{
fprintf
(
aFile
,
" %c %d %d"
,
'O'
,
m_Drill
.
x
,
m_Drill
.
y
);
fprintf
(
aFile
,
" %c %d %d"
,
'O'
,
m_Drill
.
x
,
m_Drill
.
y
);
}
}
...
@@ -901,19 +901,19 @@ bool D_PAD::Save( FILE* aFile ) const
...
@@ -901,19 +901,19 @@ bool D_PAD::Save( FILE* aFile ) const
switch
(
m_Attribut
)
switch
(
m_Attribut
)
{
{
case
STANDARD
:
case
PAD_
STANDARD
:
texttype
=
"STD"
;
break
;
texttype
=
"STD"
;
break
;
case
SMD
:
case
PAD_
SMD
:
texttype
=
"SMD"
;
break
;
texttype
=
"SMD"
;
break
;
case
CONN
:
case
PAD_
CONN
:
texttype
=
"CONN"
;
break
;
texttype
=
"CONN"
;
break
;
case
P_HOLE
:
case
P
AD_P
_HOLE
:
texttype
=
"HOLE"
;
break
;
texttype
=
"HOLE"
;
break
;
case
MECA
:
case
PAD_
MECA
:
texttype
=
"MECA"
;
break
;
texttype
=
"MECA"
;
break
;
default
:
default
:
...
@@ -1080,7 +1080,7 @@ void D_PAD::Display_Infos( WinEDA_DrawFrame* frame )
...
@@ -1080,7 +1080,7 @@ void D_PAD::Display_Infos( WinEDA_DrawFrame* frame )
pos
+=
7
;
pos
+=
7
;
valeur_param
(
(
unsigned
)
m_Drill
.
x
,
Line
);
valeur_param
(
(
unsigned
)
m_Drill
.
x
,
Line
);
if
(
m_DrillShape
==
CIRCLE
)
if
(
m_DrillShape
==
PAD_
CIRCLE
)
{
{
Affiche_1_Parametre
(
frame
,
pos
,
_
(
"Drill"
),
Line
,
RED
);
Affiche_1_Parametre
(
frame
,
pos
,
_
(
"Drill"
),
Line
,
RED
);
}
}
...
@@ -1149,7 +1149,7 @@ bool D_PAD::HitTest( const wxPoint& ref_pos )
...
@@ -1149,7 +1149,7 @@ bool D_PAD::HitTest( const wxPoint& ref_pos )
/* localisation ? */
/* localisation ? */
switch
(
m_PadShape
&
0x7F
)
switch
(
m_PadShape
&
0x7F
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
dist
=
hypot
(
deltaX
,
deltaY
);
dist
=
hypot
(
deltaX
,
deltaY
);
if
(
(
int
)
(
round
(
dist
)
)
<=
dx
)
if
(
(
int
)
(
round
(
dist
)
)
<=
dx
)
return
true
;
return
true
;
...
...
pcbnew/class_pad.h
View file @
bd5ca82f
...
@@ -4,19 +4,8 @@
...
@@ -4,19 +4,8 @@
class
Pcb3D_GLCanvas
;
class
Pcb3D_GLCanvas
;
/* Pad shape id : ( .m_PadShape member) */
#include "pad_shapes.h"
#define CIRCLE 1
#define RECT 2
#define OVALE 3
#define TRAPEZE 4 // trapezoid
/* PADS attributes */
#define STANDARD 0 // Usual pad
#define SMD 1 // Smd pad, appears on the layer paste (default)
#define CONN 2 // Like smd, does not appear on the layer paste (default)
// reserved, but not yet really used:
#define P_HOLE 3 // trou simple, utile sur pad stack
#define MECA 4 // PAD "mecanique" (fixation, zone cuivre...)
/* Definition type Structure d'un pad */
/* Definition type Structure d'un pad */
class
D_PAD
:
public
BOARD_ITEM
class
D_PAD
:
public
BOARD_ITEM
...
@@ -42,11 +31,11 @@ public:
...
@@ -42,11 +31,11 @@ public:
// 2..14 = internal layers
// 2..14 = internal layers
// 16 .. 31 = technical layers
// 16 .. 31 = technical layers
int
m_PadShape
;
// Shape:
CIRCLE,
RECT, OVAL, TRAPEZOID
int
m_PadShape
;
// Shape:
PAD_CIRCLE, PAD_
RECT, OVAL, TRAPEZOID
int
m_DrillShape
;
// Shape CIRCLE, OVAL
int
m_DrillShape
;
// Shape
PAD_
CIRCLE, OVAL
wxSize
m_Drill
;
// Drill diam (drill shape = CIRCLE) or drill size(shape = OVAL)
wxSize
m_Drill
;
// Drill diam (drill shape =
PAD_
CIRCLE) or drill size(shape = OVAL)
// for drill shape = CIRCLE, drill diam = m_Drill.x
// for drill shape =
PAD_
CIRCLE, drill diam = m_Drill.x
wxSize
m_Offset
;
// Offset de la forme (pastilles excentrees)
wxSize
m_Offset
;
// Offset de la forme (pastilles excentrees)
wxSize
m_Size
;
// X and Y size ( relative to orient 0)
wxSize
m_Size
;
// X and Y size ( relative to orient 0)
...
@@ -56,7 +45,7 @@ public:
...
@@ -56,7 +45,7 @@ public:
wxPoint
m_Pos0
;
// Initial Pad position (i.e. pas position relative to the module anchor, orientation 0
wxPoint
m_Pos0
;
// Initial Pad position (i.e. pas position relative to the module anchor, orientation 0
int
m_Rayon
;
// rayon du cercle exinscrit du pad
int
m_Rayon
;
// rayon du cercle exinscrit du pad
int
m_Attribut
;
// NORMAL,
SMD,
CONN
int
m_Attribut
;
// NORMAL,
PAD_SMD, PAD_
CONN
int
m_Orient
;
// in 1/10 degrees
int
m_Orient
;
// in 1/10 degrees
int
m_logical_connexion
;
// variable used in rastnest computations
int
m_logical_connexion
;
// variable used in rastnest computations
...
...
pcbnew/clean.cpp
View file @
bd5ca82f
...
@@ -128,13 +128,15 @@ void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC )
...
@@ -128,13 +128,15 @@ void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC )
but is not on the pad or the via center */
but is not on the pad or the via center */
if
(
s_ConnectToPads
)
if
(
s_ConnectToPads
)
{
{
/* Create missing segments when a track end covers a pad, but is not on the pad center */
if
(
s_ConnectToPads
)
/* Create missing segments when a track end covers a pad, but is not on the pad center */
if
(
s_ConnectToPads
)
ConnectDanglingEndToPad
(
frame
,
DC
);
ConnectDanglingEndToPad
(
frame
,
DC
);
// creation of points of connections at the intersection of tracks
// creation of points of connections at the intersection of tracks
// Gen_Raccord_Track(frame, DC);
// Gen_Raccord_Track(frame, DC);
/* Create missing segments when a track end covers a via, but is not on the via center */
if
(
s_ConnectToPads
)
/* Create missing segments when a track end covers a via, but is not on the via center */
if
(
s_ConnectToPads
)
ConnectDanglingEndToVia
(
frame
->
m_Pcb
);
ConnectDanglingEndToVia
(
frame
->
m_Pcb
);
}
}
#endif
#endif
...
...
pcbnew/collectors.cpp
View file @
bd5ca82f
...
@@ -197,7 +197,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
...
@@ -197,7 +197,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
{
{
case
TYPEPAD
:
case
TYPEPAD
:
// if pad is a thru hole, then it can be visible when its parent module is not.
// if pad is a thru hole, then it can be visible when its parent module is not.
if
(
((
D_PAD
*
)
item
)
->
m_Attribut
!=
SMD
)
// a hole is present, so multiple layers
if
(
((
D_PAD
*
)
item
)
->
m_Attribut
!=
PAD_
SMD
)
// a hole is present, so multiple layers
{
{
// there are no pad specific visibility controls at this time.
// there are no pad specific visibility controls at this time.
// proceed to the common tests below, but without the parent module test,
// proceed to the common tests below, but without the parent module test,
...
...
pcbnew/dialog_pad_edit.cpp
View file @
bd5ca82f
...
@@ -368,7 +368,7 @@ void WinEDA_PadPropertiesFrame::OnListboxShapePadSelected( wxCommandEvent& event
...
@@ -368,7 +368,7 @@ void WinEDA_PadPropertiesFrame::OnListboxShapePadSelected( wxCommandEvent& event
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
break
;
break
;
case
2
:
// RECT:
case
2
:
//
PAD_
RECT:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
break
;
break
;
...
...
pcbnew/drc.cpp
View file @
bd5ca82f
...
@@ -845,9 +845,9 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
...
@@ -845,9 +845,9 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
bool
swap_pads
;
bool
swap_pads
;
swap_pads
=
false
;
swap_pads
=
false
;
if
(
(
aRefPad
->
m_PadShape
!=
CIRCLE
)
&&
(
aPad
->
m_PadShape
==
CIRCLE
)
)
if
(
(
aRefPad
->
m_PadShape
!=
PAD_CIRCLE
)
&&
(
aPad
->
m_PadShape
==
PAD_
CIRCLE
)
)
swap_pads
=
true
;
swap_pads
=
true
;
else
if
(
(
aRefPad
->
m_PadShape
!=
OVALE
)
&&
(
aPad
->
m_PadShape
==
OVALE
)
)
else
if
(
(
aRefPad
->
m_PadShape
!=
PAD_OVAL
)
&&
(
aPad
->
m_PadShape
==
PAD_OVAL
)
)
swap_pads
=
true
;
swap_pads
=
true
;
if
(
swap_pads
)
if
(
swap_pads
)
...
@@ -859,7 +859,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
...
@@ -859,7 +859,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
switch
(
aRefPad
->
m_PadShape
)
switch
(
aRefPad
->
m_PadShape
)
{
{
case
CIRCLE
:
// aRefPad is like a track segment with a null lenght
case
PAD_
CIRCLE
:
// aRefPad is like a track segment with a null lenght
m_segmLength
=
0
;
m_segmLength
=
0
;
m_segmAngle
=
0
;
m_segmAngle
=
0
;
...
@@ -871,11 +871,11 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
...
@@ -871,11 +871,11 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
diag
=
checkClearanceSegmToPad
(
aPad
,
aRefPad
->
m_Rayon
,
dist_min
);
diag
=
checkClearanceSegmToPad
(
aPad
,
aRefPad
->
m_Rayon
,
dist_min
);
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
RotatePoint
(
&
rel_pos
.
x
,
&
rel_pos
.
y
,
aRefPad
->
m_Orient
);
RotatePoint
(
&
rel_pos
.
x
,
&
rel_pos
.
y
,
aRefPad
->
m_Orient
);
pad_angle
=
aRefPad
->
m_Orient
+
aPad
->
m_Orient
;
// pad_angle = pad orient relative to the aRefPad orient
pad_angle
=
aRefPad
->
m_Orient
+
aPad
->
m_Orient
;
// pad_angle = pad orient relative to the aRefPad orient
NORMALIZE_ANGLE_POS
(
pad_angle
);
NORMALIZE_ANGLE_POS
(
pad_angle
);
if
(
aPad
->
m_PadShape
==
RECT
)
if
(
aPad
->
m_PadShape
==
PAD_
RECT
)
{
{
wxSize
size
=
aPad
->
m_Size
;
wxSize
size
=
aPad
->
m_Size
;
if
(
(
pad_angle
==
0
)
||
(
pad_angle
==
900
)
||
(
pad_angle
==
1800
)
||
if
(
(
pad_angle
==
0
)
||
(
pad_angle
==
900
)
||
(
pad_angle
==
1800
)
||
...
@@ -905,7 +905,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
...
@@ -905,7 +905,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
}
}
break
;
break
;
case
OVALE
:
/* an oval pad is like a track segment */
case
PAD_OVAL
:
/* an oval pad is like a track segment */
{
{
/* Create and test a track segment with same dimensions */
/* Create and test a track segment with same dimensions */
int
segm_width
;
int
segm_width
;
...
@@ -961,7 +961,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
...
@@ -961,7 +961,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
p_dimx
=
pad_to_test
->
m_Size
.
x
>>
1
;
p_dimx
=
pad_to_test
->
m_Size
.
x
>>
1
;
p_dimy
=
pad_to_test
->
m_Size
.
y
>>
1
;
p_dimy
=
pad_to_test
->
m_Size
.
y
>>
1
;
if
(
pad_to_test
->
m_PadShape
==
CIRCLE
)
if
(
pad_to_test
->
m_PadShape
==
PAD_
CIRCLE
)
{
{
/* calcul des coord centre du pad dans le repere axe X confondu
/* calcul des coord centre du pad dans le repere axe X confondu
* avec le segment en tst */
* avec le segment en tst */
...
@@ -996,7 +996,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
...
@@ -996,7 +996,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
default
:
default
:
return
false
;
return
false
;
case
OVALE
:
case
PAD_OVAL
:
/* test de la pastille ovale ramenee au type ovale vertical */
/* test de la pastille ovale ramenee au type ovale vertical */
if
(
p_dimx
>
p_dimy
)
if
(
p_dimx
>
p_dimy
)
{
{
...
@@ -1037,7 +1037,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
...
@@ -1037,7 +1037,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
return
false
;
return
false
;
break
;
break
;
case
RECT
:
/* 2 rectangle + 4 1/4 cercles a tester */
case
PAD_
RECT
:
/* 2 rectangle + 4 1/4 cercles a tester */
/* Test du rectangle dimx + seuil, dimy */
/* Test du rectangle dimx + seuil, dimy */
m_xcliplo
=
m_spotcx
-
p_dimx
-
seuil
;
m_xcliplo
=
m_spotcx
-
p_dimx
-
seuil
;
m_ycliplo
=
m_spotcy
-
p_dimy
;
m_ycliplo
=
m_spotcy
-
p_dimy
;
...
@@ -2219,9 +2219,9 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
...
@@ -2219,9 +2219,9 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
* Selon les formes relatives il peut y avoir ou non erreur */
* Selon les formes relatives il peut y avoir ou non erreur */
bool swap_pads = false;
bool swap_pads = false;
if( (pad_ref->m_PadShape !=
CIRCLE) && (pad->m_PadShape ==
CIRCLE) )
if( (pad_ref->m_PadShape !=
PAD_CIRCLE) && (pad->m_PadShape == PAD_
CIRCLE) )
swap_pads = true;
swap_pads = true;
else if( (pad_ref->m_PadShape !=
OVALE) && (pad->m_PadShape == OVALE
) )
else if( (pad_ref->m_PadShape !=
PAD_OVAL) && (pad->m_PadShape == PAD_OVAL
) )
swap_pads = true;
swap_pads = true;
if( swap_pads )
if( swap_pads )
...
@@ -2233,7 +2233,7 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
...
@@ -2233,7 +2233,7 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
switch( pad_ref->m_PadShape )
switch( pad_ref->m_PadShape )
{
{
case CIRCLE: // pad_ref is like a track segment with a null lenght
case
PAD_
CIRCLE: // pad_ref is like a track segment with a null lenght
segm_long = 0;
segm_long = 0;
segm_angle = 0;
segm_angle = 0;
finx = finy = 0;
finx = finy = 0;
...
@@ -2242,11 +2242,11 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
...
@@ -2242,11 +2242,11 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
diag = TestClearanceSegmToPad( pad, pad_ref->m_Rayon, dist_min );
diag = TestClearanceSegmToPad( pad, pad_ref->m_Rayon, dist_min );
break;
break;
case RECT:
case
PAD_
RECT:
RotatePoint( &rel_pos.x, &rel_pos.y, pad_ref->m_Orient );
RotatePoint( &rel_pos.x, &rel_pos.y, pad_ref->m_Orient );
pad_angle = pad_ref->m_Orient + pad->m_Orient; // pad_angle = pad orient relative to the pad_ref orient
pad_angle = pad_ref->m_Orient + pad->m_Orient; // pad_angle = pad orient relative to the pad_ref orient
NORMALIZE_ANGLE_POS( pad_angle );
NORMALIZE_ANGLE_POS( pad_angle );
if( pad->m_PadShape == RECT )
if( pad->m_PadShape ==
PAD_
RECT )
{
{
wxSize size = pad->m_Size;
wxSize size = pad->m_Size;
if( (pad_angle == 0) || (pad_angle == 900) || (pad_angle == 1800) ||
if( (pad_angle == 0) || (pad_angle == 900) || (pad_angle == 1800) ||
...
@@ -2276,7 +2276,7 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
...
@@ -2276,7 +2276,7 @@ static int Pad_to_Pad_Isol( D_PAD* pad_ref, D_PAD* pad, const int dist_min )
}
}
break;
break;
case
OVALE
: /* an oval pad is like a track segment */
case
PAD_OVAL
: /* an oval pad is like a track segment */
{
{
/* Create and test a track segment with same dimensions */
/* Create and test a track segment with same dimensions */
int segm_width;
int segm_width;
...
@@ -2346,7 +2346,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
...
@@ -2346,7 +2346,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
p_dimx = pad_to_test->m_Size.x >> 1;
p_dimx = pad_to_test->m_Size.x >> 1;
p_dimy = pad_to_test->m_Size.y >> 1;
p_dimy = pad_to_test->m_Size.y >> 1;
if( pad_to_test->m_PadShape == CIRCLE )
if( pad_to_test->m_PadShape ==
PAD_
CIRCLE )
{
{
/* calcul des coord centre du pad dans le repere axe X confondu
/* calcul des coord centre du pad dans le repere axe X confondu
* avec le segment en tst */
* avec le segment en tst */
...
@@ -2383,7 +2383,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
...
@@ -2383,7 +2383,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
default:
default:
return BAD_DRC;
return BAD_DRC;
case
OVALE
:
case
PAD_OVAL
:
/* test de la pastille ovale ramenee au type ovale vertical */
/* test de la pastille ovale ramenee au type ovale vertical */
if( p_dimx > p_dimy )
if( p_dimx > p_dimy )
{
{
...
@@ -2426,7 +2426,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
...
@@ -2426,7 +2426,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
return BAD_DRC;
return BAD_DRC;
break;
break;
case RECT: /* 2 rectangle + 4 1/4 cercles a tester */
case
PAD_
RECT: /* 2 rectangle + 4 1/4 cercles a tester */
/* Test du rectangle dimx + seuil, dimy */
/* Test du rectangle dimx + seuil, dimy */
xcliplo = spot_cX - p_dimx - seuil;
xcliplo = spot_cX - p_dimx - seuil;
ycliplo = spot_cY - p_dimy;
ycliplo = spot_cY - p_dimy;
...
...
pcbnew/editpads.cpp
View file @
bd5ca82f
...
@@ -22,14 +22,14 @@ static wxString Current_PadNetName;
...
@@ -22,14 +22,14 @@ static wxString Current_PadNetName;
#define NBSHAPES 4
#define NBSHAPES 4
int
CodeShape
[
NBSHAPES
]
=
/* forme des pads */
int
CodeShape
[
NBSHAPES
]
=
/* forme des pads */
{
{
CIRCLE
,
OVALE
,
RECT
,
TRAPEZE
PAD_CIRCLE
,
PAD_OVAL
,
PAD_RECT
,
PAD_TRAPEZOID
};
};
#define NBTYPES 5
#define NBTYPES 5
int
CodeType
[
NBTYPES
]
=
int
CodeType
[
NBTYPES
]
=
{
{
STANDARD
,
SMD
,
CONN
,
P_HOLE
,
MECA
PAD_STANDARD
,
PAD_SMD
,
PAD_CONN
,
PAD_P_HOLE
,
PAD_
MECA
};
};
...
@@ -155,25 +155,25 @@ void WinEDA_PadPropertiesFrame::SetOthersControls()
...
@@ -155,25 +155,25 @@ void WinEDA_PadPropertiesFrame::SetOthersControls()
switch
(
tmp
)
switch
(
tmp
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
FALSE
);
m_PadShape
->
SetSelection
(
0
);
m_PadShape
->
SetSelection
(
0
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadShape
->
SetSelection
(
1
);
m_PadShape
->
SetSelection
(
1
);
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadShape
->
SetSelection
(
2
);
m_PadShape
->
SetSelection
(
2
);
break
;
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
m_PadDeltaSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadDeltaSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadShape
->
SetSelection
(
3
);
m_PadShape
->
SetSelection
(
3
);
...
@@ -195,12 +195,12 @@ void WinEDA_PadPropertiesFrame::SetOthersControls()
...
@@ -195,12 +195,12 @@ void WinEDA_PadPropertiesFrame::SetOthersControls()
switch
(
tmp
)
switch
(
tmp
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
m_DrillShapeCtrl
->
SetSelection
(
0
);
m_DrillShapeCtrl
->
SetSelection
(
0
);
m_PadDrillCtrl
->
Enable
(
TRUE
,
FALSE
);
m_PadDrillCtrl
->
Enable
(
TRUE
,
FALSE
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
m_DrillShapeCtrl
->
SetSelection
(
1
);
m_DrillShapeCtrl
->
SetSelection
(
1
);
m_PadDrillCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadDrillCtrl
->
Enable
(
TRUE
,
TRUE
);
break
;
break
;
...
@@ -365,18 +365,18 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -365,18 +365,18 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
g_Pad_Master
.
m_Pos
=
m_PadPositionCtrl
->
GetValue
();
g_Pad_Master
.
m_Pos
=
m_PadPositionCtrl
->
GetValue
();
g_Pad_Master
.
m_Pos0
=
g_Pad_Master
.
m_Pos
;
g_Pad_Master
.
m_Pos0
=
g_Pad_Master
.
m_Pos
;
g_Pad_Master
.
m_Size
=
m_PadSizeCtrl
->
GetValue
();
g_Pad_Master
.
m_Size
=
m_PadSizeCtrl
->
GetValue
();
if
(
g_Pad_Master
.
m_PadShape
==
CIRCLE
)
if
(
g_Pad_Master
.
m_PadShape
==
PAD_
CIRCLE
)
g_Pad_Master
.
m_Size
.
y
=
g_Pad_Master
.
m_Size
.
x
;
g_Pad_Master
.
m_Size
.
y
=
g_Pad_Master
.
m_Size
.
x
;
g_Pad_Master
.
m_DeltaSize
=
m_PadDeltaSizeCtrl
->
GetValue
();
g_Pad_Master
.
m_DeltaSize
=
m_PadDeltaSizeCtrl
->
GetValue
();
g_Pad_Master
.
m_Offset
=
m_PadOffsetCtrl
->
GetValue
();
g_Pad_Master
.
m_Offset
=
m_PadOffsetCtrl
->
GetValue
();
g_Pad_Master
.
m_Drill
=
m_PadDrillCtrl
->
GetValue
();
g_Pad_Master
.
m_Drill
=
m_PadDrillCtrl
->
GetValue
();
if
(
m_DrillShapeCtrl
->
GetSelection
()
==
0
)
if
(
m_DrillShapeCtrl
->
GetSelection
()
==
0
)
{
{
g_Pad_Master
.
m_DrillShape
=
CIRCLE
;
g_Pad_Master
.
m_DrillShape
=
PAD_
CIRCLE
;
g_Pad_Master
.
m_Drill
.
y
=
g_Pad_Master
.
m_Drill
.
x
;
g_Pad_Master
.
m_Drill
.
y
=
g_Pad_Master
.
m_Drill
.
x
;
}
}
else
else
g_Pad_Master
.
m_DrillShape
=
OVALE
;
g_Pad_Master
.
m_DrillShape
=
PAD_OVAL
;
g_Pad_Master
.
m_Orient
=
m_PadOrientCtrl
->
GetValue
();
g_Pad_Master
.
m_Orient
=
m_PadOrientCtrl
->
GetValue
();
g_Current_PadName
=
m_PadNumCtrl
->
GetValue
().
Left
(
4
);
g_Current_PadName
=
m_PadNumCtrl
->
GetValue
().
Left
(
4
);
Current_PadNetName
=
m_PadNetNameCtrl
->
GetValue
();
Current_PadNetName
=
m_PadNetNameCtrl
->
GetValue
();
...
@@ -468,36 +468,36 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -468,36 +468,36 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
switch
(
CurrentPad
->
m_PadShape
)
switch
(
CurrentPad
->
m_PadShape
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
CurrentPad
->
m_Size
.
y
=
CurrentPad
->
m_Size
.
x
;
CurrentPad
->
m_Size
.
y
=
CurrentPad
->
m_Size
.
x
;
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
break
;
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
break
;
break
;
}
}
switch
(
CurrentPad
->
m_Attribut
)
switch
(
CurrentPad
->
m_Attribut
)
{
{
case
STANDARD
:
case
PAD_
STANDARD
:
break
;
break
;
case
CONN
:
case
PAD_
CONN
:
case
SMD
:
case
PAD_
SMD
:
CurrentPad
->
m_Offset
=
wxSize
(
0
,
0
);
CurrentPad
->
m_Offset
=
wxSize
(
0
,
0
);
CurrentPad
->
m_Drill
=
wxSize
(
0
,
0
);
CurrentPad
->
m_Drill
=
wxSize
(
0
,
0
);
break
;
break
;
case
P_HOLE
:
case
P
AD_P
_HOLE
:
case
MECA
:
case
PAD_
MECA
:
break
;
break
;
}
}
...
...
pcbnew/export_gencad.cpp
View file @
bd5ca82f
...
@@ -226,14 +226,14 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
...
@@ -226,14 +226,14 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
switch
(
pad
->
m_PadShape
)
switch
(
pad
->
m_PadShape
)
{
{
default
:
default
:
case
CIRCLE
:
case
PAD_
CIRCLE
:
pad_type
=
"ROUND"
;
pad_type
=
"ROUND"
;
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
fprintf
(
file
,
"CIRCLE %d %d %d
\n
"
,
fprintf
(
file
,
"CIRCLE %d %d %d
\n
"
,
pad
->
m_Offset
.
x
,
-
pad
->
m_Offset
.
y
,
pad
->
m_Size
.
x
/
2
);
pad
->
m_Offset
.
x
,
-
pad
->
m_Offset
.
y
,
pad
->
m_Size
.
x
/
2
);
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
pad_type
=
"RECTANGULAR"
;
pad_type
=
"RECTANGULAR"
;
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
fprintf
(
file
,
"RECTANGLE %d %d %d %d
\n
"
,
fprintf
(
file
,
"RECTANGLE %d %d %d %d
\n
"
,
...
@@ -241,7 +241,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
...
@@ -241,7 +241,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
dx
+
pad
->
m_Offset
.
x
,
-
pad
->
m_Offset
.
y
+
dy
);
dx
+
pad
->
m_Offset
.
x
,
-
pad
->
m_Offset
.
y
+
dy
);
break
;
break
;
case
OVALE
:
/* description du contour par 2 linges et 2 arcs */
case
PAD_OVAL
:
/* description du contour par 2 linges et 2 arcs */
{
{
pad_type
=
"FINGER"
;
pad_type
=
"FINGER"
;
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
...
@@ -288,7 +288,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
...
@@ -288,7 +288,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
break
;
break
;
}
}
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
pad_type
=
"POLYGON"
;
pad_type
=
"POLYGON"
;
break
;
break
;
}
}
...
@@ -803,7 +803,7 @@ void ModuleWriteShape( FILE* file, MODULE* module )
...
@@ -803,7 +803,7 @@ void ModuleWriteShape( FILE* file, MODULE* module )
* shape_descr (line, arc ..):
* shape_descr (line, arc ..):
* LINE startX startY endX endY
* LINE startX startY endX endY
* ARC startX startY endX endY centreX scentreY
* ARC startX startY endX endY centreX scentreY
* CIRCLE centreX scentreY radius
*
PAD_
CIRCLE centreX scentreY radius
*/
*/
{
{
EDGE_MODULE
*
PtEdge
;
EDGE_MODULE
*
PtEdge
;
...
@@ -819,7 +819,7 @@ void ModuleWriteShape( FILE* file, MODULE* module )
...
@@ -819,7 +819,7 @@ void ModuleWriteShape( FILE* file, MODULE* module )
{
{
fprintf
(
file
,
"ATTRIBUTE"
);
fprintf
(
file
,
"ATTRIBUTE"
);
if
(
module
->
m_Attributs
&
MOD_CMS
)
if
(
module
->
m_Attributs
&
MOD_CMS
)
fprintf
(
file
,
" SMD"
);
fprintf
(
file
,
"
PAD_
SMD"
);
if
(
module
->
m_Attributs
&
MOD_VIRTUAL
)
if
(
module
->
m_Attributs
&
MOD_VIRTUAL
)
fprintf
(
file
,
" VIRTUAL"
);
fprintf
(
file
,
" VIRTUAL"
);
fprintf
(
file
,
"
\n
"
);
fprintf
(
file
,
"
\n
"
);
...
...
pcbnew/gen_self.h
View file @
bd5ca82f
...
@@ -433,8 +433,8 @@ MODULE* WinEDA_PcbFrame::Genere_Self( wxDC* DC )
...
@@ -433,8 +433,8 @@ MODULE* WinEDA_PcbFrame::Genere_Self( wxDC* DC )
PtPad
->
m_Pos0
.
y
=
PtPad
->
m_Pos
.
y
-
Module
->
m_Pos
.
y
;
PtPad
->
m_Pos0
.
y
=
PtPad
->
m_Pos
.
y
-
Module
->
m_Pos
.
y
;
PtPad
->
m_Size
.
x
=
PtPad
->
m_Size
.
y
=
LastSegm
->
m_Width
;
PtPad
->
m_Size
.
x
=
PtPad
->
m_Size
.
y
=
LastSegm
->
m_Width
;
PtPad
->
m_Masque_Layer
=
g_TabOneLayerMask
[
LastSegm
->
GetLayer
()];
PtPad
->
m_Masque_Layer
=
g_TabOneLayerMask
[
LastSegm
->
GetLayer
()];
PtPad
->
m_Attribut
=
SMD
;
PtPad
->
m_Attribut
=
PAD_
SMD
;
PtPad
->
m_PadShape
=
CIRCLE
;
PtPad
->
m_PadShape
=
PAD_
CIRCLE
;
PtPad
->
m_Rayon
=
PtPad
->
m_Size
.
x
/
2
;
PtPad
->
m_Rayon
=
PtPad
->
m_Size
.
x
/
2
;
D_PAD
*
newpad
=
new
D_PAD
(
Module
);
D_PAD
*
newpad
=
new
D_PAD
(
Module
);
...
...
pcbnew/gendrill.cpp
View file @
bd5ca82f
...
@@ -539,7 +539,7 @@ int WinEDA_DrillFrame::Gen_Drill_File_EXCELLON( FORET* buffer )
...
@@ -539,7 +539,7 @@ int WinEDA_DrillFrame::Gen_Drill_File_EXCELLON( FORET* buffer )
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
{
{
if
(
pt_pad
->
m_DrillShape
!=
CIRCLE
)
if
(
pt_pad
->
m_DrillShape
!=
PAD_
CIRCLE
)
continue
;
continue
;
diam
=
pt_pad
->
m_Drill
.
x
;
diam
=
pt_pad
->
m_Drill
.
x
;
if
(
diam
==
0
)
if
(
diam
==
0
)
...
@@ -579,7 +579,7 @@ int WinEDA_DrillFrame::Gen_Drill_File_EXCELLON( FORET* buffer )
...
@@ -579,7 +579,7 @@ int WinEDA_DrillFrame::Gen_Drill_File_EXCELLON( FORET* buffer )
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
{
{
if
(
pt_pad
->
m_DrillShape
!=
OVALE
)
if
(
pt_pad
->
m_DrillShape
!=
PAD_OVAL
)
continue
;
continue
;
diam
=
MIN
(
pt_pad
->
m_Drill
.
x
,
pt_pad
->
m_Drill
.
y
);
diam
=
MIN
(
pt_pad
->
m_Drill
.
x
,
pt_pad
->
m_Drill
.
y
);
...
@@ -807,7 +807,7 @@ int WinEDA_DrillFrame::Gen_Liste_Forets( FORET* buffer, bool print_header )
...
@@ -807,7 +807,7 @@ int WinEDA_DrillFrame::Gen_Liste_Forets( FORET* buffer, bool print_header )
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
(
D_PAD
*
)
pt_pad
->
Pnext
)
{
{
if
(
pt_pad
->
m_DrillShape
==
CIRCLE
)
if
(
pt_pad
->
m_DrillShape
==
PAD_
CIRCLE
)
diam
=
pt_pad
->
m_Drill
.
x
;
diam
=
pt_pad
->
m_Drill
.
x
;
else
else
diam
=
MIN
(
pt_pad
->
m_Drill
.
x
,
pt_pad
->
m_Drill
.
y
);
diam
=
MIN
(
pt_pad
->
m_Drill
.
x
,
pt_pad
->
m_Drill
.
y
);
...
@@ -819,7 +819,7 @@ int WinEDA_DrillFrame::Gen_Liste_Forets( FORET* buffer, bool print_header )
...
@@ -819,7 +819,7 @@ int WinEDA_DrillFrame::Gen_Liste_Forets( FORET* buffer, bool print_header )
if
(
foret
)
if
(
foret
)
{
{
foret
->
m_TotalCount
++
;
foret
->
m_TotalCount
++
;
if
(
pt_pad
->
m_DrillShape
==
OVALE
)
if
(
pt_pad
->
m_DrillShape
==
PAD_OVAL
)
foret
->
m_OvalCount
++
;
foret
->
m_OvalCount
++
;
}
}
}
}
...
@@ -1362,15 +1362,15 @@ int WinEDA_DrillFrame::Plot_Drill_PcbMap( FORET* buffer, int format )
...
@@ -1362,15 +1362,15 @@ int WinEDA_DrillFrame::Plot_Drill_PcbMap( FORET* buffer, int format )
{
{
switch
(
pt_pad
->
m_DrillShape
)
switch
(
pt_pad
->
m_DrillShape
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
diam
=
pt_pad
->
m_Drill
.
x
;
diam
=
pt_pad
->
m_Drill
.
x
;
if
(
diam
!=
foret
->
m_Diameter
)
if
(
diam
!=
foret
->
m_Diameter
)
continue
;
continue
;
PlotDrillSymbol
(
pt_pad
->
m_Pos
,
diam
,
shape_id
,
format
);
PlotDrillSymbol
(
pt_pad
->
m_Pos
,
diam
,
shape_id
,
format
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
if
(
pt_pad
->
m_DrillShape
!=
OVALE
)
if
(
pt_pad
->
m_DrillShape
!=
PAD_OVAL
)
continue
;
continue
;
diam
=
MIN
(
pt_pad
->
m_Drill
.
x
,
pt_pad
->
m_Drill
.
y
);
diam
=
MIN
(
pt_pad
->
m_Drill
.
x
,
pt_pad
->
m_Drill
.
y
);
if
(
diam
!=
foret
->
m_Diameter
)
if
(
diam
!=
foret
->
m_Diameter
)
...
...
pcbnew/globaleditpad.cpp
View file @
bd5ca82f
...
@@ -303,18 +303,18 @@ WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
...
@@ -303,18 +303,18 @@ WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
}
}
/* Traitement des cas particuliers : */
/* Traitement des cas particuliers : */
if
(
g_Pad_Master
.
m_PadShape
!=
TRAPEZE
)
if
(
g_Pad_Master
.
m_PadShape
!=
PAD_TRAPEZOID
)
{
{
pt_pad
->
m_DeltaSize
.
x
=
0
;
pt_pad
->
m_DeltaSize
.
x
=
0
;
pt_pad
->
m_DeltaSize
.
y
=
0
;
pt_pad
->
m_DeltaSize
.
y
=
0
;
}
}
if
(
g_Pad_Master
.
m_PadShape
==
CIRCLE
)
if
(
g_Pad_Master
.
m_PadShape
==
PAD_
CIRCLE
)
pt_pad
->
m_Size
.
y
=
pt_pad
->
m_Size
.
x
;
pt_pad
->
m_Size
.
y
=
pt_pad
->
m_Size
.
x
;
switch
(
g_Pad_Master
.
m_Attribut
&
0x7F
)
switch
(
g_Pad_Master
.
m_Attribut
&
0x7F
)
{
{
case
SMD
:
case
PAD_
SMD
:
case
CONN
:
case
PAD_
CONN
:
pt_pad
->
m_Drill
=
wxSize
(
0
,
0
);
pt_pad
->
m_Drill
=
wxSize
(
0
,
0
);
pt_pad
->
m_Offset
.
x
=
0
;
pt_pad
->
m_Offset
.
x
=
0
;
pt_pad
->
m_Offset
.
y
=
0
;
pt_pad
->
m_Offset
.
y
=
0
;
...
...
pcbnew/graphpcb.cpp
View file @
bd5ca82f
...
@@ -66,7 +66,7 @@ void Place_1_Pad_Board( BOARD* Pcb, D_PAD* pt_pad, int color, int marge, int op_
...
@@ -66,7 +66,7 @@ void Place_1_Pad_Board( BOARD* Pcb, D_PAD* pt_pad, int color, int marge, int op_
dx
=
pt_pad
->
m_Size
.
x
/
2
;
dx
+=
marge
;
dx
=
pt_pad
->
m_Size
.
x
/
2
;
dx
+=
marge
;
if
(
pt_pad
->
m_PadShape
==
CIRCLE
)
if
(
pt_pad
->
m_PadShape
==
PAD_
CIRCLE
)
{
{
TraceFilledCercle
(
Pcb
,
shape_pos
.
x
,
shape_pos
.
y
,
dx
,
TraceFilledCercle
(
Pcb
,
shape_pos
.
x
,
shape_pos
.
y
,
dx
,
pt_pad
->
m_Masque_Layer
,
color
,
op_logique
);
pt_pad
->
m_Masque_Layer
,
color
,
op_logique
);
...
@@ -76,7 +76,7 @@ void Place_1_Pad_Board( BOARD* Pcb, D_PAD* pt_pad, int color, int marge, int op_
...
@@ -76,7 +76,7 @@ void Place_1_Pad_Board( BOARD* Pcb, D_PAD* pt_pad, int color, int marge, int op_
dy
=
pt_pad
->
m_Size
.
y
/
2
;
dy
+=
marge
;
dy
=
pt_pad
->
m_Size
.
y
/
2
;
dy
+=
marge
;
if
(
pt_pad
->
m_PadShape
==
TRAPEZE
)
if
(
pt_pad
->
m_PadShape
==
PAD_TRAPEZOID
)
{
{
dx
+=
abs
(
pt_pad
->
m_DeltaSize
.
y
)
/
2
;
dx
+=
abs
(
pt_pad
->
m_DeltaSize
.
y
)
/
2
;
dy
+=
abs
(
pt_pad
->
m_DeltaSize
.
x
)
/
2
;
dy
+=
abs
(
pt_pad
->
m_DeltaSize
.
x
)
/
2
;
...
...
pcbnew/move-drag_pads.cpp
View file @
bd5ca82f
...
@@ -149,11 +149,11 @@ void WinEDA_BasePcbFrame::Import_Pad_Settings(D_PAD * pt_pad, wxDC * DC)
...
@@ -149,11 +149,11 @@ void WinEDA_BasePcbFrame::Import_Pad_Settings(D_PAD * pt_pad, wxDC * DC)
/* Traitement des cas particuliers : */
/* Traitement des cas particuliers : */
switch
(
g_Pad_Master
.
m_PadShape
)
switch
(
g_Pad_Master
.
m_PadShape
)
{
{
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
pt_pad
->
m_DeltaSize
=
g_Pad_Master
.
m_DeltaSize
;
pt_pad
->
m_DeltaSize
=
g_Pad_Master
.
m_DeltaSize
;
break
;
break
;
case
CIRCLE
:
case
PAD_
CIRCLE
:
pt_pad
->
m_Size
.
y
=
pt_pad
->
m_Size
.
x
;
pt_pad
->
m_Size
.
y
=
pt_pad
->
m_Size
.
x
;
break
;
break
;
...
@@ -161,8 +161,8 @@ void WinEDA_BasePcbFrame::Import_Pad_Settings(D_PAD * pt_pad, wxDC * DC)
...
@@ -161,8 +161,8 @@ void WinEDA_BasePcbFrame::Import_Pad_Settings(D_PAD * pt_pad, wxDC * DC)
switch
(
g_Pad_Master
.
m_Attribut
&
0x7F
)
switch
(
g_Pad_Master
.
m_Attribut
&
0x7F
)
{
{
case
SMD
:
case
PAD_
SMD
:
case
CONN
:
case
PAD_
CONN
:
pt_pad
->
m_Drill
=
wxSize
(
0
,
0
);
pt_pad
->
m_Drill
=
wxSize
(
0
,
0
);
pt_pad
->
m_Offset
.
x
=
0
;
pt_pad
->
m_Offset
.
x
=
0
;
pt_pad
->
m_Offset
.
y
=
0
;
pt_pad
->
m_Offset
.
y
=
0
;
...
...
pcbnew/muonde.cpp
View file @
bd5ca82f
...
@@ -40,7 +40,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveBasicShape( wxDC* DC,
...
@@ -40,7 +40,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveBasicShape( wxDC* DC,
/* Create a footprint with pad_count pads for micro wave applications
/* Create a footprint with pad_count pads for micro wave applications
* This footprint has pad_count pads:
* This footprint has pad_count pads:
* SMD, rectangular, H size = V size = current track width.
*
PAD_
SMD, rectangular, H size = V size = current track width.
*/
*/
{
{
MODULE
*
Module
;
MODULE
*
Module
;
...
@@ -77,8 +77,8 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveBasicShape( wxDC* DC,
...
@@ -77,8 +77,8 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveBasicShape( wxDC* DC,
}
}
pad
->
m_Size
.
x
=
pad
->
m_Size
.
y
=
g_DesignSettings
.
m_CurrentTrackWidth
;
pad
->
m_Size
.
x
=
pad
->
m_Size
.
y
=
g_DesignSettings
.
m_CurrentTrackWidth
;
pad
->
m_Pos
=
Module
->
m_Pos
;
pad
->
m_Pos
=
Module
->
m_Pos
;
pad
->
m_PadShape
=
RECT
;
pad
->
m_PadShape
=
PAD_
RECT
;
pad
->
m_Attribut
=
SMD
;
pad
->
m_Attribut
=
PAD_
SMD
;
pad
->
m_Masque_Layer
=
CMP_LAYER
;
pad
->
m_Masque_Layer
=
CMP_LAYER
;
Line
.
Printf
(
wxT
(
"%d"
),
pad_num
);
Line
.
Printf
(
wxT
(
"%d"
),
pad_num
);
pad
->
SetPadName
(
Line
);
pad
->
SetPadName
(
Line
);
...
@@ -127,7 +127,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveComponent( wxDC* DC, int shape_type )
...
@@ -127,7 +127,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveComponent( wxDC* DC, int shape_type )
/* Create a module "GAP" or "STUB"
/* Create a module "GAP" or "STUB"
* This a "gap" or "stub" used in micro wave designs
* This a "gap" or "stub" used in micro wave designs
* This modue has 2 pads:
* This modue has 2 pads:
* SMD, rectangular, H size = V size = current track width.
*
PAD_
SMD, rectangular, H size = V size = current track width.
* the "gap" is isolation created between this 2 pads
* the "gap" is isolation created between this 2 pads
*/
*/
{
{
...
...
pcbnew/pcbcfg.h
View file @
bd5ca82f
...
@@ -60,7 +60,7 @@ static PARAM_CFG_INT PadFormeCfg
...
@@ -60,7 +60,7 @@ static PARAM_CFG_INT PadFormeCfg
(
(
wxT
(
"PadForm"
),
/* Keyword */
wxT
(
"PadForm"
),
/* Keyword */
&
g_Pad_Master
.
m_PadShape
,
/* Parameter address */
&
g_Pad_Master
.
m_PadShape
,
/* Parameter address */
CIRCLE
,
/* Default value */
PAD_CIRCLE
,
/* Default value */
0
,
0x7F
/* Valeurs extremes */
0
,
0x7F
/* Valeurs extremes */
);
);
...
...
pcbnew/plot_rtn.cpp
View file @
bd5ca82f
...
@@ -104,7 +104,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -104,7 +104,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
switch
(
pt_pad
->
m_PadShape
&
0x7F
)
switch
(
pt_pad
->
m_PadShape
&
0x7F
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
switch
(
format_plot
)
switch
(
format_plot
)
{
{
...
@@ -124,7 +124,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -124,7 +124,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
switch
(
format_plot
)
switch
(
format_plot
)
{
{
...
@@ -147,7 +147,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -147,7 +147,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
break
;
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
{
wxSize
delta
;
wxSize
delta
;
delta
=
pt_pad
->
m_DeltaSize
;
delta
=
pt_pad
->
m_DeltaSize
;
...
@@ -176,7 +176,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -176,7 +176,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
break
;
break
;
}
}
case
RECT
:
case
PAD_
RECT
:
default
:
default
:
switch
(
format_plot
)
switch
(
format_plot
)
...
...
pcbnew/plotgerb.cpp
View file @
bd5ca82f
...
@@ -240,11 +240,11 @@ wxString msg;
...
@@ -240,11 +240,11 @@ wxString msg;
switch
(
PtPad
->
m_PadShape
)
switch
(
PtPad
->
m_PadShape
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
// Check whether the pad really has a circular shape instead
// Check whether the pad really has a circular shape instead
if
(
size
.
x
==
size
.
y
)
if
(
size
.
x
==
size
.
y
)
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
...
@@ -252,7 +252,7 @@ wxString msg;
...
@@ -252,7 +252,7 @@ wxString msg;
trace_1_pastille_OVALE_GERBER
(
pos
,
size
,
PtPad
->
m_Orient
);
trace_1_pastille_OVALE_GERBER
(
pos
,
size
,
PtPad
->
m_Orient
);
break
;
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
{
wxSize
delta
=
PtPad
->
m_DeltaSize
;
wxSize
delta
=
PtPad
->
m_DeltaSize
;
trace_1_pad_TRAPEZE_GERBER
(
pos
,
size
,
trace_1_pad_TRAPEZE_GERBER
(
pos
,
size
,
...
@@ -260,7 +260,7 @@ wxString msg;
...
@@ -260,7 +260,7 @@ wxString msg;
}
}
break
;
break
;
case
RECT
:
case
PAD_
RECT
:
default
:
default
:
PlotRectangularPad_GERBER
(
pos
,
size
,
PtPad
->
m_Orient
);
PlotRectangularPad_GERBER
(
pos
,
size
,
PtPad
->
m_Orient
);
break
;
break
;
...
@@ -354,7 +354,7 @@ wxString msg;
...
@@ -354,7 +354,7 @@ wxString msg;
void
trace_1_pastille_OVALE_GERBER
(
wxPoint
pos
,
wxSize
size
,
int
orient
)
void
trace_1_pastille_OVALE_GERBER
(
wxPoint
pos
,
wxSize
size
,
int
orient
)
/**********************************************************************/
/**********************************************************************/
/* Trace 1 pastille
OVALE
en position pos_X,Y:
/* Trace 1 pastille
PAD_OVAL
en position pos_X,Y:
* dimensions dx, dy,
* dimensions dx, dy,
* orientation orient
* orientation orient
* Pour une orientation verticale ou horizontale, la forme est flashee
* Pour une orientation verticale ou horizontale, la forme est flashee
...
@@ -875,7 +875,7 @@ int nb_dcodes = 0 ;
...
@@ -875,7 +875,7 @@ int nb_dcodes = 0 ;
sprintf
(
text
,
"C,%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
);
sprintf
(
text
,
"C,%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
);
break
;
break
;
case
2
:
// RECT
case
2
:
//
PAD_
RECT
sprintf
(
text
,
"R,%fX%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
,
sprintf
(
text
,
"R,%fX%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
,
ptr_tool
->
m_Size
.
y
*
fscale
);
ptr_tool
->
m_Size
.
y
*
fscale
);
break
;
break
;
...
@@ -884,7 +884,7 @@ int nb_dcodes = 0 ;
...
@@ -884,7 +884,7 @@ int nb_dcodes = 0 ;
sprintf
(
text
,
"C,%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
);
sprintf
(
text
,
"C,%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
);
break
;
break
;
case
4
:
//
OVALE
case
4
:
//
PAD_OVAL
sprintf
(
text
,
"O,%fX%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
,
sprintf
(
text
,
"O,%fX%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
,
ptr_tool
->
m_Size
.
y
*
fscale
);
ptr_tool
->
m_Size
.
y
*
fscale
);
break
;
break
;
...
...
pcbnew/plothpgl.cpp
View file @
bd5ca82f
...
@@ -289,17 +289,17 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
...
@@ -289,17 +289,17 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
switch
(
PtPad
->
m_PadShape
&
0x7F
)
switch
(
PtPad
->
m_PadShape
&
0x7F
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
trace_1_pastille_RONDE_HPGL
(
start
,
size
.
x
,
modetrace
);
trace_1_pastille_RONDE_HPGL
(
start
,
size
.
x
,
modetrace
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
{
{
trace_1_pastille_OVALE_HPGL
(
start
,
size
,
PtPad
->
m_Orient
,
modetrace
);
trace_1_pastille_OVALE_HPGL
(
start
,
size
,
PtPad
->
m_Orient
,
modetrace
);
break
;
break
;
}
}
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
{
wxSize
delta
;
wxSize
delta
;
delta
=
PtPad
->
m_DeltaSize
;
delta
=
PtPad
->
m_DeltaSize
;
...
@@ -308,7 +308,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
...
@@ -308,7 +308,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
break
;
break
;
}
}
case
RECT
:
case
PAD_
RECT
:
default
:
default
:
PlotRectangularPad_HPGL
(
start
,
size
,
PlotRectangularPad_HPGL
(
start
,
size
,
PtPad
->
m_Orient
,
modetrace
);
PtPad
->
m_Orient
,
modetrace
);
...
@@ -433,7 +433,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
...
@@ -433,7 +433,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
/************************************************************************************/
/************************************************************************************/
void
trace_1_pastille_OVALE_HPGL
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
int
modetrace
)
void
trace_1_pastille_OVALE_HPGL
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
int
modetrace
)
/************************************************************************************/
/************************************************************************************/
/* Trace 1 pastille
OVALE
en position pos_X,Y , de dim size.x, size.y */
/* Trace 1 pastille
PAD_OVAL
en position pos_X,Y , de dim size.x, size.y */
{
{
int
rayon
,
deltaxy
,
cx
,
cy
;
int
rayon
,
deltaxy
,
cx
,
cy
;
int
trace_orient
=
orient
;
int
trace_orient
=
orient
;
...
...
pcbnew/plotps.cpp
View file @
bd5ca82f
...
@@ -326,15 +326,15 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
...
@@ -326,15 +326,15 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
switch
(
PtPad
->
m_PadShape
)
switch
(
PtPad
->
m_PadShape
)
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
trace_1_pastille_RONDE_POST
(
pos
,
size
.
x
,
modetrace
);
trace_1_pastille_RONDE_POST
(
pos
,
size
.
x
,
modetrace
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
trace_1_pastille_OVALE_POST
(
pos
,
size
,
PtPad
->
m_Orient
,
modetrace
);
trace_1_pastille_OVALE_POST
(
pos
,
size
,
PtPad
->
m_Orient
,
modetrace
);
break
;
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
{
wxSize
delta
;
wxSize
delta
;
delta
=
PtPad
->
m_DeltaSize
;
delta
=
PtPad
->
m_DeltaSize
;
...
@@ -343,7 +343,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
...
@@ -343,7 +343,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
break
;
break
;
}
}
case
RECT
:
case
PAD_
RECT
:
default
:
default
:
trace_1_pad_rectangulaire_POST
(
pos
,
size
,
PtPad
->
m_Orient
,
modetrace
);
trace_1_pad_rectangulaire_POST
(
pos
,
size
,
PtPad
->
m_Orient
,
modetrace
);
break
;
break
;
...
@@ -498,7 +498,7 @@ static void PrintDrillMark( BOARD* Pcb )
...
@@ -498,7 +498,7 @@ static void PrintDrillMark( BOARD* Pcb )
void
trace_1_pastille_OVALE_POST
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
int
modetrace
)
void
trace_1_pastille_OVALE_POST
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
int
modetrace
)
/************************************************************************************/
/************************************************************************************/
/* Trace 1 pastille
OVALE
en position pos_X,Y:
/* Trace 1 pastille
PAD_OVAL
en position pos_X,Y:
* dimensions dx,dy,
* dimensions dx,dy,
* orientation orient
* orientation orient
* La forme est tracee comme un segment
* La forme est tracee comme un segment
...
...
pcbnew/protos.h
View file @
bd5ca82f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#define PROTO_H
#define PROTO_H
/***************/
/***************/
/* CONNECT.CPP */
/*
PAD_
CONNECT.CPP */
/***************/
/***************/
LISTE_PAD
*
CreateSortedPadListByXCoord
(
BOARD
*
pcb
);
LISTE_PAD
*
CreateSortedPadListByXCoord
(
BOARD
*
pcb
);
/* Create a sorted list of pointers to pads.
/* Create a sorted list of pointers to pads.
...
...
pcbnew/router.cpp
View file @
bd5ca82f
...
@@ -228,17 +228,17 @@ static void Out_Pads( BOARD* Pcb, FILE* outfile )
...
@@ -228,17 +228,17 @@ static void Out_Pads( BOARD* Pcb, FILE* outfile )
/* type of device (1 = IC, 2 = edge conn, 3 = discret, 4 = other */
/* type of device (1 = IC, 2 = edge conn, 3 = discret, 4 = other */
switch
(
pt_pad
->
m_Attribut
)
switch
(
pt_pad
->
m_Attribut
)
{
{
case
STANDARD
:
case
PAD_
STANDARD
:
case
SMD
:
case
PAD_
SMD
:
fprintf
(
outfile
,
" %d"
,
1
);
fprintf
(
outfile
,
" %d"
,
1
);
break
;
break
;
case
CONN
:
case
PAD_
CONN
:
fprintf
(
outfile
,
" %d"
,
2
);
fprintf
(
outfile
,
" %d"
,
2
);
break
;
break
;
case
P_HOLE
:
case
P
AD_P
_HOLE
:
case
MECA
:
case
PAD_
MECA
:
fprintf
(
outfile
,
" %d"
,
4
);
fprintf
(
outfile
,
" %d"
,
4
);
break
;
break
;
}
}
...
@@ -264,14 +264,14 @@ static void Out_Pads( BOARD* Pcb, FILE* outfile )
...
@@ -264,14 +264,14 @@ static void Out_Pads( BOARD* Pcb, FILE* outfile )
switch
(
pt_pad
->
m_PadShape
)
/* out type, dims */
switch
(
pt_pad
->
m_PadShape
)
/* out type, dims */
{
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
fprintf
(
outfile
,
" c 0 %d 0"
,
fprintf
(
outfile
,
" c 0 %d 0"
,
pt_pad
->
m_Size
.
x
/
PSCALE
);
pt_pad
->
m_Size
.
x
/
PSCALE
);
break
;
break
;
case
OVALE
:
case
PAD_OVAL
:
case
RECT
:
case
PAD_
RECT
:
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
int
lmax
=
pt_pad
->
m_Size
.
x
;
int
lmax
=
pt_pad
->
m_Size
.
x
;
int
lmin
=
pt_pad
->
m_Size
.
y
;
int
lmin
=
pt_pad
->
m_Size
.
y
;
int
angle
=
pt_pad
->
m_Orient
/
10
;
int
angle
=
pt_pad
->
m_Orient
/
10
;
...
...
pcbnew/sel_layer.cpp
View file @
bd5ca82f
...
@@ -250,7 +250,7 @@ void WinEDA_BasePcbFrame::SelectLayerPair()
...
@@ -250,7 +250,7 @@ void WinEDA_BasePcbFrame::SelectLayerPair()
SetToolbars
();
SetToolbars
();
// if user changed colors and we are in high contrast mode, then redraw
// if user changed colors and we are in high contrast mode, then redraw
// because the SMD pads may change color.
// because the
PAD_
SMD pads may change color.
if
(
result
>=
0
&&
DisplayOpt
.
ContrastModeDisplay
)
if
(
result
>=
0
&&
DisplayOpt
.
ContrastModeDisplay
)
{
{
ReDrawPanel
();
ReDrawPanel
();
...
...
pcbnew/work.cpp
View file @
bd5ca82f
...
@@ -143,8 +143,8 @@ void GetWork (int *r1,int *c1,int *n_c,int *r2,int *c2,CHEVELU** pt_ch )
...
@@ -143,8 +143,8 @@ void GetWork (int *r1,int *c1,int *n_c,int *r2,int *c2,CHEVELU** pt_ch )
void
SortWork
()
void
SortWork
()
{
{
CWORK
*
p
;
CWORK
*
p
;
CWORK
*
q0
;
/* put PRIORITY CONNECTs in q0 */
CWORK
*
q0
;
/* put PRIORITY
PAD_
CONNECTs in q0 */
CWORK
*
q1
;
/* sort other CONNECTs in q1 */
CWORK
*
q1
;
/* sort other
PAD_
CONNECTs in q1 */
CWORK
*
r
;
CWORK
*
r
;
q0
=
q1
=
NULL
;
q0
=
q1
=
NULL
;
...
@@ -174,7 +174,7 @@ CWORK *r;
...
@@ -174,7 +174,7 @@ CWORK *r;
}
}
if
(
(
p
=
q0
)
!=
NULL
)
if
(
(
p
=
q0
)
!=
NULL
)
{
/* any priority CONNECTs? */
{
/* any priority
PAD_
CONNECTs? */
while
(
q0
->
Next
)
q0
=
q0
->
Next
;
while
(
q0
->
Next
)
q0
=
q0
->
Next
;
q0
->
Next
=
q1
;
q0
->
Next
=
q1
;
}
}
...
...
pcbnew/zone_filling_algorithm.cpp
View file @
bd5ca82f
...
@@ -608,7 +608,7 @@ bool WinEDA_PcbFrame::Genere_Pad_Connexion( wxDC* DC, int layer )
...
@@ -608,7 +608,7 @@ bool WinEDA_PcbFrame::Genere_Pad_Connexion( wxDC* DC, int layer )
dx
+=
g_DesignSettings
.
m_TrackClearence
+
g_GridRoutingSize
;
dx
+=
g_DesignSettings
.
m_TrackClearence
+
g_GridRoutingSize
;
dy
+=
g_DesignSettings
.
m_TrackClearence
+
g_GridRoutingSize
;
dy
+=
g_DesignSettings
.
m_TrackClearence
+
g_GridRoutingSize
;
if
(
pt_pad
->
m_PadShape
==
TRAPEZE
)
if
(
pt_pad
->
m_PadShape
==
PAD_TRAPEZOID
)
{
{
dx
+=
abs
(
pt_pad
->
m_DeltaSize
.
y
)
/
2
;
dx
+=
abs
(
pt_pad
->
m_DeltaSize
.
y
)
/
2
;
dy
+=
abs
(
pt_pad
->
m_DeltaSize
.
x
)
/
2
;
dy
+=
abs
(
pt_pad
->
m_DeltaSize
.
x
)
/
2
;
...
...
polygon/PolyLine2Kicad.h
View file @
bd5ca82f
...
@@ -19,17 +19,9 @@
...
@@ -19,17 +19,9 @@
#define PCBU_PER_MIL 10
#define PCBU_PER_MIL 10
#define MAX_LAYERS 32
#define MAX_LAYERS 32
#define NM_PER_MIL 10 // 25400
#define NM_PER_MIL 10 // 25400
// pad shapes
enum
{
#include "pad_shapes.h"
PAD_NONE
=
0
,
PAD_ROUND
,
PAD_SQUARE
,
PAD_RECT
,
PAD_RRECT
,
PAD_OVAL
,
PAD_OCTAGON
};
#define LAY_SELECTION 0
#define LAY_SELECTION 0
...
...
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