← Back to team overview

kicad-developers team mailing list archive

Data encapsulation in class_track

 

Hi

I found that in class_track data is not hided as in C++ specific way it
should be. Maybe there is some reasons, but there is Set and Get functions
to manipulate those variables too, witch are public. I tested to change
them protected. And there are only few places, where I must change more
code than only change those variables to function calls.  Change in file
class_track.h is as follows:

=== modified file 'pcbnew/class_track.h'
--- pcbnew/class_track.h    2012-09-01 13:38:27 +0000
+++ pcbnew/class_track.h    2013-01-06 10:16:52 +0000
@@ -77,14 +77,12 @@
     void SetNext( EDA_ITEM* aNext )       { Pnext = aNext; }
     void SetBack( EDA_ITEM* aBack )       { Pback = aBack; }

-
-public:
+protected:
     int         m_Width;            // Thickness of track, or via diameter
     wxPoint     m_Start;            // Line start point
     wxPoint     m_End;              // Line end point
     int         m_Shape;            // vias: shape and type, Track =
shape..

-protected:
     int         m_Drill;            // for vias: via drill (- 1 for
default value)

 public:
@@ -93,7 +91,6 @@

     double      m_Param;            // Auxiliary variable ( used in some
computations )

-public:
     TRACK( BOARD_ITEM* aParent, KICAD_T idtype = PCB_TRACE_T );

     // Do not create a copy constructor.  The one generated by the
compiler is adequate.


And whole changes are in attach.

Sorry, but I had to test this, because I want to make and develop as good
C++ code as possible. And this is only suggestion. But code is much more
safe, when data is encapsulated.


Heikki
=== modified file '3d-viewer/3d_draw.cpp'
--- 3d-viewer/3d_draw.cpp	2012-12-15 08:52:02 +0000
+++ 3d-viewer/3d_draw.cpp	2013-01-06 12:53:19 +0000
@@ -464,8 +464,8 @@
     SetGLColor( color );
     glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) );
 
-    Draw3D_SolidSegment( aTrack->m_Start, aTrack->m_End,
-                         aTrack->m_Width, thickness, zpos,
+    Draw3D_SolidSegment( aTrack->GetStart(), aTrack->GetEnd(),
+                         aTrack->GetWidth(), thickness, zpos,
                          g_Parm_3D_Visu.m_BiuTo3Dunits );
 }
 
@@ -475,7 +475,7 @@
     int    color;
     double biu_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits ;
 
-    int outer_radius = via->m_Width / 2;
+    int outer_radius = via->GetWidth() / 2;
     int inner_radius = via->GetDrillValue() / 2;
     int thickness = g_Parm_3D_Visu.GetCopperThicknessBIU();
 
@@ -504,7 +504,7 @@
         SetGLColor( color );
         glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) );
 
-        Draw3D_ZaxisCylinder( via->m_Start, (outer_radius + inner_radius)/2,
+        Draw3D_ZaxisCylinder( via->GetStart(), (outer_radius + inner_radius)/2,
                                   thickness, outer_radius - inner_radius,
                                   zpos, biu_to_3Dunits );
         if( layer >= top_layer )
@@ -512,13 +512,13 @@
     }
 
     // Drawing via hole:
-    color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + via->m_Shape );
+    color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + via->GetShape() );
     SetGLColor( color );
     int height = g_Parm_3D_Visu.GetLayerZcoordBIU(top_layer) -
                  g_Parm_3D_Visu.GetLayerZcoordBIU( bottom_layer );
     int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU(bottom_layer) + thickness/2;
 
-    Draw3D_ZaxisCylinder( via->m_Start, inner_radius + thickness/2, height,
+    Draw3D_ZaxisCylinder( via->GetStart(), inner_radius + thickness/2, height,
                           thickness, zpos, biu_to_3Dunits );
 }
 

=== modified file 'pcbnew/autorouter/autoplac.cpp'
--- pcbnew/autorouter/autoplac.cpp	2012-09-22 11:19:37 +0000
+++ pcbnew/autorouter/autoplac.cpp	2013-01-06 16:34:11 +0000
@@ -461,7 +461,7 @@
 
     TmpSegm.SetLayer( -1 );
     TmpSegm.SetNet( -1 );
-    TmpSegm.m_Width = RoutingMatrix.m_GridRouting / 2;
+    TmpSegm.SetWidth( RoutingMatrix.m_GridRouting / 2 );
 
     EDA_ITEM* PtStruct = GetBoard()->m_Drawings;
 

=== modified file 'pcbnew/autorouter/graphpcb.cpp'
--- pcbnew/autorouter/graphpcb.cpp	2012-06-26 17:57:37 +0000
+++ pcbnew/autorouter/graphpcb.cpp	2013-01-06 18:02:07 +0000
@@ -262,13 +262,13 @@
     int half_width;
     int ux0, uy0, ux1, uy1;
 
-    half_width = ( pt_segm->m_Width / 2 ) + marge;
+    half_width = ( pt_segm->GetWidth() / 2 ) + marge;
 
     // Calculate the bounding rectangle of the segment (if H, V or Via)
-    ux0 = pt_segm->m_Start.x - RoutingMatrix.GetBrdCoordOrigin().x;
-    uy0 = pt_segm->m_Start.y - RoutingMatrix.GetBrdCoordOrigin().y;
-    ux1 = pt_segm->m_End.x - RoutingMatrix.GetBrdCoordOrigin().x;
-    uy1 = pt_segm->m_End.y - RoutingMatrix.GetBrdCoordOrigin().y;
+    ux0 = pt_segm->GetStart().x - RoutingMatrix.GetBrdCoordOrigin().x;
+    uy0 = pt_segm->GetStart().y - RoutingMatrix.GetBrdCoordOrigin().y;
+    ux1 = pt_segm->GetEnd().x - RoutingMatrix.GetBrdCoordOrigin().x;
+    uy1 = pt_segm->GetEnd().y - RoutingMatrix.GetBrdCoordOrigin().y;
 
     // Test if VIA (filled circle was drawn)
     if( pt_segm->Type() == PCB_VIA_T )
@@ -290,7 +290,7 @@
             mask_layer = -1;
 
         if( mask_layer )
-            TraceFilledCircle( pt_segm->m_Start.x, pt_segm->m_Start.y,
+            TraceFilledCircle( pt_segm->GetStart().x, pt_segm->GetStart().y,
                                half_width, mask_layer, color, op_logic );
         return;
     }
@@ -301,13 +301,13 @@
         layer = -1;
 
     // The segment is here a straight line or a circle or an arc.:
-    if( pt_segm->m_Shape == S_CIRCLE )
+    if( pt_segm->GetShape() == S_CIRCLE )
     {
         TraceCircle( ux0, uy0, ux1, uy1, half_width, layer, color, op_logic );
         return;
     }
 
-    if( pt_segm->m_Shape == S_ARC )
+    if( pt_segm->GetShape() == S_ARC )
     {
         TraceArc( ux0, uy0, ux1, uy1, pt_segm->m_Param, half_width, layer, color, op_logic );
         return;

=== modified file 'pcbnew/autorouter/solve.cpp'
--- pcbnew/autorouter/solve.cpp	2012-09-02 16:38:52 +0000
+++ pcbnew/autorouter/solve.cpp	2013-01-06 17:56:56 +0000
@@ -1169,16 +1169,14 @@
         g_CurrentTrackSegment->SetState( TRACK_AR, ON );
         g_CurrentTrackSegment->SetLayer( 0x0F );
 
-        g_CurrentTrackSegment->m_Start.x   =
-            g_CurrentTrackSegment->m_End.x = pcb->GetBoundingBox().GetX() +
-                                             ( RoutingMatrix.m_GridRouting * row );
-
-        g_CurrentTrackSegment->m_Start.y   =
-            g_CurrentTrackSegment->m_End.y = pcb->GetBoundingBox().GetY() +
-                                             ( RoutingMatrix.m_GridRouting * col );
-
-        g_CurrentTrackSegment->m_Width = pcb->GetCurrentViaSize();
-        g_CurrentTrackSegment->m_Shape = pcb->GetDesignSettings().m_CurrentViaType;
+        g_CurrentTrackSegment->SetStart(wxPoint( pcb->GetBoundingBox().GetX() +
+                                                ( RoutingMatrix.m_GridRouting * row ), 
+                                                pcb->GetBoundingBox().GetY() +
+                                                ( RoutingMatrix.m_GridRouting * col )));
+        g_CurrentTrackSegment->SetEnd( g_CurrentTrackSegment->GetStart() );
+            
+        g_CurrentTrackSegment->SetWidth( pcb->GetCurrentViaSize() );
+        g_CurrentTrackSegment->SetShape( pcb->GetDesignSettings().m_CurrentViaType );
 
         g_CurrentTrackSegment->SetNet( current_net_code );
     }
@@ -1194,35 +1192,34 @@
             g_CurrentTrackSegment->SetLayer( Route_Layer_TOP );
 
         g_CurrentTrackSegment->SetState( TRACK_AR, ON );
-        g_CurrentTrackSegment->m_End.x = pcb->GetBoundingBox().GetX() +
-                                         ( RoutingMatrix.m_GridRouting * row );
-        g_CurrentTrackSegment->m_End.y = pcb->GetBoundingBox().GetY() +
-                                         ( RoutingMatrix.m_GridRouting * col );
+        g_CurrentTrackSegment->SetEnd( wxPoint( pcb->GetBoundingBox().GetX() +
+                                         ( RoutingMatrix.m_GridRouting * row ),
+                                         pcb->GetBoundingBox().GetY() +
+                                         ( RoutingMatrix.m_GridRouting * col )));
         g_CurrentTrackSegment->SetNet( current_net_code );
 
         if( g_CurrentTrackSegment->Back() == NULL ) /* Start trace. */
         {
-            g_CurrentTrackSegment->m_Start.x = segm_fX;
-            g_CurrentTrackSegment->m_Start.y = segm_fY;
+            g_CurrentTrackSegment->SetStart( wxPoint( segm_fX, segm_fY ) );
 
             /* Placement on the center of the pad if outside grid. */
-            dx1 = g_CurrentTrackSegment->m_End.x - g_CurrentTrackSegment->m_Start.x;
-            dy1 = g_CurrentTrackSegment->m_End.y - g_CurrentTrackSegment->m_Start.y;
+            dx1 = g_CurrentTrackSegment->GetEnd().x - g_CurrentTrackSegment->GetStart().x;
+            dy1 = g_CurrentTrackSegment->GetEnd().y - g_CurrentTrackSegment->GetStart().y;
 
-            dx0 = pt_cur_ch->m_PadEnd->GetPosition().x - g_CurrentTrackSegment->m_Start.x;
-            dy0 = pt_cur_ch->m_PadEnd->GetPosition().y - g_CurrentTrackSegment->m_Start.y;
+            dx0 = pt_cur_ch->m_PadEnd->GetPosition().x - g_CurrentTrackSegment->GetStart().x;
+            dy0 = pt_cur_ch->m_PadEnd->GetPosition().y - g_CurrentTrackSegment->GetStart().y;
 
             /* If aligned, change the origin point. */
             if( abs( dx0 * dy1 ) == abs( dx1 * dy0 ) )
             {
-                g_CurrentTrackSegment->m_Start = pt_cur_ch->m_PadEnd->GetPosition();
+                g_CurrentTrackSegment->SetStart( pt_cur_ch->m_PadEnd->GetPosition() );
             }
             else    // Creation of a supplemental segment
             {
-                g_CurrentTrackSegment->m_Start = pt_cur_ch->m_PadEnd->GetPosition();
+                g_CurrentTrackSegment->SetStart( pt_cur_ch->m_PadEnd->GetPosition() );
 
                 newTrack = (TRACK*)g_CurrentTrackSegment->Clone();
-                newTrack->m_Start = g_CurrentTrackSegment->m_End;
+                newTrack->SetStart( g_CurrentTrackSegment->GetEnd());
 
                 g_CurrentTrackList.PushBack( newTrack );
             }
@@ -1231,28 +1228,28 @@
         {
             if( g_CurrentTrackSegment->Back() )
             {
-                g_CurrentTrackSegment->m_Start = g_CurrentTrackSegment->Back()->m_End;
+                g_CurrentTrackSegment->SetStart( g_CurrentTrackSegment->Back()->GetEnd() );
             }
         }
 
-        g_CurrentTrackSegment->m_Width = pcb->GetCurrentTrackWidth();
+        g_CurrentTrackSegment->SetWidth( pcb->GetCurrentTrackWidth() );
 
-        if( g_CurrentTrackSegment->m_Start != g_CurrentTrackSegment->m_End )
+        if( g_CurrentTrackSegment->GetStart() != g_CurrentTrackSegment->GetEnd() )
         {
             /* Reduce aligned segments by one. */
             TRACK* oldTrack = g_CurrentTrackSegment->Back();
 
             if( oldTrack &&  oldTrack->Type() != PCB_VIA_T )
             {
-                dx1 = g_CurrentTrackSegment->m_End.x - g_CurrentTrackSegment->m_Start.x;
-                dy1 = g_CurrentTrackSegment->m_End.y - g_CurrentTrackSegment->m_Start.y;
+                dx1 = g_CurrentTrackSegment->GetEnd().x - g_CurrentTrackSegment->GetStart().x;
+                dy1 = g_CurrentTrackSegment->GetEnd().y - g_CurrentTrackSegment->GetStart().y;
 
-                dx0 = oldTrack->m_End.x - oldTrack->m_Start.x;
-                dy0 = oldTrack->m_End.y - oldTrack->m_Start.y;
+                dx0 = oldTrack->GetEnd().x - oldTrack->GetStart().x;
+                dy0 = oldTrack->GetEnd().y - oldTrack->GetStart().y;
 
                 if( abs( dx0 * dy1 ) == abs( dx1 * dy0 ) )
                 {
-                    oldTrack->m_End = g_CurrentTrackSegment->m_End;
+                    oldTrack->SetEnd( g_CurrentTrackSegment->GetEnd() );
 
                     delete g_CurrentTrackList.PopBack();
                 }
@@ -1280,24 +1277,24 @@
     marge = s_Clearance + ( pcbframe->GetBoard()->GetCurrentTrackWidth() / 2 );
     via_marge = s_Clearance + ( pcbframe->GetBoard()->GetCurrentViaSize() / 2 );
 
-    dx1 = g_CurrentTrackSegment->m_End.x - g_CurrentTrackSegment->m_Start.x;
-    dy1 = g_CurrentTrackSegment->m_End.y - g_CurrentTrackSegment->m_Start.y;
+    dx1 = g_CurrentTrackSegment->GetEnd().x - g_CurrentTrackSegment->GetStart().x;
+    dy1 = g_CurrentTrackSegment->GetEnd().y - g_CurrentTrackSegment->GetStart().y;
 
     /* Place on center of pad if off grid. */
-    dx0 = pt_cur_ch->m_PadStart->GetPosition().x - g_CurrentTrackSegment->m_Start.x;
-    dy0 = pt_cur_ch->m_PadStart->GetPosition().y - g_CurrentTrackSegment->m_Start.y;
+    dx0 = pt_cur_ch->m_PadStart->GetPosition().x - g_CurrentTrackSegment->GetStart().x;
+    dy0 = pt_cur_ch->m_PadStart->GetPosition().y - g_CurrentTrackSegment->GetStart().y;
 
     /* If aligned, change the origin point. */
     if( abs( dx0 * dy1 ) == abs( dx1 * dy0 ) )
     {
-        g_CurrentTrackSegment->m_End = pt_cur_ch->m_PadStart->GetPosition();
+        g_CurrentTrackSegment->SetEnd( pt_cur_ch->m_PadStart->GetPosition() );
     }
     else
     {
         TRACK* newTrack = (TRACK*)g_CurrentTrackSegment->Clone();
 
-        newTrack->m_End   = pt_cur_ch->m_PadStart->GetPosition();
-        newTrack->m_Start = g_CurrentTrackSegment->m_End;
+        newTrack->SetEnd( pt_cur_ch->m_PadStart->GetPosition() );
+        newTrack->SetStart( g_CurrentTrackSegment->GetEnd() );
 
         g_CurrentTrackList.PushBack( newTrack );
     }

=== modified file 'pcbnew/board_undo_redo.cpp'
--- pcbnew/board_undo_redo.cpp	2012-12-23 10:53:54 +0000
+++ pcbnew/board_undo_redo.cpp	2013-01-07 11:11:50 +0000
@@ -245,11 +245,12 @@
         {
             TRACK* track = (TRACK*) aItem;
             TRACK* image = (TRACK*) aImage;
-            EXCHG( track->m_Start, image->m_Start );
-            EXCHG( track->m_End, image->m_End );
-            EXCHG( track->m_Width, image->m_Width );
-            EXCHG( track->m_Shape, image->m_Shape );
-            int atmp = track->GetDrillValue();
+            wxPoint exchp = track->GetStart(); track->SetStart(image->GetStart()); image->SetStart(exchp);
+            exchp = track->GetEnd(); track->SetEnd(image->GetEnd()); image->SetEnd(exchp);
+            int atmp = track->GetWidth(); track->SetWidth(image->GetWidth()); image->SetWidth(atmp);
+            atmp = track->GetShape(); track->SetShape(image->GetShape()); image->SetShape(atmp);
+            
+            atmp = track->GetDrillValue();
 
             if( track->IsDrillDefault() )
                 atmp = -1;

=== modified file 'pcbnew/class_board.cpp'
--- pcbnew/class_board.cpp	2012-12-12 11:57:17 +0000
+++ pcbnew/class_board.cpp	2013-01-06 10:23:44 +0000
@@ -213,13 +213,13 @@
              */
             aLayerMask = candidate->ReturnMaskLayer();
 
-            if( aPosition == candidate->m_Start )
+            if( aPosition == candidate->GetStart() )
             {
-                aPosition = candidate->m_End;
+                aPosition = candidate->GetEnd();
             }
             else
             {
-                aPosition = candidate->m_Start;
+                aPosition = candidate->GetStart();
             }
 
             segment = m_Track; /* restart list of tracks to analyze */
@@ -1594,7 +1594,7 @@
         if( track->Type() != PCB_VIA_T )
             continue;
 
-        if( track->m_Start != aPosition )
+        if( track->GetStart() != aPosition )
             continue;
 
         if( track->GetState( BUSY | IS_DELETED ) )
@@ -1636,11 +1636,11 @@
 
     if( aEndPoint == FLG_START )
     {
-        aPosition = aTrace->m_Start;
+        aPosition = aTrace->GetStart();
     }
     else
     {
-        aPosition = aTrace->m_End;
+        aPosition = aTrace->GetEnd();
     }
 
     for( MODULE* module = m_Modules;  module;  module = module->Next() )
@@ -1860,16 +1860,16 @@
     if( aTrace->Type() == PCB_VIA_T )
     {
         TRACK* Segm1, * Segm2 = NULL, * Segm3 = NULL;
-        Segm1 = ::GetTrace( m_Track, NULL, aTrace->m_Start, layerMask );
+        Segm1 = ::GetTrace( m_Track, NULL, aTrace->GetStart(), layerMask );
 
         if( Segm1 )
         {
-            Segm2 = ::GetTrace( Segm1->Next(), NULL, aTrace->m_Start, layerMask );
+            Segm2 = ::GetTrace( Segm1->Next(), NULL, aTrace->GetStart(), layerMask );
         }
 
         if( Segm2 )
         {
-            Segm3 = ::GetTrace( Segm2->Next(), NULL, aTrace->m_Start, layerMask );
+            Segm3 = ::GetTrace( Segm2->Next(), NULL, aTrace->GetStart(), layerMask );
         }
 
         if( Segm3 ) // More than 2 segments are connected to this via. the track" is only this via
@@ -1883,19 +1883,19 @@
         if( Segm1 ) // search for others segments connected to the initial segment start point
         {
             layerMask = Segm1->ReturnMaskLayer();
-            chainMarkedSegments( aTrace->m_Start, layerMask, &trackList );
+            chainMarkedSegments( aTrace->GetStart(), layerMask, &trackList );
         }
 
         if( Segm2 ) // search for others segments connected to the initial segment end point
         {
             layerMask = Segm2->ReturnMaskLayer();
-            chainMarkedSegments( aTrace->m_Start, layerMask, &trackList );
+            chainMarkedSegments( aTrace->GetStart(), layerMask, &trackList );
         }
     }
     else    // mark the chain using both ends of the initial segment
     {
-        chainMarkedSegments( aTrace->m_Start, layerMask, &trackList );
-        chainMarkedSegments( aTrace->m_End, layerMask, &trackList );
+        chainMarkedSegments( aTrace->GetStart(), layerMask, &trackList );
+        chainMarkedSegments( aTrace->GetEnd(), layerMask, &trackList );
     }
 
     // Now examine selected vias and flag them if they are on the track
@@ -1917,7 +1917,7 @@
 
         layerMask = via->ReturnMaskLayer();
 
-        TRACK* track = ::GetTrace( m_Track, NULL, via->m_Start, layerMask );
+        TRACK* track = ::GetTrace( m_Track, NULL, via->GetStart(), layerMask );
 
         // GetTrace does not consider tracks flagged BUSY.
         // So if no connected track found, this via is on the current track
@@ -1939,7 +1939,7 @@
          */
         int layer = track->GetLayer();
 
-        while( ( track = ::GetTrace( track->Next(), NULL, via->m_Start, layerMask ) ) != NULL )
+        while( ( track = ::GetTrace( track->Next(), NULL, via->GetStart(), layerMask ) ) != NULL )
         {
             if( layer != track->GetLayer() )
             {
@@ -2167,21 +2167,21 @@
      * The new segment starts from aPosition and ends at the end point of
      * aSegment. The original segment now ends at aPosition.
      */
-    if( aSegment->m_Start == aPosition || aSegment->m_End == aPosition )
+    if( aSegment->GetStart() == aPosition || aSegment->GetEnd() == aPosition )
         return NULL;
 
     /* A via is a good lock point */
     if( aSegment->Type() == PCB_VIA_T )
     {
-        aPosition = aSegment->m_Start;
+        aPosition = aSegment->GetStart();
         return aSegment;
     }
 
     // Calculation coordinate of intermediate point relative to the start point of aSegment
-     wxPoint delta = aSegment->m_End - aSegment->m_Start;
+     wxPoint delta = aSegment->GetEnd() - aSegment->GetStart();
 
-    // calculate coordinates of aPosition relative to aSegment->m_Start
-    wxPoint lockPoint = aPosition - aSegment->m_Start;
+    // calculate coordinates of aPosition relative to aSegment->GetStart()
+    wxPoint lockPoint = aPosition - aSegment->GetStart();
 
     // lockPoint must be on aSegment:
     // Ensure lockPoint.y/lockPoint.y = delta.y/delta.x
@@ -2193,11 +2193,11 @@
     /* Create the intermediate point (that is to say creation of a new
      * segment, beginning at the intermediate point.
      */
-    lockPoint += aSegment->m_Start;
+    lockPoint += aSegment->GetStart();
 
     TRACK* newTrack = (TRACK*)aSegment->Clone();
     // The new segment begins at the new point,
-    newTrack->m_Start = lockPoint;
+    newTrack->SetStart(lockPoint);
     newTrack->start = aSegment;
     newTrack->SetState( BEGIN_ONPAD, OFF );
 
@@ -2219,7 +2219,7 @@
     }
 
     // Old track segment now ends at new point.
-    aSegment->m_End = lockPoint;
+    aSegment->SetEnd(lockPoint);
     aSegment->end = newTrack;
     aSegment->SetState( END_ONPAD, OFF );
 

=== modified file 'pcbnew/class_track.cpp'
--- pcbnew/class_track.cpp	2012-12-27 16:42:41 +0000
+++ pcbnew/class_track.cpp	2013-01-06 12:02:59 +0000
@@ -96,13 +96,13 @@
     {
         if( PtSegm->GetState( IS_DELETED | BUSY ) == 0 )
         {
-            if( aPosition == PtSegm->m_Start )
+            if( aPosition == PtSegm->GetStart() )
             {
                 if( aLayerMask & PtSegm->ReturnMaskLayer() )
                     return PtSegm;
             }
 
-            if( aPosition == PtSegm->m_End )
+            if( aPosition == PtSegm->GetEnd() )
             {
                 if( aLayerMask & PtSegm->ReturnMaskLayer() )
                     return PtSegm;

=== modified file 'pcbnew/class_track.h'
--- pcbnew/class_track.h	2012-09-01 13:38:27 +0000
+++ pcbnew/class_track.h	2013-01-06 10:16:52 +0000
@@ -77,14 +77,12 @@
     void SetNext( EDA_ITEM* aNext )       { Pnext = aNext; }
     void SetBack( EDA_ITEM* aBack )       { Pback = aBack; }
 
-
-public:
+protected:
     int         m_Width;            // Thickness of track, or via diameter
     wxPoint     m_Start;            // Line start point
     wxPoint     m_End;              // Line end point
     int         m_Shape;            // vias: shape and type, Track = shape..
 
-protected:
     int         m_Drill;            // for vias: via drill (- 1 for default value)
 
 public:
@@ -93,7 +91,6 @@
 
     double      m_Param;            // Auxiliary variable ( used in some computations )
 
-public:
     TRACK( BOARD_ITEM* aParent, KICAD_T idtype = PCB_TRACE_T );
 
     // Do not create a copy constructor.  The one generated by the compiler is adequate.

=== modified file 'pcbnew/clean.cpp'
--- pcbnew/clean.cpp	2012-09-11 07:33:17 +0000
+++ pcbnew/clean.cpp	2013-01-07 14:08:49 +0000
@@ -218,8 +218,8 @@
         // Correct via m_End defects (if any)
         if( track->Type() == PCB_VIA_T )
         {
-            if( track->m_Start != track->m_End )
-                track->m_End = track->m_Start;
+            if( track->GetStart() != track->GetEnd() )
+                track->SetEnd( track->GetStart() );
         }
 
         if( track->GetShape() != VIA_THROUGH )
@@ -232,10 +232,10 @@
         {
             next_track = alt_track->Next();
 
-            if( alt_track->m_Shape != VIA_THROUGH )
+            if( alt_track->GetShape() != VIA_THROUGH )
                 continue;
 
-            if( alt_track->m_Start != track->m_Start )
+            if( alt_track->GetStart() != track->GetStart() )
                 continue;
 
             // delete via
@@ -250,7 +250,7 @@
     {
         next_track = track->Next();
 
-        if( track->m_Shape != VIA_THROUGH )
+        if( track->GetShape() != VIA_THROUGH )
             continue;
 
         // Examine the list of connected pads:
@@ -319,13 +319,13 @@
                 {
                     if( track->Type() != PCB_VIA_T )
                     {
-                        zone = m_Brd->HitTestForAnyFilledArea( track->m_Start,
+                        zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(),
                                                                track->GetLayer() );
                     }
                     else
                     {
                         ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer );
-                        zone = m_Brd->HitTestForAnyFilledArea( track->m_Start,
+                        zone = m_Brd->HitTestForAnyFilledArea( track->GetStart(),
                                                                top_layer, bottom_layer );
                     }
                 }
@@ -352,7 +352,7 @@
                         if( other == NULL )
                         {
                             via->ReturnLayerPair( &top_layer, &bottom_layer );
-                            zone = m_Brd->HitTestForAnyFilledArea( via->m_Start,
+                            zone = m_Brd->HitTestForAnyFilledArea( via->GetStart(),
                                                                    bottom_layer, top_layer );
                         }
 
@@ -374,13 +374,13 @@
                 {
                     if( track->Type() != PCB_VIA_T )
                     {
-                        zone = m_Brd->HitTestForAnyFilledArea( track->m_End,
+                        zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(),
                                                                track->GetLayer() );
                     }
                     else
                     {
                         ((SEGVIA*)track)->ReturnLayerPair( &top_layer, &bottom_layer );
-                        zone = m_Brd->HitTestForAnyFilledArea( track->m_End,
+                        zone = m_Brd->HitTestForAnyFilledArea( track->GetEnd(),
                                                                top_layer, bottom_layer );
                     }
                 }
@@ -408,7 +408,7 @@
                         if( other == NULL )
                         {
                             via->ReturnLayerPair( &top_layer, &bottom_layer );
-                            zone = m_Brd->HitTestForAnyFilledArea( via->m_End,
+                            zone = m_Brd->HitTestForAnyFilledArea( via->GetEnd(),
                                                                    bottom_layer, top_layer );
                         }
 
@@ -472,12 +472,12 @@
             if( segment->GetNet() != other->GetNet() )
                 break;
 
-            if( ( segment->m_Start == other->m_Start ) &&
-                ( segment->m_End == other->m_End ) )
+            if( ( segment->GetStart() == other->GetStart() ) &&
+                ( segment->GetEnd() == other->GetEnd() ) )
                 erase = true;
 
-            if( ( segment->m_Start == other->m_End ) &&
-                ( segment->m_End == other->m_Start ) )
+            if( ( segment->GetStart() == other->GetEnd() ) &&
+                ( segment->GetEnd() == other->GetStart() ) )
                 erase = true;
 
             // Delete redundant point
@@ -511,7 +511,7 @@
             if( segStart )
             {
                 // the two segments must have the same width
-                if( segment->m_Width != segStart->m_Width )
+                if( segment->GetWidth() != segStart->GetWidth() )
                     break;
 
                 // it cannot be a via
@@ -550,7 +550,7 @@
 
             if( segEnd )
             {
-                if( segment->m_Width != segEnd->m_Width )
+                if( segment->GetWidth() != segEnd->GetWidth() )
                     break;
 
                 if( segEnd->Type() != PCB_TRACE_T )
@@ -607,7 +607,7 @@
 TRACK* TRACKS_CLEANER::mergeCollinearSegmentIfPossible( TRACK* aTrackRef, TRACK* aCandidate,
                                        int aEndType )
 {
-    if( aTrackRef->m_Width != aCandidate->m_Width )
+    if( aTrackRef->GetWidth() != aCandidate->GetWidth() )
         return NULL;
 
     bool is_colinear = false;
@@ -615,20 +615,20 @@
     // Trivial case: superimposed tracks ( tracks, not vias ):
     if( aTrackRef->Type() == PCB_TRACE_T && aCandidate->Type() == PCB_TRACE_T )
     {
-        if( ( aTrackRef->m_Start == aCandidate->m_Start ) &&
-            ( aTrackRef->m_End == aCandidate->m_End ) )
+        if( ( aTrackRef->GetStart() == aCandidate->GetStart() ) &&
+            ( aTrackRef->GetEnd() == aCandidate->GetEnd() ) )
             return aCandidate;
 
-        if( ( aTrackRef->m_Start == aCandidate->m_End ) &&
-            ( aTrackRef->m_End == aCandidate->m_Start ) )
+        if( ( aTrackRef->GetStart() == aCandidate->GetEnd() ) &&
+            ( aTrackRef->GetEnd() == aCandidate->GetStart() ) )
             return aCandidate;
     }
 
-    int refdx = aTrackRef->m_End.x - aTrackRef->m_Start.x;
-    int refdy = aTrackRef->m_End.y - aTrackRef->m_Start.y;
+    int refdx = aTrackRef->GetEnd().x - aTrackRef->GetStart().x;
+    int refdy = aTrackRef->GetEnd().y - aTrackRef->GetStart().y;
 
-    int segmdx = aCandidate->m_End.x - aCandidate->m_Start.x;
-    int segmdy = aCandidate->m_End.y - aCandidate->m_Start.y;
+    int segmdx = aCandidate->GetEnd().x - aCandidate->GetStart().x;
+    int segmdy = aCandidate->GetEnd().y - aCandidate->GetStart().y;
 
     // test for vertical alignment (easy to handle)
     if( refdx == 0 )
@@ -673,16 +673,16 @@
 
         /* change the common point coordinate of pt_segm to use the other point
          * of pt_segm (pt_segm will be removed later) */
-        if( aTrackRef->m_Start == aCandidate->m_Start )
+        if( aTrackRef->GetStart() == aCandidate->GetStart() )
         {
-            aTrackRef->m_Start = aCandidate->m_End;
+            aTrackRef->SetStart( aCandidate->GetEnd());
             aTrackRef->start = aCandidate->end;
             aTrackRef->SetState( START_ON_PAD, aCandidate->GetState( END_ON_PAD) );
             return aCandidate;
         }
         else
         {
-            aTrackRef->m_Start = aCandidate->m_Start;
+            aTrackRef->SetStart( aCandidate->GetStart() );
             aTrackRef->start = aCandidate->start;
             aTrackRef->SetState( START_ON_PAD, aCandidate->GetState( START_ON_PAD) );
             return aCandidate;
@@ -696,16 +696,16 @@
 
         /* change the common point coordinate of pt_segm to use the other point
          * of pt_segm (pt_segm will be removed later) */
-        if( aTrackRef->m_End == aCandidate->m_Start )
+        if( aTrackRef->GetEnd() == aCandidate->GetStart() )
         {
-            aTrackRef->m_End = aCandidate->m_End;
+            aTrackRef->SetEnd( aCandidate->GetEnd() );
             aTrackRef->end = aCandidate->end;
             aTrackRef->SetState( END_ON_PAD, aCandidate->GetState( END_ON_PAD) );
             return aCandidate;
         }
         else
         {
-            aTrackRef->m_End = aCandidate->m_Start;
+            aTrackRef->SetEnd( aCandidate->GetStart() );
             aTrackRef->end = aCandidate->start;
             aTrackRef->SetState( END_ON_PAD, aCandidate->GetState( START_ON_PAD) );
             return aCandidate;

=== modified file 'pcbnew/connect.cpp'
--- pcbnew/connect.cpp	2012-09-11 07:33:17 +0000
+++ pcbnew/connect.cpp	2013-01-07 14:14:04 +0000
@@ -264,11 +264,11 @@
     m_candidates.reserve( ii );
     for( TRACK* track = aBegin; track; track = track->Next() )
     {
-        CONNECTED_POINT candidate( track, track->m_Start);
+        CONNECTED_POINT candidate( track, track->GetStart());
         m_candidates.push_back( candidate );
         if( track->Type() != PCB_VIA_T )
         {
-            CONNECTED_POINT candidate2( track, track->m_End);
+            CONNECTED_POINT candidate2( track, track->GetEnd());
             m_candidates.push_back( candidate2 );
         }
 
@@ -290,7 +290,7 @@
     int layerMask = aTrack->ReturnMaskLayer();
 
     // Search for connections to starting point:
-    wxPoint position = aTrack->m_Start;
+    wxPoint position = aTrack->GetStart();
     for( int kk = 0; kk < 2; kk++ )
     {
         int idx = searchEntryPointInCandidatesList( position );
@@ -322,7 +322,7 @@
         if( aTrack->Type() == PCB_VIA_T )
             break;
 
-        position = aTrack->m_End;
+        position = aTrack->GetEnd();
     }
 
     return count;

=== modified file 'pcbnew/dragsegm.cpp'
--- pcbnew/dragsegm.cpp	2012-09-11 07:33:17 +0000
+++ pcbnew/dragsegm.cpp	2013-01-07 17:03:15 +0000
@@ -51,8 +51,8 @@
 DRAG_SEGM_PICKER::DRAG_SEGM_PICKER( TRACK* aTrack )
 {
     m_Track = aTrack;
-    m_startInitialValue = m_Track->m_Start;
-    m_endInitialValue   = m_Track->m_End;
+    m_startInitialValue = m_Track->GetStart();
+    m_endInitialValue   = m_Track->GetEnd();
     m_Pad_Start = m_Track->GetState( START_ON_PAD ) ? (D_PAD*)m_Track->start : NULL;
     m_Pad_End = m_Track->GetState( END_ON_PAD ) ? (D_PAD*)m_Track->end : NULL;
     m_Flag = 0;
@@ -133,7 +133,7 @@
         if( flip )
             NEGATE( padoffset.y );
 
-        m_Track->m_Start = m_Pad_Start->GetPosition() - aOffset + padoffset;
+        m_Track->SetStart( m_Pad_Start->GetPosition() - aOffset + padoffset );
     }
 
     if( m_Pad_End )
@@ -146,7 +146,7 @@
         if( flip )
             NEGATE( padoffset.y );
 
-        m_Track->m_End = m_Pad_End->GetPosition() - aOffset + padoffset;
+        m_Track->SetEnd( m_Pad_End->GetPosition() - aOffset + padoffset );
     }
 }
 
@@ -363,10 +363,10 @@
 
         int flag = 0;
 
-        if( (track->m_Start == aRefPos) && ((track->GetFlags() & STARTPOINT) == 0) )
+        if( (track->GetStart() == aRefPos) && ((track->GetFlags() & STARTPOINT) == 0) )
             flag |= STARTPOINT;
 
-        if( track->m_End == aRefPos && ((track->GetFlags() & ENDPOINT) == 0)  )
+        if( track->GetEnd() == aRefPos && ((track->GetFlags() & ENDPOINT) == 0)  )
             flag |= ENDPOINT;
 
         // Note: vias will be flagged with both STARTPOINT and ENDPOINT

=== modified file 'pcbnew/drc_clearance_test_functions.cpp'
--- pcbnew/drc_clearance_test_functions.cpp	2012-09-22 11:19:37 +0000
+++ pcbnew/drc_clearance_test_functions.cpp	2013-01-07 17:59:28 +0000
@@ -165,9 +165,9 @@
     /* In order to make some calculations more easier or faster,
      * pads and tracks coordinates will be made relative to the reference segment origin
      */
-    wxPoint origin = aRefSeg->m_Start;  // origin will be the origin of other coordinates
+    wxPoint origin = aRefSeg->GetStart();  // origin will be the origin of other coordinates
 
-    m_segmEnd   = delta = aRefSeg->m_End - origin;
+    m_segmEnd   = delta = aRefSeg->GetEnd() - origin;
     m_segmAngle = 0;
 
     layerMask    = aRefSeg->ReturnMaskLayer();
@@ -179,7 +179,7 @@
         // test if the via size is smaller than minimum
         if( aRefSeg->GetShape() == VIA_MICROVIA )
         {
-            if( aRefSeg->m_Width < netclass->GetuViaMinDiameter() )
+            if( aRefSeg->GetWidth() < netclass->GetuViaMinDiameter() )
             {
                 m_currentMarker = fillMarker( aRefSeg, NULL,
                                               DRCE_TOO_SMALL_MICROVIA, m_currentMarker );
@@ -188,7 +188,7 @@
         }
         else
         {
-            if( aRefSeg->m_Width < netclass->GetViaMinDiameter() )
+            if( aRefSeg->GetWidth() < netclass->GetViaMinDiameter() )
             {
                 m_currentMarker = fillMarker( aRefSeg, NULL,
                                               DRCE_TOO_SMALL_VIA, m_currentMarker );
@@ -199,7 +199,7 @@
         // test if via's hole is bigger than its diameter
         // This test is necessary since the via hole size and width can be modified
         // and a default via hole can be bigger than some vias sizes
-        if( aRefSeg->GetDrillValue() > aRefSeg->m_Width )
+        if( aRefSeg->GetDrillValue() > aRefSeg->GetWidth() )
         {
             m_currentMarker = fillMarker( aRefSeg, NULL,
                                           DRCE_VIA_HOLE_BIGGER, m_currentMarker );
@@ -237,7 +237,7 @@
     }
     else    // This is a track segment
     {
-        if( aRefSeg->m_Width < netclass->GetTrackMinWidth() )
+        if( aRefSeg->GetWidth() < netclass->GetTrackMinWidth() )
         {
             m_currentMarker = fillMarker( aRefSeg, NULL,
                                           DRCE_TOO_SMALL_TRACK_WIDTH, m_currentMarker );
@@ -303,7 +303,7 @@
 
                 m_padToTestPos = dummypad.GetPosition() - origin;
 
-                if( !checkClearanceSegmToPad( &dummypad, aRefSeg->m_Width,
+                if( !checkClearanceSegmToPad( &dummypad, aRefSeg->GetWidth(),
                                               netclass->GetClearance() ) )
                 {
                     m_currentMarker = fillMarker( aRefSeg, pad,
@@ -324,7 +324,7 @@
             shape_pos = pad->ReturnShapePos();
             m_padToTestPos = shape_pos - origin;
 
-            if( !checkClearanceSegmToPad( pad, aRefSeg->m_Width, aRefSeg->GetClearance( pad ) ) )
+            if( !checkClearanceSegmToPad( pad, aRefSeg->GetWidth(), aRefSeg->GetClearance( pad ) ) )
             {
                 m_currentMarker = fillMarker( aRefSeg, pad,
                                               DRCE_TRACK_NEAR_PAD, m_currentMarker );
@@ -355,15 +355,15 @@
         // the minimum distance = clearance plus half the reference track
         // width plus half the other track's width
         int w_dist = aRefSeg->GetClearance( track );
-        w_dist += (aRefSeg->m_Width + track->m_Width) / 2;
+        w_dist += (aRefSeg->GetWidth() + track->GetWidth()) / 2;
 
         // If the reference segment is a via, we test it here
         if( aRefSeg->Type() == PCB_VIA_T )
         {
             int angle = 0;  // angle du segment a tester;
 
-            delta = track->m_End - track->m_Start;
-            segStartPoint = aRefSeg->m_Start - track->m_Start;
+            delta = track->GetEnd() - track->GetStart();
+            segStartPoint = aRefSeg->GetStart() - track->GetStart();
 
             if( track->Type() == PCB_VIA_T )
             {
@@ -399,8 +399,8 @@
          * the segment to test in the new axis : the new X axis is the
          * reference segment.  We must translate and rotate the segment to test
          */
-        segStartPoint = track->m_Start - origin;
-        segEndPoint   = track->m_End - origin;
+        segStartPoint = track->GetStart() - origin;
+        segEndPoint   = track->GetEnd() - origin;
         RotatePoint( &segStartPoint, m_segmAngle );
         RotatePoint( &segEndPoint, m_segmAngle );
         if( track->Type() == PCB_VIA_T )
@@ -529,8 +529,8 @@
                 else    // The drc error is due to the starting or the ending point of the reference segment
                 {
                     // Test the starting and the ending point
-                    segStartPoint = track->m_Start;
-                    segEndPoint   = track->m_End;
+                    segStartPoint = track->GetStart();
+                    segEndPoint   = track->GetEnd();
                     delta = segEndPoint - segStartPoint;
 
                     /* Compute the segment orientation (angle) en 0,1 degre */
@@ -542,8 +542,8 @@
                     /* Comute the reference segment coordinates relatives to a
                      *  X axis = current tested segment
                      */
-                    wxPoint relStartPos = aRefSeg->m_Start - segStartPoint;
-                    wxPoint relEndPos   = aRefSeg->m_End - segStartPoint;
+                    wxPoint relStartPos = aRefSeg->GetStart() - segStartPoint;
+                    wxPoint relEndPos   = aRefSeg->GetEnd() - segStartPoint;
 
                     RotatePoint( &relStartPos, angle );
                     RotatePoint( &relEndPos, angle );

=== modified file 'pcbnew/drc_marker_functions.cpp'
--- pcbnew/drc_marker_functions.cpp	2012-02-20 04:33:54 +0000
+++ pcbnew/drc_marker_functions.cpp	2013-01-07 18:30:13 +0000
@@ -70,17 +70,17 @@
 
             posB = track->GetPosition();
 
-            wxPoint endPos = track->m_End;
+            wxPoint endPos = track->GetEnd();
 
             // either of aItem's start or end will be used for the marker position
             // first assume start, then switch at end if needed.  decision made on
             // distance from end of aTrack.
-            position = track->m_Start;
+            position = track->GetStart();
 
-            double dToEnd = hypot( endPos.x - aTrack->m_End.x,
-                                   endPos.y - aTrack->m_End.y );
-            double dToStart = hypot( position.x - aTrack->m_End.x,
-                                     position.y - aTrack->m_End.y );
+            double dToEnd = hypot( endPos.x - aTrack->GetEnd().x,
+                                   endPos.y - aTrack->GetEnd().y );
+            double dToStart = hypot( position.x - aTrack->GetEnd().x,
+                                     position.y - aTrack->GetEnd().y );
 
             if( dToEnd < dToStart )
                 position = endPos;

=== modified file 'pcbnew/edit_track_width.cpp'
--- pcbnew/edit_track_width.cpp	2012-02-06 07:14:51 +0000
+++ pcbnew/edit_track_width.cpp	2013-01-08 11:05:40 +0000
@@ -38,7 +38,7 @@
     if( aUseNetclassValue )
         net = GetBoard()->FindNet( aTrackItem->GetNet() );
 
-    initial_width = aTrackItem->m_Width;
+    initial_width = aTrackItem->GetWidth();
 
     if( net )
         new_width = net->GetTrackWidth();
@@ -60,7 +60,7 @@
             new_drill = GetBoard()->GetCurrentViaDrill();
         }
 
-        if( aTrackItem->m_Shape == VIA_MICROVIA )
+        if( aTrackItem->GetShape() == VIA_MICROVIA )
         {
             if( net )
                 new_width = net->GetViaSize();
@@ -69,7 +69,7 @@
         }
     }
 
-    aTrackItem->m_Width = new_width;
+    aTrackItem->SetWidth( new_width );
 
     // make a DRC test because the new size is bigger than the old size
     if( initial_width < new_width )
@@ -98,11 +98,11 @@
 
         if( aItemsListPicker )
         {
-            aTrackItem->m_Width = initial_width;
+            aTrackItem->SetWidth( initial_width );
             ITEM_PICKER picker( aTrackItem, UR_CHANGED );
             picker.SetLink( aTrackItem->Clone() );
             aItemsListPicker->PushItem( picker );
-            aTrackItem->m_Width = new_width;
+            aTrackItem->SetWidth( new_width );
 
             if( aTrackItem->Type() == PCB_VIA_T )
             {
@@ -116,7 +116,7 @@
     }
     else
     {
-        aTrackItem->m_Width = initial_width;
+        aTrackItem->SetWidth( initial_width );
     }
 
     return change_ok;

=== modified file 'pcbnew/editrack-part2.cpp'
--- pcbnew/editrack-part2.cpp	2012-06-08 09:56:42 +0000
+++ pcbnew/editrack-part2.cpp	2013-01-06 10:27:48 +0000
@@ -62,13 +62,13 @@
     }
 
     // Avoid more than one via on the current location:
-    if( GetBoard()->GetViaByPosition( g_CurrentTrackSegment->m_End,
+    if( GetBoard()->GetViaByPosition( g_CurrentTrackSegment->GetEnd(),
                                       g_CurrentTrackSegment->GetLayer() ) )
         return false;
 
     for( TRACK* segm = g_FirstTrackSegment;  segm;  segm = segm->Next() )
     {
-        if( segm->Type() == PCB_VIA_T && g_CurrentTrackSegment->m_End == segm->m_Start )
+        if( segm->Type() == PCB_VIA_T && g_CurrentTrackSegment->GetEnd() == segm->GetStart() )
             return false;
     }
 
@@ -98,10 +98,11 @@
     // create the via
     SEGVIA* via    = new SEGVIA( GetBoard() );
     via->SetFlags( IS_NEW );
-    via->m_Shape   = GetDesignSettings().m_CurrentViaType;
-    via->m_Width   = GetBoard()->GetCurrentViaSize();
+    via->SetShape( GetDesignSettings().m_CurrentViaType );
+    via->SetWidth( GetBoard()->GetCurrentViaSize());
     via->SetNet( GetBoard()->GetHighLightNetCode() );
-    via->m_Start   = via->m_End = g_CurrentTrackSegment->m_End;
+    via->SetEnd( g_CurrentTrackSegment->GetEnd() );
+    via->SetStart( g_CurrentTrackSegment->GetEnd() );
 
     // Usual via is from copper to component.
     // layer pair is LAYER_N_BACK and LAYER_N_FRONT.
@@ -140,7 +141,7 @@
             via->SetLayerPair( first_layer, last_layer );
             {
                 NETINFO_ITEM* net = GetBoard()->FindNet( via->GetNet() );
-                via->m_Width      = net->GetMicroViaSize();
+                via->SetWidth( net->GetMicroViaSize() );
             }
         }
             break;
@@ -198,7 +199,8 @@
     /* the start point is the via position and the end point is the cursor
      * which also is on the via (will change when moving mouse)
      */
-    track->m_Start = track->m_End = via->m_Start;
+    track->SetEnd( via->GetStart() );
+    track->SetStart( via->GetStart() ); 
 
     g_CurrentTrackList.PushBack( track );
 

=== modified file 'pcbnew/editrack.cpp'
--- pcbnew/editrack.cpp	2012-12-27 16:42:41 +0000
+++ pcbnew/editrack.cpp	2013-01-09 10:39:58 +0000
@@ -153,11 +153,11 @@
                 GetBoard()->SetHighLightNet( zone->GetNet() );
         }
 
-        D( g_CurrentTrackList.VerifyListIntegrity(); );
+        D( g_CurrentTrackList.VerifyListIntegrity() );
 
         BuildAirWiresTargetsList( LockPoint, wxPoint( 0, 0 ), true );
 
-        D( g_CurrentTrackList.VerifyListIntegrity(); );
+        D( g_CurrentTrackList.VerifyListIntegrity() );
 
         GetBoard()->HighLightON();
         GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() );
@@ -167,16 +167,16 @@
         GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() );
 
         g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer );
-        g_CurrentTrackSegment->m_Width = GetBoard()->GetCurrentTrackWidth();
+        g_CurrentTrackSegment->SetWidth( GetBoard()->GetCurrentTrackWidth() );
 
         if( GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth )
         {
             if( TrackOnStartPoint && TrackOnStartPoint->Type() == PCB_TRACE_T )
-                g_CurrentTrackSegment->m_Width = TrackOnStartPoint->m_Width;
+                g_CurrentTrackSegment->SetWidth( TrackOnStartPoint->GetWidth());
         }
 
-        g_CurrentTrackSegment->m_Start = pos;
-        g_CurrentTrackSegment->m_End   = pos;
+        g_CurrentTrackSegment->SetStart( pos );
+        g_CurrentTrackSegment->SetEnd( pos );
 
         if( pad )
         {
@@ -275,12 +275,12 @@
 
             D( g_CurrentTrackList.VerifyListIntegrity(); );
 
-            newTrack->m_Start = newTrack->m_End;
+            newTrack->SetStart( newTrack->GetEnd() );
 
             newTrack->SetLayer( GetScreen()->m_Active_Layer );
 
             if( !GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth )
-                newTrack->m_Width = GetBoard()->GetCurrentTrackWidth();
+                newTrack->SetWidth( GetBoard()->GetCurrentTrackWidth() );
 
             D( g_CurrentTrackList.VerifyListIntegrity(); );
 
@@ -312,15 +312,15 @@
 
     int segm_step_45 = KiROUND( GetScreen()->GetGridSize().x / 2 );
 
-    if( segm_step_45 < ( curTrack->m_Width * 2 ) )
-        segm_step_45 = curTrack->m_Width * 2;
+    if( segm_step_45 < ( curTrack->GetWidth() * 2 ) )
+        segm_step_45 = curTrack->GetWidth() * 2;
 
     // Test if the segments are horizontal or vertical.
-    dx0 = prevTrack->m_End.x - prevTrack->m_Start.x;
-    dy0 = prevTrack->m_End.y - prevTrack->m_Start.y;
+    dx0 = prevTrack->GetEnd().x - prevTrack->GetStart().x;
+    dy0 = prevTrack->GetEnd().y - prevTrack->GetStart().y;
 
-    dx1 = curTrack->m_End.x - curTrack->m_Start.x;
-    dy1 = curTrack->m_End.y - curTrack->m_Start.y;
+    dx1 = curTrack->GetEnd().x - curTrack->GetStart().x;
+    dy1 = curTrack->GetEnd().y - curTrack->GetStart().y;
 
     // Segments should have a min length.
     if( std::max( abs( dx0 ), abs( dy0 ) ) < ( segm_step_45 * 2 ) )
@@ -332,8 +332,8 @@
     // Create a new segment and connect it with the previous 2 segments.
     TRACK* newTrack = (TRACK*)curTrack->Clone();
 
-    newTrack->m_Start = prevTrack->m_End;
-    newTrack->m_End   = curTrack->m_Start;
+    newTrack->SetStart( prevTrack->GetEnd() );
+    newTrack->SetEnd( curTrack->GetStart() );
 
     if( dx0 == 0 )          // Previous segment is Vertical
     {
@@ -348,14 +348,14 @@
          * horizontal segment.
          */
         if( dy0 > 0 )
-            newTrack->m_Start.y -= segm_step_45;
+            newTrack->SetStart( wxPoint(newTrack->GetStart().x, newTrack->GetStart().y -segm_step_45) );
         else
-            newTrack->m_Start.y += segm_step_45;
+            newTrack->SetStart( wxPoint(newTrack->GetStart().x, newTrack->GetStart().y + segm_step_45) );
 
         if( dx1 > 0 )
-            newTrack->m_End.x += segm_step_45;
+            newTrack->SetEnd( wxPoint(newTrack->GetEnd().x + segm_step_45, newTrack->GetEnd().y) );
         else
-            newTrack->m_End.x -= segm_step_45;
+            newTrack->SetEnd( wxPoint(newTrack->GetEnd().x - segm_step_45, newTrack->GetEnd().y) );
 
         if( Drc_On && BAD_DRC == m_drc->Drc( curTrack, GetBoard()->m_Track ) )
         {
@@ -363,8 +363,8 @@
             return false;
         }
 
-        prevTrack->m_End  = newTrack->m_Start;
-        curTrack->m_Start = newTrack->m_End;
+        prevTrack->SetEnd( newTrack->GetStart());
+        curTrack->SetStart( newTrack->GetEnd());
 
         g_CurrentTrackList.Insert( newTrack, curTrack );
         return true;
@@ -383,14 +383,14 @@
          * (horizontal) and segment 2 (vertical)
          */
         if( dx0 > 0 )
-            newTrack->m_Start.x -= segm_step_45;
+            newTrack->SetStart( wxPoint(newTrack->GetStart().x - segm_step_45 , newTrack->GetStart().y));
         else
-            newTrack->m_Start.x += segm_step_45;
+            newTrack->SetStart( wxPoint(newTrack->GetStart().x + segm_step_45, newTrack->GetStart().y) );
 
         if( dy1 > 0 )
-            newTrack->m_End.y += segm_step_45;
+            newTrack->SetEnd( wxPoint(newTrack->GetEnd().x, newTrack->GetEnd().y + segm_step_45) );
         else
-            newTrack->m_End.y -= segm_step_45;
+            newTrack->SetEnd( wxPoint(newTrack->GetEnd().x, newTrack->GetEnd().y - segm_step_45) );
 
         if( Drc_On && BAD_DRC==m_drc->Drc( newTrack, GetBoard()->m_Track ) )
         {
@@ -398,8 +398,8 @@
             return false;
         }
 
-        prevTrack->m_End  = newTrack->m_Start;
-        curTrack->m_Start = newTrack->m_End;
+        prevTrack->SetEnd( newTrack->GetStart());
+        curTrack->SetStart( newTrack->GetEnd());
 
         g_CurrentTrackList.Insert( newTrack, curTrack );
         return true;
@@ -420,7 +420,7 @@
         return false;
 
     // Saving the coordinate of end point of the trace
-    wxPoint pos = g_CurrentTrackSegment->m_End;
+    wxPoint pos = g_CurrentTrackSegment->GetEnd();
 
     D( g_CurrentTrackList.VerifyListIntegrity(); );
 
@@ -460,9 +460,9 @@
                     // creates a lock point if not exists
         {
              // Creates a lock point, if not already exists:
-            LockPoint = GetBoard()->CreateLockPoint( g_CurrentTrackSegment->m_End,
-                                                     (TRACK*) LockPoint,
-                                                     &s_ItemsListPicker );
+            wxPoint hp = g_CurrentTrackSegment->GetEnd(); 
+            LockPoint = GetBoard()->CreateLockPoint( hp, (TRACK*) LockPoint, &s_ItemsListPicker );
+            g_CurrentTrackSegment->SetEnd(hp);
         }
     }
 
@@ -538,7 +538,7 @@
 TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack, int aLayer, const wxPoint& aRef )
 {
     int     net   = aTrack->GetNet();
-    int     width = aTrack->m_Width;
+    int     width = aTrack->GetWidth();
 
     TRACK*  found = NULL;
 
@@ -556,16 +556,16 @@
                 continue;
 
             // TRACK::HitTest
-            int dist = (width + track->m_Width) / 2 + aTrack->GetClearance( track );
+            int dist = (width + track->GetWidth()) / 2 + aTrack->GetClearance( track );
 
-            if( !TestSegmentHit( aRef, track->m_Start, track->m_End, dist ) )
+            if( !TestSegmentHit( aRef, track->GetStart(), track->GetEnd(), dist ) )
                 continue;
 
             found = track;
 
             // prefer intrusions from the side, not the end
-            wxPoint pos = aRef - track->m_Start;
-            wxPoint vec = track->m_End - track->m_Start;
+            wxPoint pos = aRef - track->GetStart();
+            wxPoint vec = track->GetEnd() - track->GetStart();
             double tmp = (double) pos.x * vec.x + (double) pos.y * vec.y;
 
             if( tmp >= 0 && tmp <= (double) vec.x * vec.x + (double) vec.y * vec.y )
@@ -614,8 +614,8 @@
     if( other->GetNet() == track->GetNet() )
         return;
 
-    cv  = cursor - other->m_Start;
-    vec = other->m_End - other->m_Start;
+    cv  = cursor - other->GetStart();
+    vec = other->GetEnd() - other->GetStart();
 
     det = (double) cv.x * vec.y - (double) cv.y * vec.x;
 
@@ -623,7 +623,7 @@
     if( !det )
         return;
 
-    dist = (track->m_Width + 1) / 2 + (other->m_Width + 1) / 2 + track->GetClearance( other ) + 2;
+    dist = (track->GetWidth() + 1) / 2 + (other->GetWidth() + 1) / 2 + track->GetClearance( other ) + 2;
 
     /*
      * DRC wants >, so +1.
@@ -646,8 +646,9 @@
     n.x = KiROUND( f * n.x );
     n.y = KiROUND( f * n.y );
 
-    Project( &track->m_End, cursor, other );
-    track->m_End += n;
+    wxPoint hp = track->GetEnd();
+    Project( &hp, cursor, other );
+    track->SetEnd( hp + n );
 }
 
 
@@ -702,7 +703,7 @@
         if( showTrackClearanceMode >= SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS )
         {
             EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( g_CurrentTrackSegment->GetLayer() );
-            DrawViaCirclesWhenEditingNewTrack( panelClipBox, aDC, g_CurrentTrackSegment->m_End,
+            DrawViaCirclesWhenEditingNewTrack( panelClipBox, aDC, g_CurrentTrackSegment->GetEnd(),
                                                boardViaRadius, viaRadiusWithClearence, color);
         }
     }
@@ -715,7 +716,7 @@
     g_CurrentTrackSegment->SetLayer( screen->m_Active_Layer );
 
     if( !frame->GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth )
-        g_CurrentTrackSegment->m_Width = frame->GetBoard()->GetCurrentTrackWidth();
+        g_CurrentTrackSegment->SetWidth( frame->GetBoard()->GetCurrentTrackWidth() );
 
     if( g_TwoSegmentTrackBuild )
     {
@@ -726,7 +727,7 @@
             previous_track->SetLayer( screen->m_Active_Layer );
 
             if( !frame->GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth )
-                previous_track->m_Width = frame->GetBoard()->GetCurrentTrackWidth();
+                previous_track->SetWidth( frame->GetBoard()->GetCurrentTrackWidth() );
         }
     }
 
@@ -734,30 +735,32 @@
     {
         if( g_TwoSegmentTrackBuild )
         {
-            g_CurrentTrackSegment->m_End = screen->GetCrossHairPosition();
+            g_CurrentTrackSegment->SetEnd( screen->GetCrossHairPosition() );
 
             if( Drc_On )
                 PushTrack( aPanel );
 
             ComputeBreakPoint( g_CurrentTrackSegment,
                                g_CurrentTrackList.GetCount(),
-                               g_CurrentTrackSegment->m_End );
+                               g_CurrentTrackSegment->GetEnd() );
         }
         else
         {
             /* Calculate of the end of the path for the permitted directions:
              * horizontal, vertical or 45 degrees.
              */
+            wxPoint hp = g_CurrentTrackSegment->GetEnd();
             CalculateSegmentEndPoint( screen->GetCrossHairPosition(),
-                                      g_CurrentTrackSegment->m_Start.x,
-                                      g_CurrentTrackSegment->m_Start.y,
-                                      &g_CurrentTrackSegment->m_End.x,
-                                      &g_CurrentTrackSegment->m_End.y );
+                                      g_CurrentTrackSegment->GetStart().x,
+                                      g_CurrentTrackSegment->GetStart().y,
+                                      &hp.x,
+                                      &hp.y );
+            g_CurrentTrackSegment->SetEnd(hp);
         }
     }
     else    // Here the angle is arbitrary
     {
-        g_CurrentTrackSegment->m_End = screen->GetCrossHairPosition();
+        g_CurrentTrackSegment->SetEnd( screen->GetCrossHairPosition() );
     }
 
     // Redraw the new track
@@ -769,7 +772,7 @@
         EDA_COLOR_T color = g_ColorsSettings.GetLayerColor(g_CurrentTrackSegment->GetLayer());
 
         //Via diameter must have taken what we are using, rather than netclass value.
-        DrawViaCirclesWhenEditingNewTrack( panelClipBox, aDC, g_CurrentTrackSegment->m_End,
+        DrawViaCirclesWhenEditingNewTrack( panelClipBox, aDC, g_CurrentTrackSegment->GetEnd(),
                                            boardViaRadius, viaRadiusWithClearence, color);
 
     }
@@ -821,7 +824,7 @@
     DisplayOpt.ShowTrackClearanceMode = showTrackClearanceMode;
     DisplayOpt.DisplayPcbTrackFill    = Track_fill_copy;
 
-    frame->BuildAirWiresTargetsList( NULL, g_CurrentTrackSegment->m_End, false );
+    frame->BuildAirWiresTargetsList( NULL, g_CurrentTrackSegment->GetEnd(), false );
     frame->TraceAirWiresToTargets( aDC );
 }
 
@@ -908,8 +911,8 @@
 
     if( track )
     {
-        iDx = end.x - track->m_Start.x;
-        iDy = end.y - track->m_Start.y;
+        iDx = end.x - track->GetStart().x;
+        iDy = end.y - track->GetStart().y;
 
         iDx = abs( iDx );
         iDy = abs( iDy );
@@ -919,8 +922,8 @@
 
     if( lastTrack )
     {
-        if(( (lastTrack->m_End.x == lastTrack->m_Start.x)
-           || (lastTrack->m_End.y == lastTrack->m_Start.y) )
+        if(( (lastTrack->GetEnd().x == lastTrack->GetStart().x)
+           || (lastTrack->GetEnd().y == lastTrack->GetStart().y) )
         && !g_Alternate_Track_Posture)
         {
             iAngle = 45;
@@ -951,12 +954,10 @@
         break;
 
     case 0:
-        if( ( end.x - track->m_Start.x ) < 0 )
-            track->m_End.x = end.x + iDy;
+        if( ( end.x - track->GetStart().x ) < 0 )
+            track->SetEnd(wxPoint( end.x + iDy, track->GetStart().y));
         else
-            track->m_End.x = end.x - iDy;
-
-        track->m_End.y = track->m_Start.y;
+            track->SetEnd(wxPoint( end.x - iDy, track->GetStart().y));
         break;
 
     case 45:
@@ -964,35 +965,32 @@
         iDy = iDx;
 
         // Recalculate the signs for deltax and deltaY.
-        if( ( end.x - track->m_Start.x ) < 0 )
+        if( ( end.x - track->GetStart().x ) < 0 )
             iDx = -iDx;
 
-        if( ( end.y - track->m_Start.y ) < 0 )
+        if( ( end.y - track->GetStart().y ) < 0 )
             iDy = -iDy;
 
-        track->m_End.x = track->m_Start.x + iDx;
-        track->m_End.y = track->m_Start.y + iDy;
+        track->SetEnd(wxPoint(track->GetStart().x + iDx, track->GetStart().y + iDy));
         break;
 
     case 90:
-        if( ( end.y - track->m_Start.y ) < 0 )
-            track->m_End.y = end.y + iDx;
+        if( ( end.y - track->GetStart().y ) < 0 )
+            track->SetEnd(wxPoint(track->GetStart().x , end.y + iDx));
         else
-            track->m_End.y = end.y - iDx;
-
-        track->m_End.x = track->m_Start.x;
+            track->SetEnd(wxPoint(track->GetStart().x , end.y - iDx));
         break;
     }
 
     if( track )
     {
         if( track->IsNull() )
-            track->m_End = end;
+            track->SetEnd( end );
 
-        newTrack->m_Start = track->m_End;
+        newTrack->SetStart( track->GetEnd() );
     }
 
-    newTrack->m_End = end;
+    newTrack->SetEnd( end );
 }
 
 
@@ -1081,7 +1079,7 @@
  */
 void EnsureEndTrackOnPad( D_PAD* aPad )
 {
-    if( g_CurrentTrackSegment->m_End == aPad->GetPosition() ) // Ok !
+    if( g_CurrentTrackSegment->GetEnd() == aPad->GetPosition() ) // Ok !
     {
         g_CurrentTrackSegment->end = aPad;
         g_CurrentTrackSegment->SetState( END_ONPAD, ON );
@@ -1098,7 +1096,7 @@
         lasttrack->end = g_CurrentTrackSegment;
     }
 
-    g_CurrentTrackSegment->m_End = aPad->GetPosition();
+    g_CurrentTrackSegment->SetEnd( aPad->GetPosition() );
     g_CurrentTrackSegment->SetState( END_ONPAD, OFF );
 
     g_CurrentTrackSegment->end = aPad;

=== modified file 'pcbnew/event_handlers_tracks_vias_sizes.cpp'
--- pcbnew/event_handlers_tracks_vias_sizes.cpp	2012-12-01 20:03:33 +0000
+++ pcbnew/event_handlers_tracks_vias_sizes.cpp	2013-01-06 08:28:59 +0000
@@ -111,9 +111,12 @@
 
     // Refresh track in progress, if any, by forcing a mouse event,
     // to call the current function attached to the mouse
-    if( m_canvas->IsMouseCaptured() )
+    /*if( m_canvas->IsMouseCaptured() )
     {
         wxMouseEvent event(wxEVT_MOTION);
         wxPostEvent( m_canvas, event );
-    }
+    }*/
+    //+hp
+    //Refresh canvas, that we can see changes instantly. I use this because it dont,t throw  mouse up-left corner.
+    m_canvas->Refresh();
 }

=== modified file 'pcbnew/export_gencad.cpp'
--- pcbnew/export_gencad.cpp	2012-08-29 16:59:50 +0000
+++ pcbnew/export_gencad.cpp	2013-01-08 11:42:53 +0000
@@ -225,8 +225,8 @@
     TRACK* padref = *(TRACK**) aRefptr;
     TRACK* padcmp = *(TRACK**) aObjptr;
 
-    if( padref->m_Width != padcmp->m_Width )
-        return padref->m_Width - padcmp->m_Width;
+    if( padref->GetWidth() != padcmp->GetWidth() )
+        return padref->GetWidth() - padcmp->GetWidth();
 
     if( padref->GetDrillValue() != padcmp->GetDrillValue() )
         return padref->GetDrillValue() - padcmp->GetDrillValue();
@@ -292,10 +292,10 @@
         old_via = via;
         viastacks.push_back( via );
         fprintf( aFile, "PAD V%d.%d.%X ROUND %g\nCIRCLE 0 0 %g\n",
-                via->m_Width, via->GetDrillValue(),
+                via->GetWidth(), via->GetDrillValue(),
                 via->ReturnMaskLayer(),
                 via->GetDrillValue() / SCALE_FACTOR,
-                via->m_Width / (SCALE_FACTOR * 2) );
+                via->GetWidth() / (SCALE_FACTOR * 2) );
     }
 
     // Emit component pads
@@ -436,7 +436,7 @@
         TRACK*   via  = viastacks[i];
         unsigned mask = via->ReturnMaskLayer() & master_layermask;
         fprintf( aFile, "PADSTACK VIA%d.%d.%X %g\n",
-                 via->m_Width, via->GetDrillValue(), mask,
+                 via->GetWidth(), via->GetDrillValue(), mask,
                  via->GetDrillValue() / SCALE_FACTOR );
 
         for( int layer = 0; layer < 32; layer++ )
@@ -444,7 +444,7 @@
             if( mask & (1 << layer) )
             {
                 fprintf( aFile, "PAD V%d.%d.%X %s 0 0\n",
-                        via->m_Width, via->GetDrillValue(),
+                        via->GetWidth(), via->GetDrillValue(),
                         mask,
                         TO_UTF8( GenCADLayerName[layer] ) );
             }
@@ -736,7 +736,7 @@
     if( ( diff = ref->GetNet() - cmp->GetNet() ) )
         return diff;
 
-    if( ( diff = ref->m_Width - cmp->m_Width ) )
+    if( ( diff = ref->GetWidth() - cmp->GetWidth() ) )
         return diff;
 
     if( ( diff = ref->GetLayer() - cmp->GetLayer() ) )
@@ -814,10 +814,10 @@
             fprintf( aFile, "ROUTE %s\n", TO_UTF8( netname ) );
         }
 
-        if( old_width != track->m_Width )
+        if( old_width != track->GetWidth() )
         {
-            old_width = track->m_Width;
-            fprintf( aFile, "TRACK TRACK%d\n", track->m_Width );
+            old_width = track->GetWidth();
+            fprintf( aFile, "TRACK TRACK%d\n", track->GetWidth() );
         }
 
         if( (track->Type() == PCB_TRACE_T) || (track->Type() == PCB_ZONE_T) )
@@ -830,15 +830,15 @@
             }
 
             fprintf( aFile, "LINE %g %g %g %g\n",
-                    MapXTo( track->m_Start.x ), MapYTo( track->m_Start.y ),
-                    MapXTo( track->m_End.x ), MapYTo( track->m_End.y ) );
+                    MapXTo( track->GetStart().x ), MapYTo( track->GetStart().y ),
+                    MapXTo( track->GetEnd().x ), MapYTo( track->GetEnd().y ) );
         }
         if( track->Type() == PCB_VIA_T )
         {
             fprintf( aFile, "VIA VIA%d.%d.%X %g %g ALL %g via%d\n",
-                     track->m_Width, track->GetDrillValue(),
+                     track->GetWidth(), track->GetDrillValue(),
                      track->ReturnMaskLayer() & master_layermask,
-                     MapXTo( track->m_Start.x ), MapYTo( track->m_Start.y ),
+                     MapXTo( track->GetStart().x ), MapYTo( track->GetStart().y ),
                      track->GetDrillValue() / SCALE_FACTOR, vianum++ );
         }
     }
@@ -931,35 +931,35 @@
 
     for( track = aPcb->m_Track; track != NULL; track = track->Next() )
     {
-        if( last_width != track->m_Width ) // Find a thickness already used.
+        if( last_width != track->GetWidth() ) // Find a thickness already used.
         {
             for( ii = 0; ii < trackinfo.size(); ii++ )
             {
-                if( trackinfo[ii] == track->m_Width )
+                if( trackinfo[ii] == track->GetWidth() )
                     break;
             }
 
             if( ii == trackinfo.size() )    // not found
-                trackinfo.push_back( track->m_Width );
+                trackinfo.push_back( track->GetWidth() );
 
-            last_width = track->m_Width;
+            last_width = track->GetWidth();
         }
     }
 
     for( track = aPcb->m_Zone; track != NULL; track = track->Next() )
     {
-        if( last_width != track->m_Width ) // Find a thickness already used.
+        if( last_width != track->GetWidth() ) // Find a thickness already used.
         {
             for( ii = 0; ii < trackinfo.size(); ii++ )
             {
-                if( trackinfo[ii] == track->m_Width )
+                if( trackinfo[ii] == track->GetWidth() )
                     break;
             }
 
             if( ii == trackinfo.size() )    // not found
-                trackinfo.push_back( track->m_Width );
+                trackinfo.push_back( track->GetWidth() );
 
-            last_width = track->m_Width;
+            last_width = track->GetWidth();
         }
     }
 

=== modified file 'pcbnew/export_vrml.cpp'
--- pcbnew/export_vrml.cpp	2012-11-05 20:20:34 +0000
+++ pcbnew/export_vrml.cpp	2013-01-08 12:10:49 +0000
@@ -779,17 +779,17 @@
     double x, y, r, hole;
     int    top_layer, bottom_layer;
 
-    r    = via->m_Width / 2;
+    r    = via->GetWidth() / 2;
     hole = via->GetDrillValue() / 2;
-    x    = via->m_Start.x;
-    y    = via->m_Start.y;
+    x    = via->GetStart().x;
+    y    = via->GetStart().y;
     via->ReturnLayerPair( &top_layer, &bottom_layer );
 
     // Export the via padstack
     export_round_padstack( pcb, x, y, r, bottom_layer, top_layer );
 
     // Drill a hole
-    export_vrml_hole( via_triangles[via->m_Shape], top_layer, bottom_layer, x, y, hole );
+    export_vrml_hole( via_triangles[via->GetShape()], top_layer, bottom_layer, x, y, hole );
 }
 
 
@@ -800,8 +800,8 @@
         if( track->Type() == PCB_VIA_T )
             export_vrml_via( pcb, (SEGVIA*) track );
         else
-            export_vrml_line( track->GetLayer(), track->m_Start.x, track->m_Start.y,
-                              track->m_End.x, track->m_End.y, track->m_Width, 4 );
+            export_vrml_line( track->GetLayer(), track->GetStart().x, track->GetStart().y,
+                              track->GetEnd().x, track->GetEnd().y, track->GetWidth(), 4 );
     }
 }
 

=== modified file 'pcbnew/gendrill_Excellon_writer.cpp'
--- pcbnew/gendrill_Excellon_writer.cpp	2012-10-05 12:25:12 +0000
+++ pcbnew/gendrill_Excellon_writer.cpp	2013-01-08 12:26:58 +0000
@@ -480,7 +480,7 @@
             new_hole.m_Hole_Size.x = new_hole.m_Hole_Size.y = new_hole.m_Hole_Diameter;
 
             new_hole.m_Hole_Shape = 0;              // hole shape: round
-            new_hole.m_Hole_Pos = via->m_Start;
+            new_hole.m_Hole_Pos = via->GetStart();
             via->ReturnLayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer );
 
             // ReturnLayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer

=== modified file 'pcbnew/magnetic_tracks_functions.cpp'
--- pcbnew/magnetic_tracks_functions.cpp	2012-08-28 06:51:18 +0000
+++ pcbnew/magnetic_tracks_functions.cpp	2013-01-08 13:28:54 +0000
@@ -74,19 +74,19 @@
  */
 bool Project( wxPoint* aNearPos, wxPoint on_grid, const TRACK* track )
 {
-    if( track->m_Start == track->m_End )
+    if( track->GetStart ()== track->GetEnd() )
         return false;
 
-    wxPoint vec = track->m_End - track->m_Start;
+    wxPoint vec = track->GetEnd() - track->GetStart();
 
-    double t = double( on_grid.x - track->m_Start.x ) * vec.x +
-               double( on_grid.y - track->m_Start.y ) * vec.y;
+    double t = double( on_grid.x - track->GetStart().x ) * vec.x +
+               double( on_grid.y - track->GetStart().y ) * vec.y;
 
     t /= (double) vec.x * vec.x + (double) vec.y * vec.y;
     t = std::min( std::max( t, 0.0 ), 1.0 );
 
-    aNearPos->x = KiROUND( track->m_Start.x + t * vec.x );
-    aNearPos->y = KiROUND( track->m_Start.y + t * vec.y );
+    aNearPos->x = KiROUND( track->GetStart().x + t * vec.x );
+    aNearPos->y = KiROUND( track->GetStart().y + t * vec.y );
 
     return true;
 }
@@ -183,7 +183,7 @@
             {
                 if( !doCheckNet || !currTrack || currTrack->GetNet() == via->GetNet() )
                 {
-                    *curpos = via->m_Start;
+                    *curpos = via->GetStart();
                     // D(printf("via hit\n");)
                     return true;
                 }
@@ -210,10 +210,10 @@
          * In two segment mode, ignore the final segment if it's inside a grid square.
          */
         if( !amMovingVia && currTrack && g_TwoSegmentTrackBuild && currTrack->Back()
-            && currTrack->m_Start.x - aGridSize.x < currTrack->m_End.x
-            && currTrack->m_Start.x + aGridSize.x > currTrack->m_End.x
-            && currTrack->m_Start.y - aGridSize.y < currTrack->m_End.y
-            && currTrack->m_Start.y + aGridSize.y > currTrack->m_End.y )
+            && currTrack->GetStart().x - aGridSize.x < currTrack->GetEnd().x
+            && currTrack->GetStart().x + aGridSize.x > currTrack->GetEnd().x
+            && currTrack->GetStart().y - aGridSize.y < currTrack->GetEnd().y
+            && currTrack->GetStart().y + aGridSize.y > currTrack->GetEnd().y )
         {
             currTrack = currTrack->Back();
         }
@@ -239,7 +239,7 @@
 
             // D(printf( "have track prospect\n");)
 
-            if( Join( curpos, track->m_Start, track->m_End, currTrack->m_Start, currTrack->m_End ) )
+            if( Join( curpos, track->GetStart(), track->GetEnd(), currTrack->GetStart(), currTrack->GetEnd() ) )
             {
                 // D(printf( "join currTrack->Type()=%d\n", currTrack->Type() );)
                 return true;
@@ -251,27 +251,27 @@
                 // a new track and that new track is parallel to the track the
                 // mouse is on. Find the nearest end point of the track under mouse
                 // to the mouse and return that.
-                double distStart = hypot( double( curpos->x - track->m_Start.x ),
-                                          double( curpos->y - track->m_Start.y ));
+                double distStart = hypot( double( curpos->x - track->GetStart().x ),
+                                          double( curpos->y - track->GetStart().y ));
 
-                double distEnd   = hypot( double( curpos->x - track->m_End.x ),
-                                          double( curpos->y - track->m_End.y ));
+                double distEnd   = hypot( double( curpos->x - track->GetEnd().x ),
+                                          double( curpos->y - track->GetEnd().y ));
 
                 // if track not via, or if its a via dragging but not with its adjacent track
                 if( currTrack->Type() != PCB_VIA_T
-                  || ( currTrack->m_Start != track->m_Start && currTrack->m_Start != track->m_End ))
+                  || ( currTrack->GetStart() != track->GetStart() && currTrack->GetStart() != track->GetEnd() ))
                 {
-                    if( distStart <= currTrack->m_Width/2 )
+                    if( distStart <= currTrack->GetWidth()/2 )
                     {
                         // D(printf("nearest end is start\n");)
-                        *curpos = track->m_Start;
+                        *curpos = track->GetStart();
                         return true;
                     }
 
-                    if( distEnd <= currTrack->m_Width/2 )
+                    if( distEnd <= currTrack->GetWidth()/2 )
                     {
                         // D(printf("nearest end is end\n");)
-                        *curpos = track->m_End;
+                        *curpos = track->GetEnd();
                         return true;
                     }
 

=== modified file 'pcbnew/move-drag_pads.cpp'
--- pcbnew/move-drag_pads.cpp	2012-09-11 07:33:17 +0000
+++ pcbnew/move-drag_pads.cpp	2013-01-08 13:40:47 +0000
@@ -139,10 +139,10 @@
 
         // Set the old state
         if( g_DragSegmentList[ii].m_Pad_Start )
-            Track->m_Start = Pad_OldPos;
+            Track->SetStart( Pad_OldPos );
 
         if( g_DragSegmentList[ii].m_Pad_End )
-            Track->m_End = Pad_OldPos;
+            Track->SetEnd( Pad_OldPos );
 
         picker.SetItem( Track );
         pickList.PushItem( picker );
@@ -172,10 +172,10 @@
 
         // Set the new state
         if( g_DragSegmentList[ii].m_Pad_Start )
-            Track->m_Start = aPad->GetPosition();
+            Track->SetStart( aPad->GetPosition() );
 
         if( g_DragSegmentList[ii].m_Pad_End )
-            Track->m_End = aPad->GetPosition();
+            Track->SetEnd( aPad->GetPosition() );
 
         Track->SetState( IN_EDIT, OFF );
 

=== modified file 'pcbnew/move_or_drag_track.cpp'
--- pcbnew/move_or_drag_track.cpp	2012-12-23 10:55:24 +0000
+++ pcbnew/move_or_drag_track.cpp	2013-01-08 14:11:01 +0000
@@ -134,13 +134,13 @@
             track->Draw( aPanel, aDC, draw_mode );
 
         if( track->GetFlags() & STARTPOINT )
-            track->m_Start += moveVector;
+            track->SetStart( track->GetStart() + moveVector );
 
         if( track->GetFlags() & ENDPOINT )
-            track->m_End += moveVector;
+            track->SetEnd( track->GetEnd() + moveVector );
 
         if( track->Type() == PCB_VIA_T )
-            track->m_End = track->m_Start;
+            track->SetEnd( track->GetStart() );
 
         track->Draw( aPanel, aDC, draw_mode );
     }
@@ -265,10 +265,10 @@
     dy = Pos.y - s_LastPos.y;
 
     //move the line by dx and dy
-    tx1 = (double) ( Track->m_Start.x + dx );
-    ty1 = (double) ( Track->m_Start.y + dy );
-    tx2 = (double) ( Track->m_End.x + dx );
-    ty2 = (double) ( Track->m_End.y + dy );
+    tx1 = (double) ( Track->GetStart().x + dx );
+    ty1 = (double) ( Track->GetStart().y + dy );
+    tx2 = (double) ( Track->GetEnd().x + dx );
+    ty2 = (double) ( Track->GetEnd().y + dy );
 
     // recalculate the segments new parameters and intersection points
     // only the intercept will change, segment slopes does not change
@@ -393,25 +393,23 @@
     if( update )
     {
         s_LastPos = Pos;
-        Track->m_Start.x = KiROUND( xi1 );
-        Track->m_Start.y = KiROUND( yi1 );
-        Track->m_End.x   = KiROUND( xi2 );
-        Track->m_End.y   = KiROUND( yi2 );
+        Track->SetStart( wxPoint( KiROUND( xi1 ), KiROUND( yi1 ) ) );
+        Track->SetEnd( wxPoint( KiROUND( xi2 ), KiROUND( yi2 ) ) );
 
         if( tSegmentToEnd )
         {
             if( tSegmentToEnd->GetFlags() & STARTPOINT )
-                tSegmentToEnd->m_Start = Track->m_End;
+                tSegmentToEnd->SetStart( Track->GetEnd() );
             else
-                tSegmentToEnd->m_End = Track->m_End;
+                tSegmentToEnd->SetEnd( Track->GetEnd() );
         }
 
         if( tSegmentToStart )
         {
             if( tSegmentToStart->GetFlags() & STARTPOINT )
-                tSegmentToStart->m_Start = Track->m_Start;
+                tSegmentToStart->SetStart( Track->GetStart() );
             else
-                tSegmentToStart->m_End = Track->m_Start;
+                tSegmentToStart->SetEnd( Track->GetStart() );
         }
     }
 
@@ -489,25 +487,25 @@
     {
         if( tSegmentToStart->GetFlags() & ENDPOINT )
         {
-            tx1 = (double) tSegmentToStart->m_Start.x;
-            ty1 = (double) tSegmentToStart->m_Start.y;
-            tx2 = (double) tSegmentToStart->m_End.x;
-            ty2 = (double) tSegmentToStart->m_End.y;
+            tx1 = (double) tSegmentToStart->GetStart().x;
+            ty1 = (double) tSegmentToStart->GetStart().y;
+            tx2 = (double) tSegmentToStart->GetEnd().x;
+            ty2 = (double) tSegmentToStart->GetEnd().y;
         }
         else
         {
-            tx1 = (double) tSegmentToStart->m_End.x;
-            ty1 = (double) tSegmentToStart->m_End.y;
-            tx2 = (double) tSegmentToStart->m_Start.x;
-            ty2 = (double) tSegmentToStart->m_Start.y;
+            tx1 = (double) tSegmentToStart->GetEnd().x;
+            ty1 = (double) tSegmentToStart->GetEnd().y;
+            tx2 = (double) tSegmentToStart->GetStart().x;
+            ty2 = (double) tSegmentToStart->GetStart().y;
         }
     }
     else // move the start point on a line starting at Track->m_Start, and perpendicular to Track
     {
-        tx1 = (double) Track->m_Start.x;
-        ty1 = (double) Track->m_Start.y;
-        tx2 = (double) Track->m_End.x;
-        ty2 = (double) Track->m_End.y;
+        tx1 = (double) Track->GetStart().x;
+        ty1 = (double) Track->GetStart().y;
+        tx2 = (double) Track->GetEnd().x;
+        ty2 = (double) Track->GetEnd().y;
         RotatePoint( &tx2, &ty2, tx1, ty1, 900 );
     }
 
@@ -532,25 +530,25 @@
         //check if second line is vertical
         if( tSegmentToEnd->GetFlags() & STARTPOINT )
         {
-            tx1 = (double) tSegmentToEnd->m_Start.x;
-            ty1 = (double) tSegmentToEnd->m_Start.y;
-            tx2 = (double) tSegmentToEnd->m_End.x;
-            ty2 = (double) tSegmentToEnd->m_End.y;
+            tx1 = (double) tSegmentToEnd->GetStart().x;
+            ty1 = (double) tSegmentToEnd->GetStart().y;
+            tx2 = (double) tSegmentToEnd->GetEnd().x;
+            ty2 = (double) tSegmentToEnd->GetEnd().y;
         }
         else
         {
-            tx1 = (double) tSegmentToEnd->m_End.x;
-            ty1 = (double) tSegmentToEnd->m_End.y;
-            tx2 = (double) tSegmentToEnd->m_Start.x;
-            ty2 = (double) tSegmentToEnd->m_Start.y;
+            tx1 = (double) tSegmentToEnd->GetEnd().x;
+            ty1 = (double) tSegmentToEnd->GetEnd().y;
+            tx2 = (double) tSegmentToEnd->GetStart().x;
+            ty2 = (double) tSegmentToEnd->GetStart().y;
         }
     }
     else // move the start point on a line starting at Track->m_End, and perpendicular to Track
     {
-        tx1 = (double) Track->m_End.x;
-        ty1 = (double) Track->m_End.y;
-        tx2 = (double) Track->m_Start.x;
-        ty2 = (double) Track->m_Start.y;
+        tx1 = (double) Track->GetEnd().x;
+        ty1 = (double) Track->GetEnd().y;
+        tx2 = (double) Track->GetStart().x;
+        ty2 = (double) Track->GetStart().y;
         RotatePoint( &tx2, &ty2, tx1, ty1, -900 );
     }
 
@@ -570,10 +568,10 @@
     }
 
     // Init parameters for the moved segment
-    tx1 = (double) Track->m_Start.x;
-    ty1 = (double) Track->m_Start.y;
-    tx2 = (double) Track->m_End.x;
-    ty2 = (double) Track->m_End.y;
+    tx1 = (double) Track->GetStart().x;
+    ty1 = (double) Track->GetStart().y;
+    tx2 = (double) Track->GetEnd().x;
+    ty2 = (double) Track->GetEnd().y;
 
     if( tx2 != tx1 )
     {
@@ -630,12 +628,15 @@
 
         if( aCommand != ID_POPUP_PCB_MOVE_TRACK_SEGMENT )
         {
-            Collect_TrackSegmentsToDrag( GetBoard(), aTrack->m_Start,
+            wxPoint hp = aTrack->GetStart();
+            Collect_TrackSegmentsToDrag( GetBoard(), hp,
                                          aTrack->ReturnMaskLayer(),
                                          aTrack->GetNet() );
+            //Collect_TrackSegmentsToDrag didn't change second parameter value. So it is not nessesaryly have to have been alias. Think I.
+            
         }
 
-        PosInit = aTrack->m_Start;
+        PosInit = aTrack->GetStart();
     }
     else
     {
@@ -650,17 +651,17 @@
             break;
 
         case ID_POPUP_PCB_DRAG_TRACK_SEGMENT:   // drag a segment
-            pos = aTrack->m_Start;
+            pos = aTrack->GetStart();
             Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->ReturnMaskLayer(),
                                          aTrack->GetNet() );
-            pos = aTrack->m_End;
+            pos = aTrack->GetEnd();
             aTrack->SetFlags( IS_DRAGGED | ENDPOINT | STARTPOINT );
             Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->ReturnMaskLayer(),
                                          aTrack->GetNet() );
             break;
 
         case ID_POPUP_PCB_MOVE_TRACK_NODE:  // Drag via or move node
-            pos = (diag & STARTPOINT) ? aTrack->m_Start : aTrack->m_End;
+            pos = (diag & STARTPOINT) ? aTrack->GetStart() : aTrack->GetEnd();
             Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->ReturnMaskLayer(),
                                          aTrack->GetNet() );
             PosInit = pos;
@@ -770,7 +771,7 @@
     {
         int flag = STARTPOINT;
 
-        if( track->m_Start != TrackToStartPoint->m_Start )
+        if( track->GetStart() != TrackToStartPoint->GetStart() )
             flag = ENDPOINT;
 
         AddSegmentToDragList( flag, TrackToStartPoint );
@@ -781,7 +782,7 @@
     {
         int flag = STARTPOINT;
 
-        if( track->m_End != TrackToEndPoint->m_Start )
+        if( track->GetEnd() != TrackToEndPoint->GetStart() )
             flag = ENDPOINT;
 
         AddSegmentToDragList( flag, TrackToEndPoint );
@@ -868,14 +869,14 @@
          *  (only pad connection must be tested, track connection will be
          * tested by TestNetConnection() ) */
         int layerMask = GetLayerMask( Track->GetLayer() );
-        Track->start = GetBoard()->GetPadFast( Track->m_Start, layerMask );
+        Track->start = GetBoard()->GetPadFast( Track->GetStart(), layerMask );
 
         if( Track->start )
             Track->SetState( BEGIN_ONPAD, ON );
         else
             Track->SetState( BEGIN_ONPAD, OFF );
 
-        Track->end = GetBoard()->GetPadFast( Track->m_End, layerMask );
+        Track->end = GetBoard()->GetPadFast( Track->GetEnd(), layerMask );
 
         if( Track->end )
             Track->SetState( END_ONPAD, ON );

=== modified file 'pcbnew/plot_board_layers.cpp'
--- pcbnew/plot_board_layers.cpp	2012-12-03 14:27:34 +0000
+++ pcbnew/plot_board_layers.cpp	2013-01-08 14:19:26 +0000
@@ -137,7 +137,7 @@
         if( ( ( 1 << seg->GetLayer() ) & aLayerMask ) == 0 )
             continue;
 
-        aPlotter->ThickSegment( seg->m_Start, seg->m_End, seg->m_Width,
+        aPlotter->ThickSegment( seg->GetStart(), seg->GetEnd(), seg->GetWidth(),
                                 itemplotter.GetMode() );
     }
 }
@@ -392,17 +392,17 @@
         if( aLayerMask & ALL_CU_LAYERS )
             width_adj = itemplotter.getFineWidthAdj();
 
-        int diameter = Via->m_Width + 2 * via_margin + width_adj;
+        int diameter = Via->GetWidth() + 2 * via_margin + width_adj;
 
         // Don't draw a null size item :
         if( diameter <= 0 )
             continue;
 
-        EDA_COLOR_T color = aBoard->GetVisibleElementColor(VIAS_VISIBLE + Via->m_Shape);
+        EDA_COLOR_T color = aBoard->GetVisibleElementColor(VIAS_VISIBLE + Via->GetShape());
         // Set plot color (change WHITE to LIGHTGRAY because
         // the white items are not seen on a white paper or screen
         aPlotter->SetColor( color != WHITE ? color : LIGHTGRAY);
-        aPlotter->FlashPadCircle( Via->m_Start, diameter, plotMode );
+        aPlotter->FlashPadCircle( Via->GetStart(), diameter, plotMode );
     }
 
     // Plot tracks (not vias) :
@@ -414,9 +414,9 @@
         if( (GetLayerMask( track->GetLayer() ) & aLayerMask) == 0 )
             continue;
 
-        int width = track->m_Width + itemplotter.getFineWidthAdj();
+        int width = track->GetWidth() + itemplotter.getFineWidthAdj();
         aPlotter->SetColor( itemplotter.getColor( track->GetLayer() ) );
-        aPlotter->ThickSegment( track->m_Start, track->m_End, width, plotMode );
+        aPlotter->ThickSegment( track->GetStart(), track->GetEnd(), width, plotMode );
     }
 
     // Plot zones (outdated, for old boards compatibility):
@@ -425,9 +425,9 @@
         if( (GetLayerMask( track->GetLayer() ) & aLayerMask) == 0 )
             continue;
 
-        int width = track->m_Width + itemplotter.getFineWidthAdj();
+        int width = track->GetWidth() + itemplotter.getFineWidthAdj();
         aPlotter->SetColor( itemplotter.getColor( track->GetLayer() ) );
-        aPlotter->ThickSegment( track->m_Start, track->m_End, width, plotMode );
+        aPlotter->ThickSegment( track->GetStart(), track->GetEnd(), width, plotMode );
     }
 
     // Plot filled ares

=== modified file 'pcbnew/plot_brditems_plotter.cpp'
--- pcbnew/plot_brditems_plotter.cpp	2012-12-19 19:31:36 +0000
+++ pcbnew/plot_brditems_plotter.cpp	2013-01-08 16:27:30 +0000
@@ -711,8 +711,8 @@
             continue;
 
         plotOneDrillMark(PAD_CIRCLE,
-                       pts->m_Start, wxSize( pts->GetDrillValue(), 0 ),
-                       wxSize( pts->m_Width, 0 ), 0, small_drill );
+                       pts->GetStart(), wxSize( pts->GetDrillValue(), 0 ),
+                       wxSize( pts->GetWidth(), 0 ), 0, small_drill );
     }
 
     for( MODULE *Module = m_board->m_Modules; Module != NULL; Module = Module->Next() )

=== modified file 'pcbnew/print_board_functions.cpp'
--- pcbnew/print_board_functions.cpp	2012-09-02 16:38:52 +0000
+++ pcbnew/print_board_functions.cpp	2013-01-08 16:34:20 +0000
@@ -231,12 +231,12 @@
 
         if( pt_trace->Type() == PCB_VIA_T ) // VIA encountered.
         {
-            int radius = pt_trace->m_Width >> 1;
-            EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + pt_trace->m_Shape );
+            int radius = pt_trace->GetWidth() >> 1;
+            EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + pt_trace->GetShape() );
             GRSetDrawMode( aDC, drawmode );
             GRFilledCircle( m_canvas->GetClipBox(), aDC,
-                            pt_trace->m_Start.x,
-                            pt_trace->m_Start.y,
+                            pt_trace->GetStart().x,
+                            pt_trace->GetStart().y,
                             radius,
                             0, color, color );
         }
@@ -305,7 +305,7 @@
                     diameter = pt_trace->GetDrillValue();
 
                 GRFilledCircle( m_canvas->GetClipBox(), aDC,
-                                pt_trace->m_Start.x, pt_trace->m_Start.y,
+                                pt_trace->GetStart().x, pt_trace->GetStart().y,
                                 diameter/2,
                                 0, color, color );
             }

=== modified file 'pcbnew/ratsnest.cpp'
--- pcbnew/ratsnest.cpp	2012-09-22 11:19:37 +0000
+++ pcbnew/ratsnest.cpp	2013-01-08 16:41:08 +0000
@@ -843,10 +843,10 @@
 
             if( !track->GetSubNet() || (track->GetSubNet() != subnet) )
             {
-                if( aPosition != track->m_Start )
-                    s_TargetsLocations.push_back( track->m_Start );
-                if( aPosition != track->m_End && track->m_Start != track->m_End )
-                    s_TargetsLocations.push_back( track->m_End );
+                if( aPosition != track->GetStart() )
+                    s_TargetsLocations.push_back( track->GetStart() );
+                if( aPosition != track->GetEnd() && track->GetStart() != track->GetEnd() )
+                    s_TargetsLocations.push_back( track->GetEnd() );
             }
         }
 

=== modified file 'pcbnew/specctra_export.cpp'
--- pcbnew/specctra_export.cpp	2012-08-29 16:59:50 +0000
+++ pcbnew/specctra_export.cpp	2013-01-08 16:55:04 +0000
@@ -761,7 +761,7 @@
     if( topLayer > botLayer )
         EXCHG( topLayer, botLayer );
 
-    return makeVia( aVia->m_Width, aVia->GetDrillValue(), topLayer, botLayer );
+    return makeVia( aVia->GetWidth(), aVia->GetDrillValue(), topLayer, botLayer );
 }
 
 
@@ -1493,12 +1493,12 @@
                 continue;
 
             if( old_netcode != netcode
-            ||  old_width   != track->m_Width
+            ||  old_width   != track->GetWidth()
             ||  old_layer   != track->GetLayer()
-            ||  (path && path->points.back() != mapPt(track->m_Start) )
+            ||  (path && path->points.back() != mapPt(track->GetStart()) )
               )
             {
-                old_width   = track->m_Width;
+                old_width   = track->GetWidth();
                 old_layer   = track->GetLayer();
 
                 if( old_netcode != netcode )
@@ -1524,10 +1524,10 @@
                 path->layer_id = layerIds[pcbLayer];
                 path->aperture_width = scale( old_width );
 
-                path->AppendPoint( mapPt( track->m_Start ) );
+                path->AppendPoint( mapPt( track->GetStart() ) );
             }
 
-            path->AppendPoint( mapPt( track->m_End ) );
+            path->AppendPoint( mapPt( track->GetEnd() ) );
         }
     }
 

=== modified file 'pcbnew/specctra_import.cpp'
--- pcbnew/specctra_import.cpp	2012-08-29 16:59:50 +0000
+++ pcbnew/specctra_import.cpp	2013-01-08 17:00:40 +0000
@@ -235,10 +235,10 @@
 
     TRACK* track = new TRACK( sessionBoard );
 
-    track->m_Start   = mapPt( aPath->points[aPointIndex+0], routeResolution );
-    track->m_End     = mapPt( aPath->points[aPointIndex+1], routeResolution );
+    track->SetStart( mapPt( aPath->points[aPointIndex+0], routeResolution ) );
+    track->SetEnd( mapPt( aPath->points[aPointIndex+1], routeResolution ) );
     track->SetLayer( pcbLayer2kicad[layerNdx] );
-    track->m_Width   = scale( aPath->aperture_width, routeResolution );
+    track->SetWidth( scale( aPath->aperture_width, routeResolution ) );
     track->SetNet( aNetcode );
 
     return track;
@@ -295,8 +295,8 @@
         via = new SEGVIA( sessionBoard );
         via->SetPosition( mapPt( aPoint, routeResolution ) );
         via->SetDrill( drillDiam );
-        via->m_Shape = VIA_THROUGH;
-        via->m_Width = viaDiam;
+        via->SetShape( VIA_THROUGH );
+        via->SetWidth( viaDiam );
         via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK );
     }
     else if( shapeCount == copperLayerCount )
@@ -313,8 +313,8 @@
         via = new SEGVIA( sessionBoard );
         via->SetPosition( mapPt( aPoint, routeResolution ) );
         via->SetDrill( drillDiam );
-        via->m_Shape = VIA_THROUGH;
-        via->m_Width = viaDiam;
+        via->SetShape( VIA_THROUGH );
+        via->SetWidth( viaDiam );
         via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK );
     }
     else    // VIA_MICROVIA or VIA_BLIND_BURIED
@@ -357,11 +357,11 @@
 
         if( (topLayerNdx==0 && botLayerNdx==1)
          || (topLayerNdx==copperLayerCount-2 && botLayerNdx==copperLayerCount-1))
-            via->m_Shape = VIA_MICROVIA;
+            via->SetShape( VIA_MICROVIA );
         else
-            via->m_Shape = VIA_BLIND_BURIED;
+            via->SetShape( VIA_BLIND_BURIED );
 
-        via->m_Width = viaDiam;
+        via->SetWidth( viaDiam );
 
         topLayerNdx = pcbLayer2kicad[topLayerNdx];
         botLayerNdx = pcbLayer2kicad[botLayerNdx];

=== modified file 'pcbnew/tr_modif.cpp'
--- pcbnew/tr_modif.cpp	2012-12-12 11:57:17 +0000
+++ pcbnew/tr_modif.cpp	2013-01-08 17:08:55 +0000
@@ -126,8 +126,8 @@
     if( ( StartTrack == NULL ) || ( EndTrack == NULL ) )
         return 0;
 
-    start = StartTrack->m_Start;
-    end   = EndTrack->m_End;
+    start = StartTrack->GetStart();
+    end   = EndTrack->GetEnd();
 
     // The start and end points cannot be the same.
     if( start == end )
@@ -248,7 +248,7 @@
             if( pt_segm->GetState( BUSY ) == 0 )
                 break;
 
-            if( pt_segm->m_Start == start || pt_segm->m_End == start )
+            if( pt_segm->GetStart() == start || pt_segm->GetEnd() == start )
             {
                 // Marked track can be erased.
                 TRACK* NextS;

=== modified file 'pcbnew/zones_polygons_insulated_copper_islands.cpp'
--- pcbnew/zones_polygons_insulated_copper_islands.cpp	2012-07-31 17:51:58 +0000
+++ pcbnew/zones_polygons_insulated_copper_islands.cpp	2013-01-08 18:21:28 +0000
@@ -74,10 +74,10 @@
         if( track->GetNet() != GetNet() )
             continue;
 
-        listPointsCandidates.push_back( track->m_Start );
+        listPointsCandidates.push_back( track->GetStart() );
 
         if( track->Type() != PCB_VIA_T )
-            listPointsCandidates.push_back( track->m_End );
+            listPointsCandidates.push_back( track->GetEnd() );
     }
 
     // test if a point is inside

=== modified file 'pcbnew/zones_polygons_test_connections.cpp'
--- pcbnew/zones_polygons_test_connections.cpp	2012-09-22 11:19:37 +0000
+++ pcbnew/zones_polygons_test_connections.cpp	2013-01-06 10:28:24 +0000
@@ -169,12 +169,12 @@
                     }
                     else if( item->Type() == PCB_VIA_T )
                     {
-                        pos1 = pos2 = ( (SEGVIA*) item )->m_Start;
+                        pos1 = pos2 = ( (SEGVIA*) item )->GetStart();
                     }
                     else if( item->Type() == PCB_TRACE_T )
                     {
-                        pos1 = ( (TRACK*) item )->m_Start;
-                        pos2 = ( (TRACK*) item )->m_End;
+                        pos1 = ( (TRACK*) item )->GetStart();
+                        pos2 = ( (TRACK*) item )->GetEnd();
                     }
                     else
                     {


Follow ups