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
Hide 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;
Both
=
Oncu
&&
Oncmp
;
switch
(
m_PadShape
&
0x7F
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
x
=
xc
*
scale
;
y
=
yc
*
scale
;
r
=
(
double
)
dx
*
scale
;
...
...
@@ -519,7 +519,7 @@ int color;
}
break
;
case
OVALE
:
case
PAD_OVAL
:
/* calcul de l'entraxe de l'ellipse */
if
(
dx
>
dy
)
/* ellipse horizontale */
{
...
...
@@ -563,9 +563,9 @@ int color;
}
break
;
case
RECT
:
case
PAD_
RECT
:
// case SPECIAL_PAD:
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
int
ddx
,
ddy
;
ddx
=
m_DeltaSize
.
x
>>
1
;
...
...
3d-viewer/trackball.cpp
View file @
bd5ca82f
...
...
@@ -19,7 +19,7 @@
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* 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.
*
* US Government Users Restricted Rights
...
...
3d-viewer/trackball.h
View file @
bd5ca82f
...
...
@@ -19,7 +19,7 @@
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* 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.
*
* US Government Users Restricted Rights
...
...
change_log.txt
View file @
bd5ca82f
...
...
@@ -4,37 +4,49 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
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>
================================================================================
+pcbnew:
Added: Delete cutout outline in zone popup menu
the GUI about zones is now working.
Some work is needed ( a zone in a zone of the same net is not merged )
Currently No DRC for outlines
Added: Delete cutout outline in zone popup menu
the GUI about zones is now working.
Some work is needed ( a zone in a zone of the same net is not merged )
Currently No DRC for outlines
2008-jan-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
More about zones:
Outlines can be edited. Outlines are merged if needeed.
Currently No DRC for outlines
More about zones:
Outlines can be edited. Outlines are merged if needeed.
Currently No DRC for outlines
2008-jan-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+all
wxstruct modified and wxPcbStuct.h added:
classes relatives to pcbnew, cvpcb and gerbview are moved in wxPcbStuct.h
wxstruct modified and wxPcbStuct.h added:
classes relatives to pcbnew, cvpcb and gerbview are moved in wxPcbStuct.h
2007-Dec-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
First draft (and code..) about new zone handling, using polygons to define an outline.
Now currently not useable because the fill function (and many other important functions) is not implemented.
Many functions are not yet implemented: merging zones, cutout, DRC ...
Nevertheless, one can create, modify edit and save zone outlines
First draft (and code..) about new zone handling, using polygons to define an outline.
Now currently not useable because the fill function (and many other important functions) is not implemented.
Many functions are not yet implemented: merging zones, cutout, DRC ...
Nevertheless, one can create, modify edit and save zone outlines
2007-Dec-23 UPDATE Dick Hollenbeck <dick@softplc.com>
...
...
@@ -74,7 +86,7 @@ email address.
2007-Dec-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
some changes about zones: enhanced dialog, and files reorganisation
some changes about zones: enhanced dialog, and files reorganisation
2007-Dec-14 UPDATE Dick Hollenbeck <dick@softplc.com>
...
...
cvpcb/listlib.cpp
View file @
bd5ca82f
...
...
@@ -34,7 +34,7 @@ Module descr format:
$MODULE c64acmd
Li c64acmd
Cd Connecteur DIN Europe 96 Contacts AC male droit
Kw CONN DIN
Kw
PAD_
CONN DIN
$EndMODULE
*/
...
...
eeschema/netform.cpp
View file @
bd5ca82f
...
...
@@ -184,7 +184,7 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
int
netcode
=
Pin
->
GetNet
();
wxString
NetName
;
if
(
(
netcode
==
0
)
||
(
Pin
->
m_FlagOfConnection
!=
CONNECT
)
)
if
(
(
netcode
==
0
)
||
(
Pin
->
m_FlagOfConnection
!=
PAD_
CONNECT
)
)
{
return
NetName
;
}
...
...
eeschema/netlist.cpp
View file @
bd5ca82f
...
...
@@ -1166,7 +1166,7 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
for
(
;
NetItemRef
<
Lim
;
NetItemRef
++
)
{
if
(
NetItemRef
->
m_Type
==
NET_NOCONNECT
)
if
(
StateFlag
!=
CONNECT
)
if
(
StateFlag
!=
PAD_
CONNECT
)
StateFlag
=
NOCONNECT
;
/* Analyse du net en cours */
...
...
@@ -1214,11 +1214,11 @@ static void SetUnconnectedFlag( ObjetNetListStruct* ListObj, int NbItems )
case
NET_PIN
:
if
(
NetItemRef
->
m_Type
==
NET_PIN
)
StateFlag
=
CONNECT
;
StateFlag
=
PAD_
CONNECT
;
break
;
case
NET_NOCONNECT
:
if
(
StateFlag
!=
CONNECT
)
if
(
StateFlag
!=
PAD_
CONNECT
)
StateFlag
=
NOCONNECT
;
break
;
}
...
...
eeschema/netlist.h
View file @
bd5ca82f
...
...
@@ -52,7 +52,7 @@ enum NetObjetType { /* Type des objets de Net */
enum
IsConnectType
{
/* Valeur du Flag de connection */
UNCONNECT
,
/* Pin ou Label non connecte */
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 )
/* Routine de creation d'un nouvel element type LibraryDrawStruct
* POLYLINE
* ARC
* CIRCLE
* RECTANGLE
*
PAD_
CIRCLE
*
PAD_
RECTANGLE
*/
{
int
DrawType
;
...
...
gerbview/rs274d.cpp
View file @
bd5ca82f
...
...
@@ -147,7 +147,7 @@ static void Append_1_Flash_GERBER( int Dcode_index,
NEGATE
(
track
->
m_End
.
y
);
track
->
SetNet
(
Dcode_index
);
if
(
forme
==
OVALE
)
if
(
forme
==
PAD_OVAL
)
track
->
m_Shape
=
S_SPOT_OVALE
;
else
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,
Append_1_Flash_GERBER
(
dcode
,
frame
,
DC
,
m_CurrentPos
,
size
,
OVALE
);
PAD_OVAL
);
break
;
case
GERB_RECT
:
Append_1_Flash_GERBER
(
dcode
,
frame
,
DC
,
m_CurrentPos
,
size
,
RECT
);
PAD_
RECT
);
break
;
default
:
// Special (Macro) : Non implant
...
...
pcbnew/class_pad.cpp
View file @
bd5ca82f
...
...
@@ -32,7 +32,7 @@ D_PAD::D_PAD( MODULE* parent ) :
m_NumPadName
=
0
;
m_Masque_Layer
=
CUIVRE_LAYER
;
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
;
...
...
@@ -41,8 +41,8 @@ D_PAD::D_PAD( MODULE* parent ) :
m_Pos
=
(
(
MODULE
*
)
m_Parent
)
->
GetPosition
();
}
m_PadShape
=
CIRCLE
;
// forme CERCLE, RECT OVALE TRAPEZE
ou libre
m_Attribut
=
STANDARD
;
// NORMAL, SMD,
CONN, Bit 7 = STACK
m_PadShape
=
PAD_CIRCLE
;
// forme CERCLE, PAD_RECT PAD_OVAL PAD_TRAPEZOID
ou libre
m_Attribut
=
PAD_STANDARD
;
// NORMAL, PAD_SMD, PAD_
CONN, Bit 7 = STACK
m_Orient
=
0
;
// en 1/10 degres
m_logical_connexion
=
0
;
...
...
@@ -65,16 +65,16 @@ void D_PAD::ComputeRayon()
{
switch
(
m_PadShape
&
0x7F
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
m_Rayon
=
m_Size
.
x
/
2
;
break
;
case
OVALE
:
case
PAD_OVAL
:
m_Rayon
=
MAX
(
m_Size
.
x
,
m_Size
.
y
)
/
2
;
break
;
case
RECT
:
case
TRAPEZE
:
case
PAD_
RECT
:
case
PAD_TRAPEZOID
:
m_Rayon
=
(
int
)
(
sqrt
(
(
double
)
m_Size
.
y
*
m_Size
.
y
+
(
double
)
m_Size
.
x
*
m_Size
.
x
)
/
2
);
break
;
...
...
@@ -178,8 +178,8 @@ void D_PAD::Copy( D_PAD* source )
m_Pos0
=
source
->
m_Pos0
;
// Coord relatives a l'ancre du pad en
// orientation 0
m_Rayon
=
source
->
m_Rayon
;
// rayon du cercle exinscrit du pad
m_PadShape
=
source
->
m_PadShape
;
// forme CERCLE,
RECT OVALE TRAPEZE
ou libre
m_Attribut
=
source
->
m_Attribut
;
// NORMAL,
SMD,
CONN, Bit 7 = STACK
m_PadShape
=
source
->
m_PadShape
;
// forme CERCLE,
PAD_RECT PAD_OVAL PAD_TRAPEZOID
ou libre
m_Attribut
=
source
->
m_Attribut
;
// NORMAL,
PAD_SMD, PAD_
CONN, Bit 7 = STACK
m_Orient
=
source
->
m_Orient
;
// en 1/10 degres
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
//-----<test this>-----
// if SMD pad and high contrast mode
if
(
m_Attribut
==
SMD
&&
DisplayOpt
.
ContrastModeDisplay
)
// if
PAD_
SMD pad and high contrast mode
if
(
m_Attribut
==
PAD_
SMD
&&
DisplayOpt
.
ContrastModeDisplay
)
{
// when routing tracks
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
}
// 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.
else
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
&&
!
IsOnLayer
(
routeTop
)
...
...
@@ -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
{
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
)
...
...
@@ -412,7 +412,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
switch
(
m_PadShape
&
0x7F
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
if
(
fillpad
)
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
xc
,
yc
,
dx
,
0
,
color
,
color
);
else
...
...
@@ -430,7 +430,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
break
;
case
OVALE
:
case
PAD_OVAL
:
/* calcul de l'entraxe de l'ellipse */
if
(
dx
>
dy
)
/* ellipse horizontale */
{
...
...
@@ -469,8 +469,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
break
;
case
RECT
:
case
TRAPEZE
:
case
PAD_
RECT
:
case
PAD_TRAPEZOID
:
{
int
ddx
,
ddy
;
ddx
=
m_DeltaSize
.
x
>>
1
;
...
...
@@ -545,12 +545,12 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
switch
(
m_DrillShape
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
if
(
(
hole
/
zoom
)
>
1
)
/* draw hole if its size is enought */
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
cx0
,
cy0
,
hole
,
0
,
color
,
color
);
break
;
case
OVALE
:
case
PAD_OVAL
:
dx
=
m_Drill
.
x
>>
1
;
dy
=
m_Drill
.
y
>>
1
;
/* demi dim dx et dy */
...
...
@@ -683,21 +683,21 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
ll
=
0xFF
&
BufCar
[
0
];
/* Mise a jour de la forme */
m_PadShape
=
CIRCLE
;
m_PadShape
=
PAD_
CIRCLE
;
switch
(
ll
)
{
case
'C'
:
m_PadShape
=
CIRCLE
;
break
;
m_PadShape
=
PAD_
CIRCLE
;
break
;
case
'R'
:
m_PadShape
=
RECT
;
break
;
m_PadShape
=
PAD_
RECT
;
break
;
case
'O'
:
m_PadShape
=
OVALE
;
break
;
m_PadShape
=
PAD_OVAL
;
break
;
case
'T'
:
m_PadShape
=
TRAPEZE
;
break
;
m_PadShape
=
PAD_TRAPEZOID
;
break
;
}
ComputeRayon
();
...
...
@@ -708,14 +708,14 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
nn
=
sscanf
(
PtLine
,
"%d %d %d %s %d %d"
,
&
m_Drill
.
x
,
&
m_Offset
.
x
,
&
m_Offset
.
y
,
BufCar
,
&
dx
,
&
dy
);
m_Drill
.
y
=
m_Drill
.
x
;
m_DrillShape
=
CIRCLE
;
m_DrillShape
=
PAD_
CIRCLE
;
if
(
nn
>=
6
)
// Drill shape = OVAL ?
{
if
(
BufCar
[
0
]
==
'O'
)
{
m_Drill
.
x
=
dx
;
m_Drill
.
y
=
dy
;
m_DrillShape
=
OVALE
;
m_DrillShape
=
PAD_OVAL
;
}
}
break
;
...
...
@@ -727,15 +727,15 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
/* Contenu de BufCar non encore utilise ( reserve pour evolutions
* ulterieures */
/* Mise a jour de l'attribut */
m_Attribut
=
STANDARD
;
m_Attribut
=
PAD_
STANDARD
;
if
(
strncmp
(
BufLine
,
"SMD"
,
3
)
==
0
)
m_Attribut
=
SMD
;
m_Attribut
=
PAD_
SMD
;
if
(
strncmp
(
BufLine
,
"CONN"
,
4
)
==
0
)
m_Attribut
=
CONN
;
m_Attribut
=
PAD_
CONN
;
if
(
strncmp
(
BufLine
,
"HOLE"
,
4
)
==
0
)
m_Attribut
=
P_HOLE
;
m_Attribut
=
P
AD_P
_HOLE
;
if
(
strncmp
(
BufLine
,
"MECA"
,
4
)
==
0
)
m_Attribut
=
MECA
;
m_Attribut
=
PAD_
MECA
;
break
;
case
'N'
:
/* Lecture du netname */
...
...
@@ -784,16 +784,16 @@ int D_PAD::WriteDescr( FILE* File )
switch( m_PadShape )
{
case CIRCLE:
case
PAD_
CIRCLE:
cshape = 'C'; break;
case RECT:
case
PAD_
RECT:
cshape = 'R'; break;
case
OVALE
:
case
PAD_OVAL
:
cshape = 'O'; break;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
cshape = 'T'; break;
default:
...
...
@@ -807,7 +807,7 @@ int D_PAD::WriteDescr( FILE* File )
m_DeltaSize.x, m_DeltaSize.y, m_Orient );
NbLigne++;
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 );
}
...
...
@@ -817,16 +817,16 @@ int D_PAD::WriteDescr( FILE* File )
switch( m_Attribut )
{
case STANDARD:
case
PAD_
STANDARD:
texttype = "STD"; break;
case SMD:
case
PAD_
SMD:
texttype = "SMD"; break;
case CONN:
case
PAD_
CONN:
texttype = "CONN"; break;
case P_HOLE:
case P
AD_P
_HOLE:
texttype = "HOLE"; break;
case MECA:
...
...
@@ -870,16 +870,16 @@ bool D_PAD::Save( FILE* aFile ) const
switch
(
m_PadShape
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
cshape
=
'C'
;
break
;
case
RECT
:
case
PAD_
RECT
:
cshape
=
'R'
;
break
;
case
OVALE
:
case
PAD_OVAL
:
cshape
=
'O'
;
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
cshape
=
'T'
;
break
;
default
:
...
...
@@ -893,7 +893,7 @@ bool D_PAD::Save( FILE* aFile ) const
m_DeltaSize
.
x
,
m_DeltaSize
.
y
,
m_Orient
);
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
);
}
...
...
@@ -901,19 +901,19 @@ bool D_PAD::Save( FILE* aFile ) const
switch
(
m_Attribut
)
{
case
STANDARD
:
case
PAD_
STANDARD
:
texttype
=
"STD"
;
break
;
case
SMD
:
case
PAD_
SMD
:
texttype
=
"SMD"
;
break
;
case
CONN
:
case
PAD_
CONN
:
texttype
=
"CONN"
;
break
;
case
P_HOLE
:
case
P
AD_P
_HOLE
:
texttype
=
"HOLE"
;
break
;
case
MECA
:
case
PAD_
MECA
:
texttype
=
"MECA"
;
break
;
default
:
...
...
@@ -1080,7 +1080,7 @@ void D_PAD::Display_Infos( WinEDA_DrawFrame* frame )
pos
+=
7
;
valeur_param
(
(
unsigned
)
m_Drill
.
x
,
Line
);
if
(
m_DrillShape
==
CIRCLE
)
if
(
m_DrillShape
==
PAD_
CIRCLE
)
{
Affiche_1_Parametre
(
frame
,
pos
,
_
(
"Drill"
),
Line
,
RED
);
}
...
...
@@ -1149,7 +1149,7 @@ bool D_PAD::HitTest( const wxPoint& ref_pos )
/* localisation ? */
switch
(
m_PadShape
&
0x7F
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
dist
=
hypot
(
deltaX
,
deltaY
);
if
(
(
int
)
(
round
(
dist
)
)
<=
dx
)
return
true
;
...
...
pcbnew/class_pad.h
View file @
bd5ca82f
...
...
@@ -4,19 +4,8 @@
class
Pcb3D_GLCanvas
;
/* Pad shape id : ( .m_PadShape member) */
#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...)
#include "pad_shapes.h"
/* Definition type Structure d'un pad */
class
D_PAD
:
public
BOARD_ITEM
...
...
@@ -42,11 +31,11 @@ public:
// 2..14 = internal layers
// 16 .. 31 = technical layers
int
m_PadShape
;
// Shape:
CIRCLE,
RECT, OVAL, TRAPEZOID
int
m_DrillShape
;
// Shape CIRCLE, OVAL
int
m_PadShape
;
// Shape:
PAD_CIRCLE, PAD_
RECT, OVAL, TRAPEZOID
int
m_DrillShape
;
// Shape
PAD_
CIRCLE, OVAL
wxSize
m_Drill
;
// Drill diam (drill shape = CIRCLE) or drill size(shape = OVAL)
// for drill shape = CIRCLE, drill diam = m_Drill.x
wxSize
m_Drill
;
// Drill diam (drill shape =
PAD_
CIRCLE) or drill size(shape = OVAL)
// for drill shape =
PAD_
CIRCLE, drill diam = m_Drill.x
wxSize
m_Offset
;
// Offset de la forme (pastilles excentrees)
wxSize
m_Size
;
// X and Y size ( relative to orient 0)
...
...
@@ -56,7 +45,7 @@ public:
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_Attribut
;
// NORMAL,
SMD,
CONN
int
m_Attribut
;
// NORMAL,
PAD_SMD, PAD_
CONN
int
m_Orient
;
// in 1/10 degrees
int
m_logical_connexion
;
// variable used in rastnest computations
...
...
pcbnew/clean.cpp
View file @
bd5ca82f
...
...
@@ -128,14 +128,16 @@ void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC )
but is not on the pad or the via 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
);
/* Create missing segments when a track end covers a pad, but is not on the pad center */
if
(
s_ConnectToPads
)
ConnectDanglingEndToPad
(
frame
,
DC
);
// creation of points of connections at the intersection of tracks
// 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
)
ConnectDanglingEndToVia
(
frame
->
m_Pcb
);
/* Create missing segments when a track end covers a via, but is not on the via center */
if
(
s_ConnectToPads
)
ConnectDanglingEndToVia
(
frame
->
m_Pcb
);
}
#endif
...
...
pcbnew/collectors.cpp
View file @
bd5ca82f
...
...
@@ -197,7 +197,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
{
case
TYPEPAD
:
// 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.
// 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
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
break
;
case
2
:
// RECT:
case
2
:
//
PAD_
RECT:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
break
;
...
...
pcbnew/drc.cpp
View file @
bd5ca82f
...
...
@@ -845,9 +845,9 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
bool
swap_pads
;
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
;
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
;
if
(
swap_pads
)
...
...
@@ -859,7 +859,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad, const int dist_mi
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_segmAngle
=
0
;
...
...
@@ -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
);
break
;
case
RECT
:
case
PAD_
RECT
:
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
NORMALIZE_ANGLE_POS
(
pad_angle
);
if
(
aPad
->
m_PadShape
==
RECT
)
if
(
aPad
->
m_PadShape
==
PAD_
RECT
)
{
wxSize
size
=
aPad
->
m_Size
;
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
}
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 */
int
segm_width
;
...
...
@@ -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_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
* avec le segment en tst */
...
...
@@ -996,7 +996,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
default
:
return
false
;
case
OVALE
:
case
PAD_OVAL
:
/* test de la pastille ovale ramenee au type ovale vertical */
if
(
p_dimx
>
p_dimy
)
{
...
...
@@ -1037,7 +1037,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
return
false
;
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 */
m_xcliplo
=
m_spotcx
-
p_dimx
-
seuil
;
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 )
* Selon les formes relatives il peut y avoir ou non erreur */
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;
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;
if( swap_pads )
...
...
@@ -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 )
{
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_angle = 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 )
diag = TestClearanceSegmToPad( pad, pad_ref->m_Rayon, dist_min );
break;
case RECT:
case
PAD_
RECT:
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
NORMALIZE_ANGLE_POS( pad_angle );
if( pad->m_PadShape == RECT )
if( pad->m_PadShape ==
PAD_
RECT )
{
wxSize size = pad->m_Size;
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 )
}
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 */
int segm_width;
...
...
@@ -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_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
* avec le segment en tst */
...
...
@@ -2383,7 +2383,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
default:
return BAD_DRC;
case
OVALE
:
case
PAD_OVAL
:
/* test de la pastille ovale ramenee au type ovale vertical */
if( p_dimx > p_dimy )
{
...
...
@@ -2426,7 +2426,7 @@ static int TestClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
return BAD_DRC;
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 */
xcliplo = spot_cX - p_dimx - seuil;
ycliplo = spot_cY - p_dimy;
...
...
pcbnew/editpads.cpp
View file @
bd5ca82f
...
...
@@ -22,14 +22,14 @@ static wxString Current_PadNetName;
#define NBSHAPES 4
int
CodeShape
[
NBSHAPES
]
=
/* forme des pads */
{
CIRCLE
,
OVALE
,
RECT
,
TRAPEZE
PAD_CIRCLE
,
PAD_OVAL
,
PAD_RECT
,
PAD_TRAPEZOID
};
#define NBTYPES 5
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()
switch
(
tmp
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
FALSE
);
m_PadShape
->
SetSelection
(
0
);
break
;
case
OVALE
:
case
PAD_OVAL
:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadShape
->
SetSelection
(
1
);
break
;
case
RECT
:
case
PAD_
RECT
:
m_PadDeltaSizeCtrl
->
Enable
(
FALSE
,
FALSE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadShape
->
SetSelection
(
2
);
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
m_PadDeltaSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadSizeCtrl
->
Enable
(
TRUE
,
TRUE
);
m_PadShape
->
SetSelection
(
3
);
...
...
@@ -195,12 +195,12 @@ void WinEDA_PadPropertiesFrame::SetOthersControls()
switch
(
tmp
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
m_DrillShapeCtrl
->
SetSelection
(
0
);
m_PadDrillCtrl
->
Enable
(
TRUE
,
FALSE
);
break
;
case
OVALE
:
case
PAD_OVAL
:
m_DrillShapeCtrl
->
SetSelection
(
1
);
m_PadDrillCtrl
->
Enable
(
TRUE
,
TRUE
);
break
;
...
...
@@ -365,18 +365,18 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
g_Pad_Master
.
m_Pos
=
m_PadPositionCtrl
->
GetValue
();
g_Pad_Master
.
m_Pos0
=
g_Pad_Master
.
m_Pos
;
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_DeltaSize
=
m_PadDeltaSizeCtrl
->
GetValue
();
g_Pad_Master
.
m_Offset
=
m_PadOffsetCtrl
->
GetValue
();
g_Pad_Master
.
m_Drill
=
m_PadDrillCtrl
->
GetValue
();
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
;
}
else
g_Pad_Master
.
m_DrillShape
=
OVALE
;
g_Pad_Master
.
m_DrillShape
=
PAD_OVAL
;
g_Pad_Master
.
m_Orient
=
m_PadOrientCtrl
->
GetValue
();
g_Current_PadName
=
m_PadNumCtrl
->
GetValue
().
Left
(
4
);
Current_PadNetName
=
m_PadNetNameCtrl
->
GetValue
();
...
...
@@ -468,36 +468,36 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
switch
(
CurrentPad
->
m_PadShape
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
CurrentPad
->
m_Size
.
y
=
CurrentPad
->
m_Size
.
x
;
break
;
case
RECT
:
case
PAD_
RECT
:
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
break
;
case
OVALE
:
case
PAD_OVAL
:
CurrentPad
->
m_DeltaSize
=
wxSize
(
0
,
0
);
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
break
;
}
switch
(
CurrentPad
->
m_Attribut
)
{
case
STANDARD
:
case
PAD_
STANDARD
:
break
;
case
CONN
:
case
SMD
:
case
PAD_
CONN
:
case
PAD_
SMD
:
CurrentPad
->
m_Offset
=
wxSize
(
0
,
0
);
CurrentPad
->
m_Drill
=
wxSize
(
0
,
0
);
break
;
case
P_HOLE
:
case
MECA
:
case
P
AD_P
_HOLE
:
case
PAD_
MECA
:
break
;
}
...
...
pcbnew/export_gencad.cpp
View file @
bd5ca82f
...
...
@@ -226,14 +226,14 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
switch
(
pad
->
m_PadShape
)
{
default
:
case
CIRCLE
:
case
PAD_
CIRCLE
:
pad_type
=
"ROUND"
;
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
fprintf
(
file
,
"CIRCLE %d %d %d
\n
"
,
pad
->
m_Offset
.
x
,
-
pad
->
m_Offset
.
y
,
pad
->
m_Size
.
x
/
2
);
break
;
case
RECT
:
case
PAD_
RECT
:
pad_type
=
"RECTANGULAR"
;
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
fprintf
(
file
,
"RECTANGLE %d %d %d %d
\n
"
,
...
...
@@ -241,7 +241,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
dx
+
pad
->
m_Offset
.
x
,
-
pad
->
m_Offset
.
y
+
dy
);
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"
;
fprintf
(
file
,
" %s %d
\n
"
,
pad_type
,
pad
->
m_Drill
.
x
);
...
...
@@ -288,7 +288,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
break
;
}
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
pad_type
=
"POLYGON"
;
break
;
}
...
...
@@ -803,7 +803,7 @@ void ModuleWriteShape( FILE* file, MODULE* module )
* shape_descr (line, arc ..):
* LINE startX startY endX endY
* ARC startX startY endX endY centreX scentreY
* CIRCLE centreX scentreY radius
*
PAD_
CIRCLE centreX scentreY radius
*/
{
EDGE_MODULE
*
PtEdge
;
...
...
@@ -819,7 +819,7 @@ void ModuleWriteShape( FILE* file, MODULE* module )
{
fprintf
(
file
,
"ATTRIBUTE"
);
if
(
module
->
m_Attributs
&
MOD_CMS
)
fprintf
(
file
,
" SMD"
);
fprintf
(
file
,
"
PAD_
SMD"
);
if
(
module
->
m_Attributs
&
MOD_VIRTUAL
)
fprintf
(
file
,
" VIRTUAL"
);
fprintf
(
file
,
"
\n
"
);
...
...
pcbnew/gen_self.h
View file @
bd5ca82f
...
...
@@ -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_Size
.
x
=
PtPad
->
m_Size
.
y
=
LastSegm
->
m_Width
;
PtPad
->
m_Masque_Layer
=
g_TabOneLayerMask
[
LastSegm
->
GetLayer
()];
PtPad
->
m_Attribut
=
SMD
;
PtPad
->
m_PadShape
=
CIRCLE
;
PtPad
->
m_Attribut
=
PAD_
SMD
;
PtPad
->
m_PadShape
=
PAD_
CIRCLE
;
PtPad
->
m_Rayon
=
PtPad
->
m_Size
.
x
/
2
;
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 )
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
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
;
diam
=
pt_pad
->
m_Drill
.
x
;
if
(
diam
==
0
)
...
...
@@ -579,7 +579,7 @@ int WinEDA_DrillFrame::Gen_Drill_File_EXCELLON( FORET* buffer )
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
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
;
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 )
pt_pad
=
(
D_PAD
*
)
Module
->
m_Pads
;
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
;
else
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 )
if
(
foret
)
{
foret
->
m_TotalCount
++
;
if
(
pt_pad
->
m_DrillShape
==
OVALE
)
if
(
pt_pad
->
m_DrillShape
==
PAD_OVAL
)
foret
->
m_OvalCount
++
;
}
}
...
...
@@ -1362,15 +1362,15 @@ int WinEDA_DrillFrame::Plot_Drill_PcbMap( FORET* buffer, int format )
{
switch
(
pt_pad
->
m_DrillShape
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
diam
=
pt_pad
->
m_Drill
.
x
;
if
(
diam
!=
foret
->
m_Diameter
)
continue
;
PlotDrillSymbol
(
pt_pad
->
m_Pos
,
diam
,
shape_id
,
format
);
break
;
case
OVALE
:
if
(
pt_pad
->
m_DrillShape
!=
OVALE
)
case
PAD_OVAL
:
if
(
pt_pad
->
m_DrillShape
!=
PAD_OVAL
)
continue
;
diam
=
MIN
(
pt_pad
->
m_Drill
.
x
,
pt_pad
->
m_Drill
.
y
);
if
(
diam
!=
foret
->
m_Diameter
)
...
...
pcbnew/globaleditpad.cpp
View file @
bd5ca82f
...
...
@@ -303,18 +303,18 @@ WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
}
/* 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
.
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
;
switch
(
g_Pad_Master
.
m_Attribut
&
0x7F
)
{
case
SMD
:
case
CONN
:
case
PAD_
SMD
:
case
PAD_
CONN
:
pt_pad
->
m_Drill
=
wxSize
(
0
,
0
);
pt_pad
->
m_Offset
.
x
=
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_
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
,
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_
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
;
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)
/* Traitement des cas particuliers : */
switch
(
g_Pad_Master
.
m_PadShape
)
{
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
pt_pad
->
m_DeltaSize
=
g_Pad_Master
.
m_DeltaSize
;
break
;
case
CIRCLE
:
case
PAD_
CIRCLE
:
pt_pad
->
m_Size
.
y
=
pt_pad
->
m_Size
.
x
;
break
;
...
...
@@ -161,8 +161,8 @@ void WinEDA_BasePcbFrame::Import_Pad_Settings(D_PAD * pt_pad, wxDC * DC)
switch
(
g_Pad_Master
.
m_Attribut
&
0x7F
)
{
case
SMD
:
case
CONN
:
case
PAD_
SMD
:
case
PAD_
CONN
:
pt_pad
->
m_Drill
=
wxSize
(
0
,
0
);
pt_pad
->
m_Offset
.
x
=
0
;
pt_pad
->
m_Offset
.
y
=
0
;
...
...
pcbnew/muonde.cpp
View file @
bd5ca82f
...
...
@@ -40,7 +40,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveBasicShape( wxDC* DC,
/* Create a footprint with pad_count pads for micro wave applications
* 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
;
...
...
@@ -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_Pos
=
Module
->
m_Pos
;
pad
->
m_PadShape
=
RECT
;
pad
->
m_Attribut
=
SMD
;
pad
->
m_PadShape
=
PAD_
RECT
;
pad
->
m_Attribut
=
PAD_
SMD
;
pad
->
m_Masque_Layer
=
CMP_LAYER
;
Line
.
Printf
(
wxT
(
"%d"
),
pad_num
);
pad
->
SetPadName
(
Line
);
...
...
@@ -127,7 +127,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveComponent( wxDC* DC, int shape_type )
/* Create a module "GAP" or "STUB"
* This a "gap" or "stub" used in micro wave designs
* 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
*/
{
...
...
pcbnew/pcbcfg.h
View file @
bd5ca82f
...
...
@@ -60,7 +60,7 @@ static PARAM_CFG_INT PadFormeCfg
(
wxT
(
"PadForm"
),
/* Keyword */
&
g_Pad_Master
.
m_PadShape
,
/* Parameter address */
CIRCLE
,
/* Default value */
PAD_CIRCLE
,
/* Default value */
0
,
0x7F
/* Valeurs extremes */
);
...
...
pcbnew/plot_rtn.cpp
View file @
bd5ca82f
...
...
@@ -104,7 +104,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
switch
(
pt_pad
->
m_PadShape
&
0x7F
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
switch
(
format_plot
)
{
...
...
@@ -124,7 +124,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
break
;
case
OVALE
:
case
PAD_OVAL
:
switch
(
format_plot
)
{
...
...
@@ -147,7 +147,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
wxSize
delta
;
delta
=
pt_pad
->
m_DeltaSize
;
...
...
@@ -176,7 +176,7 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
break
;
}
case
RECT
:
case
PAD_
RECT
:
default
:
switch
(
format_plot
)
...
...
pcbnew/plotgerb.cpp
View file @
bd5ca82f
...
...
@@ -240,11 +240,11 @@ wxString msg;
switch
(
PtPad
->
m_PadShape
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
break
;
case
OVALE
:
case
PAD_OVAL
:
// Check whether the pad really has a circular shape instead
if
(
size
.
x
==
size
.
y
)
Plot_1_CIRCLE_pad_GERBER
(
pos
,
size
.
x
);
...
...
@@ -252,7 +252,7 @@ wxString msg;
trace_1_pastille_OVALE_GERBER
(
pos
,
size
,
PtPad
->
m_Orient
);
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
wxSize
delta
=
PtPad
->
m_DeltaSize
;
trace_1_pad_TRAPEZE_GERBER
(
pos
,
size
,
...
...
@@ -260,7 +260,7 @@ wxString msg;
}
break
;
case
RECT
:
case
PAD_
RECT
:
default
:
PlotRectangularPad_GERBER
(
pos
,
size
,
PtPad
->
m_Orient
);
break
;
...
...
@@ -354,7 +354,7 @@ wxString msg;
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,
* orientation orient
* Pour une orientation verticale ou horizontale, la forme est flashee
...
...
@@ -875,7 +875,7 @@ int nb_dcodes = 0 ;
sprintf
(
text
,
"C,%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
);
break
;
case
2
:
// RECT
case
2
:
//
PAD_
RECT
sprintf
(
text
,
"R,%fX%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
,
ptr_tool
->
m_Size
.
y
*
fscale
);
break
;
...
...
@@ -884,7 +884,7 @@ int nb_dcodes = 0 ;
sprintf
(
text
,
"C,%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
);
break
;
case
4
:
//
OVALE
case
4
:
//
PAD_OVAL
sprintf
(
text
,
"O,%fX%f*%%
\n
"
,
ptr_tool
->
m_Size
.
x
*
fscale
,
ptr_tool
->
m_Size
.
y
*
fscale
);
break
;
...
...
pcbnew/plothpgl.cpp
View file @
bd5ca82f
...
...
@@ -289,17 +289,17 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
switch
(
PtPad
->
m_PadShape
&
0x7F
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
trace_1_pastille_RONDE_HPGL
(
start
,
size
.
x
,
modetrace
);
break
;
case
OVALE
:
case
PAD_OVAL
:
{
trace_1_pastille_OVALE_HPGL
(
start
,
size
,
PtPad
->
m_Orient
,
modetrace
);
break
;
}
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
wxSize
delta
;
delta
=
PtPad
->
m_DeltaSize
;
...
...
@@ -308,7 +308,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
break
;
}
case
RECT
:
case
PAD_
RECT
:
default
:
PlotRectangularPad_HPGL
(
start
,
size
,
PtPad
->
m_Orient
,
modetrace
);
...
...
@@ -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
)
/************************************************************************************/
/* 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
trace_orient
=
orient
;
...
...
pcbnew/plotps.cpp
View file @
bd5ca82f
...
...
@@ -326,15 +326,15 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
switch
(
PtPad
->
m_PadShape
)
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
trace_1_pastille_RONDE_POST
(
pos
,
size
.
x
,
modetrace
);
break
;
case
OVALE
:
case
PAD_OVAL
:
trace_1_pastille_OVALE_POST
(
pos
,
size
,
PtPad
->
m_Orient
,
modetrace
);
break
;
case
TRAPEZE
:
case
PAD_TRAPEZOID
:
{
wxSize
delta
;
delta
=
PtPad
->
m_DeltaSize
;
...
...
@@ -343,7 +343,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
break
;
}
case
RECT
:
case
PAD_
RECT
:
default
:
trace_1_pad_rectangulaire_POST
(
pos
,
size
,
PtPad
->
m_Orient
,
modetrace
);
break
;
...
...
@@ -498,7 +498,7 @@ static void PrintDrillMark( BOARD* Pcb )
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,
* orientation orient
* La forme est tracee comme un segment
...
...
pcbnew/protos.h
View file @
bd5ca82f
...
...
@@ -6,7 +6,7 @@
#define PROTO_H
/***************/
/* CONNECT.CPP */
/*
PAD_
CONNECT.CPP */
/***************/
LISTE_PAD
*
CreateSortedPadListByXCoord
(
BOARD
*
pcb
);
/* 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 )
/* type of device (1 = IC, 2 = edge conn, 3 = discret, 4 = other */
switch
(
pt_pad
->
m_Attribut
)
{
case
STANDARD
:
case
SMD
:
case
PAD_
STANDARD
:
case
PAD_
SMD
:
fprintf
(
outfile
,
" %d"
,
1
);
break
;
case
CONN
:
case
PAD_
CONN
:
fprintf
(
outfile
,
" %d"
,
2
);
break
;
case
P_HOLE
:
case
MECA
:
case
P
AD_P
_HOLE
:
case
PAD_
MECA
:
fprintf
(
outfile
,
" %d"
,
4
);
break
;
}
...
...
@@ -264,14 +264,14 @@ static void Out_Pads( BOARD* Pcb, FILE* outfile )
switch
(
pt_pad
->
m_PadShape
)
/* out type, dims */
{
case
CIRCLE
:
case
PAD_
CIRCLE
:
fprintf
(
outfile
,
" c 0 %d 0"
,
pt_pad
->
m_Size
.
x
/
PSCALE
);
break
;
case
OVALE
:
case
RECT
:
case
TRAPEZE
:
case
PAD_OVAL
:
case
PAD_
RECT
:
case
PAD_TRAPEZOID
:
int
lmax
=
pt_pad
->
m_Size
.
x
;
int
lmin
=
pt_pad
->
m_Size
.
y
;
int
angle
=
pt_pad
->
m_Orient
/
10
;
...
...
pcbnew/sel_layer.cpp
View file @
bd5ca82f
...
...
@@ -250,7 +250,7 @@ void WinEDA_BasePcbFrame::SelectLayerPair()
SetToolbars
();
// 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
)
{
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 )
void
SortWork
()
{
CWORK
*
p
;
CWORK
*
q0
;
/* put PRIORITY CONNECTs in q0 */
CWORK
*
q1
;
/* sort other CONNECTs in q1 */
CWORK
*
q0
;
/* put PRIORITY
PAD_
CONNECTs in q0 */
CWORK
*
q1
;
/* sort other
PAD_
CONNECTs in q1 */
CWORK
*
r
;
q0
=
q1
=
NULL
;
...
...
@@ -174,7 +174,7 @@ CWORK *r;
}
if
(
(
p
=
q0
)
!=
NULL
)
{
/* any priority CONNECTs? */
{
/* any priority
PAD_
CONNECTs? */
while
(
q0
->
Next
)
q0
=
q0
->
Next
;
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 )
dx
+=
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
;
dy
+=
abs
(
pt_pad
->
m_DeltaSize
.
x
)
/
2
;
...
...
polygon/PolyLine2Kicad.h
View file @
bd5ca82f
...
...
@@ -19,17 +19,9 @@
#define PCBU_PER_MIL 10
#define MAX_LAYERS 32
#define NM_PER_MIL 10 // 25400
// pad shapes
enum
{
PAD_NONE
=
0
,
PAD_ROUND
,
PAD_SQUARE
,
PAD_RECT
,
PAD_RRECT
,
PAD_OVAL
,
PAD_OCTAGON
};
#include "pad_shapes.h"
#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