diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 64172a1aa1..ef1a108908 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -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 ; diff --git a/3d-viewer/trackball.cpp b/3d-viewer/trackball.cpp index 3821e1d930..c4b8501c21 100644 --- a/3d-viewer/trackball.cpp +++ b/3d-viewer/trackball.cpp @@ -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 diff --git a/3d-viewer/trackball.h b/3d-viewer/trackball.h index b676fb4e54..ed0c267e80 100644 --- a/3d-viewer/trackball.h +++ b/3d-viewer/trackball.h @@ -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 diff --git a/change_log.txt b/change_log.txt index 696b4365fb..7b6a8bada6 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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 +================================================================================ ++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 ================================================================================ +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 ================================================================================ +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 ================================================================================ +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 ================================================================================ +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 @@ -74,7 +86,7 @@ email address. 2007-Dec-17 UPDATE Jean-Pierre Charras ================================================================================ +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 diff --git a/cvpcb/listlib.cpp b/cvpcb/listlib.cpp index 7d51b75ace..f35f48c56f 100644 --- a/cvpcb/listlib.cpp +++ b/cvpcb/listlib.cpp @@ -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 */ diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index dff7679418..0ffa83b491 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -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; } diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index eed7cfdddc..9fc4c6af07 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -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; } diff --git a/eeschema/netlist.h b/eeschema/netlist.h index 5a3cd28d48..285a46da9d 100644 --- a/eeschema/netlist.h +++ b/eeschema/netlist.h @@ -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 */ }; diff --git a/eeschema/symbdraw.cpp b/eeschema/symbdraw.cpp index 1f9517c105..af4a9c73ae 100644 --- a/eeschema/symbdraw.cpp +++ b/eeschema/symbdraw.cpp @@ -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; diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index 7683eb47ff..c3a1ef2df8 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -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é diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index bec6af7aa6..5bcd1a3099 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -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 //---------- - // 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 = PAD_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 PAD_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 PAD_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; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 93accf7f61..9c01da133a 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -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 +#include "pad_shapes.h" -/* 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 */ 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 diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 5de9322e84..775e53a1ac 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -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 diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index d2a9534477..5c02430c86 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -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, diff --git a/pcbnew/dialog_pad_edit.cpp b/pcbnew/dialog_pad_edit.cpp index 81a37aece4..4bd4719758 100644 --- a/pcbnew/dialog_pad_edit.cpp +++ b/pcbnew/dialog_pad_edit.cpp @@ -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; diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index 2326b48d12..96e240faac 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -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; diff --git a/pcbnew/editpads.cpp b/pcbnew/editpads.cpp index b2fa46a88e..9e7477d4a0 100644 --- a/pcbnew/editpads.cpp +++ b/pcbnew/editpads.cpp @@ -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 PAD_P_HOLE: + case PAD_MECA: break; } diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index ae5979ebe2..bfb0744d65 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -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" ); diff --git a/pcbnew/gen_self.h b/pcbnew/gen_self.h index 246878e4e6..b2b56c2e34 100644 --- a/pcbnew/gen_self.h +++ b/pcbnew/gen_self.h @@ -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 ); diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index f431467e57..635574ef98 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -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 ) diff --git a/pcbnew/globaleditpad.cpp b/pcbnew/globaleditpad.cpp index 0ab0b302ef..db1b71a337 100644 --- a/pcbnew/globaleditpad.cpp +++ b/pcbnew/globaleditpad.cpp @@ -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; diff --git a/pcbnew/graphpcb.cpp b/pcbnew/graphpcb.cpp index 544c57bcfe..c4c1982732 100644 --- a/pcbnew/graphpcb.cpp +++ b/pcbnew/graphpcb.cpp @@ -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; diff --git a/pcbnew/move-drag_pads.cpp b/pcbnew/move-drag_pads.cpp index 5b5bd428d0..c3052a082c 100644 --- a/pcbnew/move-drag_pads.cpp +++ b/pcbnew/move-drag_pads.cpp @@ -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; diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index d22d6783fe..1eb73e985c 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -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 */ { diff --git a/pcbnew/pcbcfg.h b/pcbnew/pcbcfg.h index 29589db995..fd9e41af7a 100644 --- a/pcbnew/pcbcfg.h +++ b/pcbnew/pcbcfg.h @@ -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 */ ); diff --git a/pcbnew/plot_rtn.cpp b/pcbnew/plot_rtn.cpp index 9b0c7fa89b..04cfddf905 100644 --- a/pcbnew/plot_rtn.cpp +++ b/pcbnew/plot_rtn.cpp @@ -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 ) diff --git a/pcbnew/plotgerb.cpp b/pcbnew/plotgerb.cpp index f557b972a0..b4722eb7d3 100644 --- a/pcbnew/plotgerb.cpp +++ b/pcbnew/plotgerb.cpp @@ -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; diff --git a/pcbnew/plothpgl.cpp b/pcbnew/plothpgl.cpp index e127cf8741..8a1c93f233 100644 --- a/pcbnew/plothpgl.cpp +++ b/pcbnew/plothpgl.cpp @@ -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; diff --git a/pcbnew/plotps.cpp b/pcbnew/plotps.cpp index 51e004bc04..6338c36945 100644 --- a/pcbnew/plotps.cpp +++ b/pcbnew/plotps.cpp @@ -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 diff --git a/pcbnew/protos.h b/pcbnew/protos.h index 0bc6c811d4..2080247fde 100644 --- a/pcbnew/protos.h +++ b/pcbnew/protos.h @@ -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. diff --git a/pcbnew/router.cpp b/pcbnew/router.cpp index 2e9cef6f77..696d30d329 100644 --- a/pcbnew/router.cpp +++ b/pcbnew/router.cpp @@ -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 PAD_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; diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index dc80a5e9a0..1819558530 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -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(); diff --git a/pcbnew/work.cpp b/pcbnew/work.cpp index b3650726f1..e57a9d0f36 100644 --- a/pcbnew/work.cpp +++ b/pcbnew/work.cpp @@ -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; } diff --git a/pcbnew/zone_filling_algorithm.cpp b/pcbnew/zone_filling_algorithm.cpp index 0a4a36ceb2..354d58e097 100644 --- a/pcbnew/zone_filling_algorithm.cpp +++ b/pcbnew/zone_filling_algorithm.cpp @@ -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; diff --git a/polygon/PolyLine2Kicad.h b/polygon/PolyLine2Kicad.h index 9e7119378a..4466f5023b 100644 --- a/polygon/PolyLine2Kicad.h +++ b/polygon/PolyLine2Kicad.h @@ -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