Commit bd5ca82f authored by dickelbeck's avatar dickelbeck

use pad_shapes.h

parent af47386c
...@@ -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 ;
......
...@@ -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
......
...@@ -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
......
...@@ -4,37 +4,49 @@ Started 2007-June-11 ...@@ -4,37 +4,49 @@ 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:
Added: Delete cutout outline in zone popup menu Added: Delete cutout outline in zone popup menu
the GUI about zones is now working. the GUI about zones is now working.
Some work is needed ( a zone in a zone of the same net is not merged ) Some work is needed ( a zone in a zone of the same net is not merged )
Currently No DRC for outlines Currently No DRC for outlines
2008-jan-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-jan-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+pcbnew: +pcbnew:
More about zones: More about zones:
Outlines can be edited. Outlines are merged if needeed. Outlines can be edited. Outlines are merged if needeed.
Currently No DRC for outlines Currently No DRC for outlines
2008-jan-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-jan-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+all +all
wxstruct modified and wxPcbStuct.h added: wxstruct modified and wxPcbStuct.h added:
classes relatives to pcbnew, cvpcb and gerbview are moved in wxPcbStuct.h classes relatives to pcbnew, cvpcb and gerbview are moved in wxPcbStuct.h
2007-Dec-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-Dec-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+pcbnew: +pcbnew:
First draft (and code..) about new zone handling, using polygons to define an outline. 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. 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 ... Many functions are not yet implemented: merging zones, cutout, DRC ...
Nevertheless, one can create, modify edit and save zone outlines Nevertheless, one can create, modify edit and save zone outlines
2007-Dec-23 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Dec-23 UPDATE Dick Hollenbeck <dick@softplc.com>
...@@ -74,7 +86,7 @@ email address. ...@@ -74,7 +86,7 @@ email address.
2007-Dec-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-Dec-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+pcbnew: +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> 2007-Dec-14 UPDATE Dick Hollenbeck <dick@softplc.com>
......
...@@ -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
*/ */
......
...@@ -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;
} }
......
...@@ -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;
} }
......
...@@ -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 */
}; };
......
...@@ -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;
......
...@@ -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
......
This diff is collapsed.
...@@ -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
......
...@@ -128,14 +128,16 @@ void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -128,14 +128,16 @@ 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 */
ConnectDanglingEndToPad( frame, DC ); if( s_ConnectToPads )
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 */
ConnectDanglingEndToVia( frame->m_Pcb ); if( s_ConnectToPads )
ConnectDanglingEndToVia( frame->m_Pcb );
} }
#endif #endif
......
...@@ -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,
......
...@@ -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;
......
...@@ -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;
......
...@@ -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 PAD_P_HOLE:
case MECA: case PAD_MECA:
break; break;
} }
......
...@@ -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" );
......
...@@ -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 );
......
...@@ -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 )
......
...@@ -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;
......
...@@ -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;
......
...@@ -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;
......
...@@ -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
*/ */
{ {
......
...@@ -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 */
); );
......
...@@ -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 )
......
...@@ -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;
......
...@@ -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;
......
...@@ -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
......
...@@ -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.
......
...@@ -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 PAD_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;
......
...@@ -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();
......
...@@ -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;
} }
......
...@@ -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;
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment