Commit cfc68722 authored by CHARRAS's avatar CHARRAS
Browse files

some translations

parent 387a8763
Loading
Loading
Loading
Loading
+30 B (130 KiB)

File changed.

No diff preview for this file type.

+97 −92
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: kicad\n"
"Project-Id-Version: kicad\n"
"POT-Creation-Date: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2007-10-13 19:18+0100\n"
"PO-Revision-Date: 2007-10-19 08:14+0100\n"
"Last-Translator: \n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
"MIME-Version: 1.0\n"
@@ -734,8 +734,8 @@ msgstr "Outils"
#: pcbnew/gendrill.cpp:1098
#: pcbnew/gendrill.cpp:1098
#: pcbnew/gendrill.cpp:1674
#: pcbnew/gendrill.cpp:1674
#: pcbnew/class_pad.cpp:995
#: pcbnew/class_pad.cpp:995
#: pcbnew/class_track.cpp:812
#: pcbnew/class_track.cpp:836
#: pcbnew/class_track.cpp:817
#: pcbnew/class_track.cpp:841
msgid "Drill"
msgid "Drill"
msgstr "Perage"
msgstr "Perage"


@@ -984,8 +984,8 @@ msgstr "Texte Pcb"
#: pcbnew/class_text_mod.cpp:347
#: pcbnew/class_text_mod.cpp:347
#: pcbnew/class_text_mod.cpp:351
#: pcbnew/class_text_mod.cpp:351
#: pcbnew/class_pad.cpp:972
#: pcbnew/class_pad.cpp:972
#: pcbnew/class_track.cpp:796
#: pcbnew/dialog_edit_module.cpp:234
#: pcbnew/dialog_edit_module.cpp:234
#: pcbnew/class_track.cpp:820
#: pcbnew/sel_layer.cpp:145
#: pcbnew/sel_layer.cpp:145
#: pcbnew/class_module.cpp:1116
#: pcbnew/class_module.cpp:1116
#: gerbview/affiche.cpp:109
#: gerbview/affiche.cpp:109
@@ -1035,8 +1035,8 @@ msgstr "Orient"
#: pcbnew/classpcb.cpp:202
#: pcbnew/classpcb.cpp:202
#: pcbnew/class_text_mod.cpp:364
#: pcbnew/class_text_mod.cpp:364
#: pcbnew/pcbtexte.cpp:130
#: pcbnew/pcbtexte.cpp:130
#: pcbnew/class_track.cpp:820
#: pcbnew/class_edge_mod.cpp:297
#: pcbnew/class_edge_mod.cpp:297
#: pcbnew/class_track.cpp:844
#: eeschema/affiche.cpp:188
#: eeschema/affiche.cpp:188
#: eeschema/dialog_cmp_graphic_properties.cpp:188
#: eeschema/dialog_cmp_graphic_properties.cpp:188
#: gerbview/affiche.cpp:52
#: gerbview/affiche.cpp:52
@@ -1558,7 +1558,7 @@ msgstr "Mode d'affichage Haut Contraste"


#: pcbnew/pcbframe.cpp:442
#: pcbnew/pcbframe.cpp:442
#: pcbnew/class_board_item.cpp:140
#: pcbnew/class_board_item.cpp:140
#: pcbnew/class_track.cpp:729
#: pcbnew/class_track.cpp:753
msgid "Track"
msgid "Track"
msgstr "Piste"
msgstr "Piste"


@@ -1920,10 +1920,6 @@ msgstr "Inclure pistes autorout
msgid "Include Locked Tracks"
msgid "Include Locked Tracks"
msgstr "Inclure pistes verrouilles"
msgstr "Inclure pistes verrouilles"


#: pcbnew/deltrack.cpp:153
msgid "Delete NET ?"
msgstr "Supprimer Net ?"

#: pcbnew/dialog_track_options.cpp:125
#: pcbnew/dialog_track_options.cpp:125
msgid "Via Size"
msgid "Via Size"
msgstr "Diametre Via"
msgstr "Diametre Via"
@@ -2004,6 +2000,7 @@ msgid "Filled"
msgstr "Plein"
msgstr "Plein"


#: pcbnew/dialog_display_options.cpp:196
#: pcbnew/dialog_display_options.cpp:196
#: pcbnew/ioascii.cpp:196
msgid "Tracks:"
msgid "Tracks:"
msgstr "Pistes:"
msgstr "Pistes:"


@@ -2082,65 +2079,9 @@ msgstr "Afficher autres
msgid "Show page limits"
msgid "Show page limits"
msgstr " Afficher limites de page"
msgstr " Afficher limites de page"


#: pcbnew/clean.cpp:163
#: pcbnew/deltrack.cpp:153
msgid "Delete unconnected tracks:"
msgid "Delete NET ?"
msgstr "Suppression Pistes non connectes"
msgstr "Supprimer Net ?"

#: pcbnew/clean.cpp:181
msgid "ViaDef"
msgstr "ViaDef"

#: pcbnew/clean.cpp:332
msgid "Clean Null Segments"
msgstr "Nettoyage segments nulls"

#: pcbnew/clean.cpp:420
msgid "Merging Segments:"
msgstr "Associe Segment"

#: pcbnew/clean.cpp:422
msgid "Merge"
msgstr "Merge"

#: pcbnew/clean.cpp:422
#: pcbnew/dialog_pad_edit.cpp:186
#: eeschema/dialog_erc.cpp:192
#: eeschema/dialog_erc.cpp:196
#: eeschema/dialog_edit_component_in_schematic.cpp:172
msgid "0"
msgstr "0"

#: pcbnew/clean.cpp:435
msgid "Merge: "
msgstr "Merge: "

#: pcbnew/clean.cpp:647
msgid "DRC Control:"
msgstr "Controle DRC:"

#: pcbnew/clean.cpp:652
msgid "NetCtr"
msgstr "NetCtr"

#: pcbnew/clean.cpp:886
msgid "Centre"
msgstr "Centre"

#: pcbnew/clean.cpp:886
msgid "0 "
msgstr "0"

#: pcbnew/clean.cpp:897
msgid "Pads: "
msgstr "Pastilles: "

#: pcbnew/clean.cpp:900
msgid "Max"
msgstr "Max"

#: pcbnew/clean.cpp:902
msgid "Segm"
msgstr "Segm"


#: pcbnew/plotgerb.cpp:72
#: pcbnew/plotgerb.cpp:72
msgid "unable to create file "
msgid "unable to create file "
@@ -2244,7 +2185,7 @@ msgid "No Net"
msgstr "No Net"
msgstr "No Net"


#: pcbnew/zones.cpp:916
#: pcbnew/zones.cpp:916
#: pcbnew/class_track.cpp:755
#: pcbnew/class_track.cpp:779
msgid "NetName"
msgid "NetName"
msgstr "NetName"
msgstr "NetName"


@@ -2432,10 +2373,6 @@ msgstr "Segment en cours d'
msgid "Delete Layer "
msgid "Delete Layer "
msgstr "Effacer Couche"
msgstr "Effacer Couche"


#: pcbnew/ioascii.cpp:207
msgid "Error: Unexpected end of file !"
msgstr "Erreur: Fin de fichier inattendue !"

#: pcbnew/set_grid.cpp:147
#: pcbnew/set_grid.cpp:147
#: pcbnew/dialog_general_options.cpp:271
#: pcbnew/dialog_general_options.cpp:271
#: gerbview/options.cpp:183
#: gerbview/options.cpp:183
@@ -2512,7 +2449,7 @@ msgstr "NetName Pad:"
#: pcbnew/dialog_pad_edit.cpp:196
#: pcbnew/dialog_pad_edit.cpp:196
#: pcbnew/classpcb.cpp:186
#: pcbnew/classpcb.cpp:186
#: pcbnew/class_board_item.cpp:108
#: pcbnew/class_board_item.cpp:108
#: pcbnew/class_track.cpp:766
#: pcbnew/class_track.cpp:790
msgid "Circle"
msgid "Circle"
msgstr "Cercle"
msgstr "Cercle"


@@ -2525,6 +2462,14 @@ msgstr "Ovale"
msgid "Drill Shape:"
msgid "Drill Shape:"
msgstr "Forme du perage:"
msgstr "Forme du perage:"


#: pcbnew/dialog_pad_edit.cpp:186
#: pcbnew/clean.cpp:446
#: eeschema/dialog_erc.cpp:192
#: eeschema/dialog_erc.cpp:196
#: eeschema/dialog_edit_component_in_schematic.cpp:172
msgid "0"
msgstr "0"

#: pcbnew/dialog_pad_edit.cpp:187
#: pcbnew/dialog_pad_edit.cpp:187
msgid "90"
msgid "90"
msgstr "90"
msgstr "90"
@@ -2562,7 +2507,7 @@ msgid "Pad Shape:"
msgstr "Forme Pad:"
msgstr "Forme Pad:"


#: pcbnew/dialog_pad_edit.cpp:205
#: pcbnew/dialog_pad_edit.cpp:205
#: pcbnew/class_track.cpp:768
#: pcbnew/class_track.cpp:792
msgid "Standard"
msgid "Standard"
msgstr "Standard"
msgstr "Standard"


@@ -2657,6 +2602,14 @@ msgstr "Supprimer Module"
msgid "Value "
msgid "Value "
msgstr "Valeur "
msgstr "Valeur "


#: pcbnew/ioascii.cpp:200
msgid "Zones:"
msgstr "Zones:"

#: pcbnew/ioascii.cpp:207
msgid "Error: Unexpected end of file !"
msgstr "Erreur: Fin de fichier inattendue !"

#: pcbnew/pcbcfg.cpp:68
#: pcbnew/pcbcfg.cpp:68
#: eeschema/eeconfig.cpp:58
#: eeschema/eeconfig.cpp:58
#: cvpcb/menucfg.cpp:170
#: cvpcb/menucfg.cpp:170
@@ -2709,10 +2662,62 @@ msgstr "Librairie: "
msgid "Modules (%d items)"
msgid "Modules (%d items)"
msgstr "Modules (%d lments)"
msgstr "Modules (%d lments)"


#: pcbnew/clean.cpp:169
msgid "Delete unconnected tracks:"
msgstr "Suppression Pistes non connectes"

#: pcbnew/clean.cpp:188
msgid "ViaDef"
msgstr "ViaDef"

#: pcbnew/clean.cpp:348
msgid "Clean Null Segments"
msgstr "Nettoyage segments nulls"

#: pcbnew/clean.cpp:444
msgid "Merging Segments:"
msgstr "Associe Segment"

#: pcbnew/clean.cpp:446
msgid "Merge"
msgstr "Merge"

#: pcbnew/clean.cpp:460
msgid "Merge: "
msgstr "Merge: "

#: pcbnew/clean.cpp:680
msgid "DRC Control:"
msgstr "Controle DRC:"

#: pcbnew/clean.cpp:685
msgid "NetCtr"
msgstr "NetCtr"

#: pcbnew/clean.cpp:963
msgid "Centre"
msgstr "Centre"

#: pcbnew/clean.cpp:963
msgid "0 "
msgstr "0"

#: pcbnew/clean.cpp:976
msgid "Pads: "
msgstr "Pastilles: "

#: pcbnew/clean.cpp:980
msgid "Max"
msgstr "Max"

#: pcbnew/clean.cpp:983
msgid "Segm"
msgstr "Segm"

#: pcbnew/classpcb.cpp:181
#: pcbnew/classpcb.cpp:181
#: pcbnew/classpcb.cpp:313
#: pcbnew/classpcb.cpp:313
#: pcbnew/class_text_mod.cpp:337
#: pcbnew/class_text_mod.cpp:337
#: pcbnew/class_track.cpp:740
#: pcbnew/class_track.cpp:764
#: gerbview/affiche.cpp:93
#: gerbview/affiche.cpp:93
msgid "Type"
msgid "Type"
msgstr "Type"
msgstr "Type"
@@ -2726,7 +2731,7 @@ msgid " Arc "
msgstr "  Arc  "
msgstr "  Arc  "


#: pcbnew/classpcb.cpp:195
#: pcbnew/classpcb.cpp:195
#: pcbnew/class_track.cpp:764
#: pcbnew/class_track.cpp:788
msgid "Segment"
msgid "Segment"
msgstr "Segment"
msgstr "Segment"


@@ -3586,7 +3591,7 @@ msgid "Length:"
msgstr "Long.:"
msgstr "Long.:"


#: pcbnew/class_board_item.cpp:153
#: pcbnew/class_board_item.cpp:153
#: pcbnew/class_track.cpp:733
#: pcbnew/class_track.cpp:757
msgid "Zone"
msgid "Zone"
msgstr "Zone"
msgstr "Zone"


@@ -4013,19 +4018,6 @@ msgstr "Deselection"
msgid "Deselect this layer to restore its No Change state"
msgid "Deselect this layer to restore its No Change state"
msgstr "Deselectionner cette couche pour restorer l'option Pas de Changement"
msgstr "Deselectionner cette couche pour restorer l'option Pas de Changement"


#: pcbnew/class_track.cpp:760
msgid "NetCode"
msgstr "NetCode"

#: pcbnew/class_track.cpp:780
#: pcbnew/class_module.cpp:1135
msgid "Stat"
msgstr "Stat"

#: pcbnew/class_track.cpp:804
msgid "Diam"
msgstr "Diam"

#: pcbnew/dialog_edit_module.cpp:39
#: pcbnew/dialog_edit_module.cpp:39
msgid "Module properties"
msgid "Module properties"
msgstr "Proprits du Module"
msgstr "Proprits du Module"
@@ -4200,6 +4192,19 @@ msgstr "Couche Mod."
msgid "Seg Layer"
msgid "Seg Layer"
msgstr "Couche Seg."
msgstr "Couche Seg."


#: pcbnew/class_track.cpp:784
msgid "NetCode"
msgstr "NetCode"

#: pcbnew/class_track.cpp:804
#: pcbnew/class_module.cpp:1135
msgid "Stat"
msgstr "Stat"

#: pcbnew/class_track.cpp:828
msgid "Diam"
msgstr "Diam"

#: pcbnew/moduleframe.cpp:177
#: pcbnew/moduleframe.cpp:177
msgid "Module Editor: module modified!, Continue ?"
msgid "Module Editor: module modified!, Continue ?"
msgstr "Editeur de Module: module modifi!  Continuer ?"
msgstr "Editeur de Module: module modifi!  Continuer ?"
+3 −3
Original line number Original line Diff line number Diff line
@@ -170,9 +170,9 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
            text << _( "Via" ) << wxT( " " ) << via->ShowWidth();
            text << _( "Via" ) << wxT( " " ) << via->ShowWidth();
            
            
            int shape = via->Shape(); 
            int shape = via->Shape(); 
            if( shape == VIA_ENTERREE )
            if( shape == BURIED_VIA )
                text << wxT(" ") << _( "Blind" );
                text << wxT(" ") << _( "Blind" );
            else if( shape == VIA_BORGNE )
            else if( shape == BLIND_VIA )
                text << wxT(" ") << _("Buried");
                text << wxT(" ") << _("Buried");
            // else say nothing about normal vias
            // else say nothing about normal vias
            
            
@@ -182,7 +182,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
                text << wxT( " [" ) << net->m_Netname << wxT( "]" );
                text << wxT( " [" ) << net->m_Netname << wxT( "]" );
            }
            }
            
            
            if( shape != VIA_NORMALE )
            if( shape != THROUGH_VIA )
            {
            {
                // say which layers, only two for now
                // say which layers, only two for now
                int topLayer;
                int topLayer;
+196 −225
Original line number Original line Diff line number Diff line
/******************************************************************/
/*******************************************************************/
/* fonctions membres des classes TRACK et derivees (voir struct.h */
/* Functions relatives to tracks, vias and zones(see class_track.h */
/******************************************************************/
/*******************************************************************/


#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "gr_basic.h"
@@ -23,10 +23,12 @@
/**************************************/
/**************************************/
void DbgDisplayTrackInfos( TRACK* track )
void DbgDisplayTrackInfos( TRACK* track )
/**************************************/
/**************************************/

/* Only for ratsnest debug
/* Only for ratsnest debug
 */
 */
{
{
    wxString msg;
    wxString msg;

    msg << wxT( "Netcode " ) << track->GetNet();
    msg << wxT( "Netcode " ) << track->GetNet();
    msg << wxT( " - " ) << track->GetSubNet();
    msg << wxT( " - " ) << track->GetSubNet();
    msg << wxT( "\nptrS " ) << (unsigned) track->start;
    msg << wxT( "\nptrS " ) << (unsigned) track->start;
@@ -36,16 +38,13 @@ wxString msg;
    wxMessageBox( msg );
    wxMessageBox( msg );
}
}


#endif

/**************************************/
/* Classes pour Pistes, Vias et Zones */
/**************************************/


/* Constructeur des classes type pistes, vias et zones */
#endif


/**********************************************************/
TRACK::TRACK( BOARD_ITEM* StructFather, KICAD_T idtype ) :
TRACK::TRACK( BOARD_ITEM* StructFather, KICAD_T idtype ) :
    BOARD_ITEM( StructFather, idtype )
    BOARD_ITEM( StructFather, idtype )
/**********************************************************/
{
{
    m_Width = 0;
    m_Width = 0;
    m_Shape = S_SEGMENT;
    m_Shape = S_SEGMENT;
@@ -57,7 +56,9 @@ TRACK::TRACK( BOARD_ITEM* StructFather, KICAD_T idtype ) :
}
}




/***************************/
wxString TRACK::ShowWidth()
wxString TRACK::ShowWidth()
/***************************/
{
{
    wxString msg;
    wxString msg;


@@ -109,10 +110,10 @@ TRACK::TRACK( const TRACK& Source ) :




/*  Because of the way SEGVIA and SEGZONE are derived from TRACK and because there are
/*  Because of the way SEGVIA and SEGZONE are derived from TRACK and because there are
    virtual functions being used, we can no longer simply copy a TRACK and
 *  virtual functions being used, we can no longer simply copy a TRACK and
    expect it to be a via or zone.  We must construct a true SEGVIA or SEGZONE so its constructor
 *  expect it to be a via or zone.  We must construct a true SEGVIA or SEGZONE so its constructor
    can initialize the virtual function table properly.  This factory type of
 *  can initialize the virtual function table properly.  This factory type of
    function called Copy() can duplicate either a TRACK, SEGVIA, or SEGZONE.
 *  function called Copy() can duplicate either a TRACK, SEGVIA, or SEGZONE.
 */
 */
TRACK* TRACK::Copy() const
TRACK* TRACK::Copy() const
{
{
@@ -129,7 +130,6 @@ TRACK* TRACK::Copy() const
}
}





/***********************/
/***********************/
bool TRACK::IsNull()
bool TRACK::IsNull()
/***********************/
/***********************/
@@ -232,21 +232,13 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
}
}




// see class_track.h
/***********************************************/
bool SEGVIA::IsOnLayer( int layer_number ) const
bool SEGVIA::IsOnLayer( int layer_number ) const
/***********************************************/
{
{
/* its the same logic, don't need this
/**
    int via_type = Shape();
 *  @param layer_number = layer number to test

 *  @return true if the via is on the layer layer_number
    if( via_type == VIA_NORMALE )
    {
        if( layer_number <= LAYER_CMP_N )
            return true;
        else
            return false;
    }

    // VIA_BORGNE ou  VIA_ENTERREE:
 */
 */


    int bottom_layer, top_layer;
    int bottom_layer, top_layer;
@@ -264,19 +256,18 @@ bool SEGVIA::IsOnLayer( int layer_number ) const
int TRACK::ReturnMaskLayer()
int TRACK::ReturnMaskLayer()
/***********************************/
/***********************************/


/* Retourne le masque (liste bit a bit ) des couches occupees par le segment
/* Return the mask layer for this.
 *  de piste pointe par PtSegm.
 *  for a via, there is more than one layer used
 *  Si PtSegm pointe une via, il y a plusieurs couches occupees
 */
 */
{
{
    if( Type() == TYPEVIA )
    if( Type() == TYPEVIA )
    {
    {
        int via_type = Shape();
        int via_type = Shape();


        if( via_type == VIA_NORMALE )
        if( via_type == THROUGH_VIA )
            return ALL_CU_LAYERS;
            return ALL_CU_LAYERS;


        // VIA_BORGNE ou  VIA_ENTERREE:
        // BLIND_VIA ou  BURIED_VIA:


        int bottom_layer, top_layer;
        int bottom_layer, top_layer;


@@ -300,13 +291,18 @@ int TRACK::ReturnMaskLayer()
void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
/*********************************************************/
/*********************************************************/


/* Met a jour .m_Layer pour une via:
/** Set the .m_Layer member param:
 *  m_Layer code les 2 couches limitant la via
 *  For a via m_Layer contains the 2 layers :
 * top layer and bottom layer used by the via.
 * The via connect all layers from top layer to bottom layer
 * 4 bits for the first layer and 4 next bits for the secaon layer
 * @param top_layer = first layer connected by the via
 * @param bottom_layer = last layer connected by the via
 */
 */
{
{
    int via_type = Shape();
    int via_type = Shape();


    if( via_type == VIA_NORMALE )
    if( via_type == THROUGH_VIA )
    {
    {
        top_layer    = LAYER_CMP_N;
        top_layer    = LAYER_CMP_N;
        bottom_layer = COPPER_LAYER_N;
        bottom_layer = COPPER_LAYER_N;
@@ -323,8 +319,10 @@ void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const
void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const
/*********************************************************************/
/*********************************************************************/


/* Retourne les 2 couches limitant la via
/* Return the 2 layers used by  the via (the via actually uses
 *  les pointeurs top_layer et bottom_layer peuvent etre NULLs
 * all layers between these 2 layers)
 *  @param top_layer = pointer to the first layer (can be null)
 *  @param bottom_layer = pointer to the last layer (can be null)
 */
 */
{
{
    int b_layer = (m_Layer >> 4) & 15;
    int b_layer = (m_Layer >> 4) & 15;
@@ -341,12 +339,11 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const
}
}




/* supprime du chainage la structure Struct
/* Remove this from the track linked list
 *  les structures arrieres et avant sont chainees directement
 */
 */
void TRACK::UnLink()
void TRACK::UnLink()
{
{
    /* Modification du chainage arriere */
    /* Remove the back link */
    if( Pback )
    if( Pback )
    {
    {
        if( Pback->Type() != TYPEPCB )
        if( Pback->Type() != TYPEPCB )
@@ -374,7 +371,7 @@ void TRACK::UnLink()
        }
        }
    }
    }


    /* Modification du chainage avant */
    /* Remove the forward link */
    if( Pnext )
    if( Pnext )
        Pnext->Pback = Pback;
        Pnext->Pback = Pback;


@@ -385,11 +382,16 @@ void TRACK::UnLink()
/************************************************************/
/************************************************************/
void TRACK::Insert( BOARD* Pcb, BOARD_ITEM* InsertPoint )
void TRACK::Insert( BOARD* Pcb, BOARD_ITEM* InsertPoint )
/************************************************************/
/************************************************************/

/* insert this (and its linked segments is exists)
 * in the track linked list
 * @param InsertPoint = insert point within the linked list
 * if NULL: insert as first element of Pcb->m_Tracks
 */
{
{
    TRACK* track;
    TRACK* track;
    TRACK* NextS;
    TRACK* NextS;


    /* Insertion du debut de la chaine a greffer */
    if( InsertPoint == NULL )
    if( InsertPoint == NULL )
    {
    {
        Pback = Pcb;
        Pback = Pcb;
@@ -399,7 +401,6 @@ void TRACK::Insert( BOARD* Pcb, BOARD_ITEM* InsertPoint )
            NextS = Pcb->m_Zone;
            NextS = Pcb->m_Zone;
            Pcb->m_Zone = (SEGZONE*) this;
            Pcb->m_Zone = (SEGZONE*) this;
        }
        }
        
        else    // put TRACK or SEGVIA on front of m_Track list
        else    // put TRACK or SEGVIA on front of m_Track list
        {
        {
            NextS = Pcb->m_Track;
            NextS = Pcb->m_Track;
@@ -413,12 +414,12 @@ void TRACK::Insert( BOARD* Pcb, BOARD_ITEM* InsertPoint )
        InsertPoint->Pnext = this;
        InsertPoint->Pnext = this;
    }
    }


    /* Chainage de la fin de la liste a greffer */
    /* Set the forward link */
    track = this;
    track = this;
    while( track->Pnext )
    while( track->Pnext )  // Search the end of added chain
        track = (TRACK*) track->Pnext;
        track = (TRACK*) track->Pnext;


    /* Track pointe la fin de la chaine a greffer */
    /* Link the end of chain */
    track->Pnext = NextS;
    track->Pnext = NextS;
    if( NextS )
    if( NextS )
        NextS->Pback = track;
        NextS->Pback = track;
@@ -429,11 +430,10 @@ void TRACK::Insert( BOARD* Pcb, BOARD_ITEM* InsertPoint )
TRACK* TRACK::GetBestInsertPoint( BOARD* Pcb )
TRACK* TRACK::GetBestInsertPoint( BOARD* Pcb )
/***********************************************/
/***********************************************/


/* Recherche du meilleur point d'insertion pour le nouveau segment de piste
/**
 *  Retourne
 *  Search the "best" insertion point within the track linked list
 *      un pointeur sur le segment de piste APRES lequel l'insertion
 *  the best point is the of the corresponding net code section
 *           doit se faire ( dernier segment du net d'apartenance )
 *  @return the item found in the linked list (or NULL if no track)
 *      NULL si pas de piste ( liste vide );
 */
 */
{
{
    TRACK* track, * NextTrack;
    TRACK* track, * NextTrack;
@@ -445,8 +445,8 @@ TRACK* TRACK::GetBestInsertPoint( BOARD* Pcb )


    /* Traitement du debut de liste */
    /* Traitement du debut de liste */
    if( track == NULL )
    if( track == NULL )
        return NULL;                    /* pas de piste ! */
        return NULL;                    /* No tracks ! */
    if( GetNet() < track->GetNet() )  /* insertion en tete de liste */
    if( GetNet() < track->GetNet() )    /* no net code or net code = 0 (track not connected) */
        return NULL;
        return NULL;


    while( (NextTrack = (TRACK*) track->Pnext) != NULL )
    while( (NextTrack = (TRACK*) track->Pnext) != NULL )
@@ -460,13 +460,13 @@ TRACK* TRACK::GetBestInsertPoint( BOARD* Pcb )
}
}




/* Recherche du debut du net
/*******************************************/
 *  ( les elements sont classes par net_code croissant )
 *  la recherche se fait a partir de this
 *  si net_code == -1 le netcode de this sera utilise
 *  Retourne un pointeur sur le debut du net, ou NULL si net non trouve
 */
TRACK* TRACK::GetStartNetCode( int NetCode )
TRACK* TRACK::GetStartNetCode( int NetCode )
/*******************************************/

/* Search (within the track linked list) the first segment matching the netcode
 * ( the linked list is always sorted by net codes )
 */
{
{
    TRACK* Track = this;
    TRACK* Track = this;
    int    ii    = 0;
    int    ii    = 0;
@@ -495,10 +495,13 @@ TRACK* TRACK::GetStartNetCode( int NetCode )
}
}




/* Recherche de la fin du net
/*****************************************/
 *  Retourne un pointeur sur la fin du net, ou NULL si net non trouve
 */
TRACK* TRACK::GetEndNetCode( int NetCode )
TRACK* TRACK::GetEndNetCode( int NetCode )
/*****************************************/

/* Search (within the track linked list) the last segment matching the netcode
 * ( the linked list is always sorted by net codes )
 */
{
{
    TRACK* NextS, * Track = this;
    TRACK* NextS, * Track = this;
    int    ii = 0;
    int    ii = 0;
@@ -531,43 +534,11 @@ TRACK* TRACK::GetEndNetCode( int NetCode )
}
}




#if 0
/**********************************/
TRACK* TRACK:: CopyList( int NbSegm  ) const
/**********************************/
/* Copie d'un Element ou d'une chaine de n elements
 *  Retourne un pointeur sur le nouvel element ou le debut de la
 *  nouvelle chaine
 */
{
    TRACK*        NewTrack;
    TRACK*        FirstTrack;
    TRACK*        OldTrack;
    const TRACK*  Source = this;
    
    FirstTrack = NewTrack = Source->Copy();

    for( int ii = 1; ii < NbSegm; ii++ )
    {
        Source = Source->Next();
        if( Source == NULL )
            break;
        
        OldTrack = NewTrack;
        
        NewTrack = Source->Copy();
        
        NewTrack->Insert( NULL, OldTrack );
    }

    return FirstTrack;
}
#endif


/********************************************/
/********************************************/
bool TRACK::WriteTrackDescr( FILE* File )
bool TRACK::WriteTrackDescr( FILE* File )
/********************************************/
/********************************************/
/* write a via description on file
*/
{
{
    int type = 0;
    int type = 0;


@@ -592,9 +563,10 @@ bool TRACK::WriteTrackDescr( FILE* File )
void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
/*********************************************************************/
/*********************************************************************/


/* routine de trace de 1 segment de piste.
/** Draws the segment.
 *  Parametres :
 *  @param panel = current panel
 *  draw_mode = mode ( GR_XOR, GR_OR..)
 *  @param DC = current device context
 *  @param draw_mode = GR_XOR, GR_OR..
 */
 */
{
{
    int l_piste;
    int l_piste;
@@ -608,7 +580,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )


    GRSetDrawMode( DC, draw_mode );
    GRSetDrawMode( DC, draw_mode );


    if( Type() == TYPEVIA ) /* VIA rencontree */
    if( Type() == TYPEVIA )
        color = g_DesignSettings.m_ViaColor[m_Shape];
        color = g_DesignSettings.m_ViaColor[m_Shape];
    else
    else
        color = g_DesignSettings.m_LayerColor[m_Layer];
        color = g_DesignSettings.m_LayerColor[m_Layer];
@@ -639,9 +611,10 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )


    l_piste = m_Width >> 1;
    l_piste = m_Width >> 1;


    if( Type() == TYPEVIA ) /* VIA rencontree */
    if( Type() == TYPEVIA ) /* The via is drawn as a circle */
    {
    {
        rayon = l_piste; if( rayon < zoom )
        rayon = l_piste;
        if( rayon < zoom )
            rayon = zoom;
            rayon = zoom;
        GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon, color );
        GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon, color );
        if( rayon > (4 * zoom) )
        if( rayon > (4 * zoom) )
@@ -650,7 +623,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
            GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
            GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
                      inner_rayon, color );
                      inner_rayon, color );


            // Draw the via hole if the display option request it
            // Draw the via hole if the display option allows it
            if( DisplayOpt.m_DisplayViaMode != VIA_HOLE_NOT_SHOW )
            if( DisplayOpt.m_DisplayViaMode != VIA_HOLE_NOT_SHOW )
            {
            {
                if( (DisplayOpt.m_DisplayViaMode == ALL_VIA_HOLE_SHOW)
                if( (DisplayOpt.m_DisplayViaMode == ALL_VIA_HOLE_SHOW)
@@ -685,7 +658,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
        }
        }
        else
        else
        {
        {
            if( l_piste <= zoom ) /* trace simplifie si l_piste/zoom <= 1 */
            if( l_piste <= zoom ) /* Sketch mode if l_piste/zoom <= 1 */
            {
            {
                GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon, color );
                GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon, color );
            }
            }
@@ -721,9 +694,9 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
                     m_End.x, m_End.y, m_Width, color );
                     m_End.x, m_End.y, m_Width, color );
    }
    }


    /* Trace de l'isolation (pour segments type CUIVRE et TRACK uniquement */
    /* Shows clearance (for tracks and vias, not for zone segments */
    if( DisplayOpt.DisplayTrackIsol && ( m_Layer <= CMP_N )
    if( DisplayOpt.DisplayTrackIsol && ( m_Layer <= CMP_N )
       && ( Type() == TYPETRACK ) )
       && ( Type() == TYPETRACK || Type() == TYPEVIA) )
    {
    {
        GRCSegm( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
        GRCSegm( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
                 m_End.x, m_End.y,
                 m_End.x, m_End.y,
@@ -737,6 +710,7 @@ void TRACK::Display_Infos( WinEDA_DrawFrame* frame )
{
{
    wxString msg;
    wxString msg;
    int      text_pos;
    int      text_pos;

#ifdef RATSNET_DEBUG
#ifdef RATSNET_DEBUG
    DbgDisplayTrackInfos( this );
    DbgDisplayTrackInfos( this );
#endif
#endif
@@ -763,7 +737,7 @@ DbgDisplayTrackInfos(this);
    text_pos = 1;
    text_pos = 1;
    Affiche_1_Parametre( frame, text_pos, _( "Type" ), msg, DARKCYAN );
    Affiche_1_Parametre( frame, text_pos, _( "Type" ), msg, DARKCYAN );


    /* Affiche NetName pour les segments de piste type cuivre */
    /* Display NetName pour les segments de piste type cuivre */
    text_pos += 15;
    text_pos += 15;
    if(  Type() == TYPETRACK
    if(  Type() == TYPETRACK
         || Type() == TYPEZONE
         || Type() == TYPEZONE
@@ -778,7 +752,7 @@ DbgDisplayTrackInfos(this);


        Affiche_1_Parametre( frame, text_pos, _( "NetName" ), msg, RED );
        Affiche_1_Parametre( frame, text_pos, _( "NetName" ), msg, RED );


        /* Affiche net code :*/
        /* Display net code : (usefull in test or debug) */
        msg.Printf( wxT( "%d .%d" ), GetNet(), GetSubNet() );
        msg.Printf( wxT( "%d .%d" ), GetNet(), GetSubNet() );
        text_pos += 18;
        text_pos += 18;
        Affiche_1_Parametre( frame, text_pos, _( "NetCode" ), msg, RED );
        Affiche_1_Parametre( frame, text_pos, _( "NetCode" ), msg, RED );
@@ -792,7 +766,7 @@ DbgDisplayTrackInfos(this);
            Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Standard" ), RED );
            Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Standard" ), RED );
    }
    }


    /* Affiche les flags Status piste */
    /* Display the Status flags */
    msg = wxT( ". . " );
    msg = wxT( ". . " );
    if( GetState( SEGM_FIXE ) )
    if( GetState( SEGM_FIXE ) )
        msg[0] = 'F';
        msg[0] = 'F';
@@ -803,7 +777,7 @@ DbgDisplayTrackInfos(this);
    text_pos = 42;
    text_pos = 42;
    Affiche_1_Parametre( frame, text_pos, _( "Stat" ), msg, MAGENTA );
    Affiche_1_Parametre( frame, text_pos, _( "Stat" ), msg, MAGENTA );


    /* Affiche Layer(s) */
    /* Display layer or layer pair) */
    if( Type() == TYPEVIA )
    if( Type() == TYPEVIA )
    {
    {
        SEGVIA* Via = (SEGVIA*) this;
        SEGVIA* Via = (SEGVIA*) this;
@@ -819,7 +793,7 @@ DbgDisplayTrackInfos(this);
    text_pos += 5;
    text_pos += 5;
    Affiche_1_Parametre( frame, text_pos, _( "Layer" ), msg, BROWN );
    Affiche_1_Parametre( frame, text_pos, _( "Layer" ), msg, BROWN );


    /* Affiche Epaisseur */
    /* Display width */
    valeur_param( (unsigned) m_Width, msg );
    valeur_param( (unsigned) m_Width, msg );
    text_pos += 11;
    text_pos += 11;


@@ -890,7 +864,6 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
}
}





#if defined (DEBUG)
#if defined (DEBUG)


/**
/**
@@ -903,9 +876,11 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
void TRACK::Show( int nestLevel, std::ostream& os )
void TRACK::Show( int nestLevel, std::ostream& os )
{
{
    NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
    NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<

//        " shape=\""     << m_Shape      << '"' <<
//        " shape=\""     << m_Shape      << '"' <<
    " layer=\"" << m_Layer << '"' <<
    " layer=\"" << m_Layer << '"' <<
    " width=\"" << m_Width << '"' <<
    " width=\"" << m_Width << '"' <<

//        " drill=\""     << m_Drill      << '"' <<
//        " drill=\""     << m_Drill      << '"' <<
    " netcode=\"" << GetNet() << "\">" <<
    " netcode=\"" << GetNet() << "\">" <<
    "<start" << m_Start << "/>" <<
    "<start" << m_Start << "/>" <<
@@ -928,15 +903,15 @@ void SEGVIA::Show( int nestLevel, std::ostream& os )


    switch( Shape() )
    switch( Shape() )
    {
    {
    case VIA_NORMALE:
    case THROUGH_VIA:
        cp = "through";
        cp = "through";
        break;
        break;


    case VIA_ENTERREE:
    case BURIED_VIA:
        cp = "blind";
        cp = "blind";
        break;
        break;


    case VIA_BORGNE:
    case BLIND_VIA:
        cp = "buried";
        cp = "buried";
        break;
        break;


@@ -964,8 +939,4 @@ void SEGVIA::Show( int nestLevel, std::ostream& os )
}
}








#endif
#endif
+10 −12
Original line number Original line Diff line number Diff line
/*******************************************************************/
/*******************************************************************/
/*	class_track.h: definition des structures de donnees type track */
/*	class_track.h: definitions relatives to tracks, vias and zones */
/*******************************************************************/
/*******************************************************************/


#ifndef CLASS_TRACK_H
#ifndef CLASS_TRACK_H
@@ -15,10 +15,6 @@
#define NOT_DEFINED_VIA  0              /* reserved (unused) */
#define NOT_DEFINED_VIA  0              /* reserved (unused) */
#define SQUARE_VIA_SHAPE 0x80000000     /* Flag pour forme carree */
#define SQUARE_VIA_SHAPE 0x80000000     /* Flag pour forme carree */


#define VIA_NORMALE     THROUGH_VIA
#define VIA_ENTERREE    BURIED_VIA
#define VIA_BORGNE      BLIND_VIA

/***/
/***/


class TRACK : public BOARD_ITEM
class TRACK : public BOARD_ITEM
@@ -78,18 +74,20 @@ public:
     */
     */
    void    Insert( BOARD* Pcb, BOARD_ITEM* InsertPoint );
    void    Insert( BOARD* Pcb, BOARD_ITEM* InsertPoint );


    /* Recherche du meilleur point d'insertion */
/*Search the "best" insertion point within the track linked list
 *  the best point is the of the corresponding net code section
 *  @return the item found in the linked list (or NULL if no track)
 */
    TRACK*  GetBestInsertPoint( BOARD* Pcb );
    TRACK*  GetBestInsertPoint( BOARD* Pcb );


    /* Copie d'un Element d'une chaine de n elements
    /* Search (within the track linked list) the first segment matching the netcode
     *  TRACK*  CopyList( int NbSegm = 1 ) const;
     * ( the linked list is always sorted by net codes )
     */
     */

    /* Recherche du debut du net
     *  ( les elements sont classes par net_code croissant ) */
    TRACK*  GetStartNetCode( int NetCode );
    TRACK*  GetStartNetCode( int NetCode );


    /* Recherche de la fin du net */
    /* Search (within the track linked list) the last segment matching the netcode
     * ( the linked list is always sorted by net codes )
     */
    TRACK*  GetEndNetCode( int NetCode );
    TRACK*  GetEndNetCode( int NetCode );


    /**
    /**
Loading