Commit 39afce35 authored by charras's avatar charras

pcbnew: serious bugs fixed (see changelog)

parent 6b8bc98d
......@@ -5,6 +5,20 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2009-mar-05 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++pcbnew:
bug fix in move_or_drag_track.cpp:
function SortTrackEndPoints() broken: does not handle pointers to pads for start and end and flags relative to these pointers
MergeCollinearTracks( ) broken, because it merge segments having different width or without any connectivity test.
2 collinear segments can be merged only in no other segment or vais is connected to the common point
and if they have the same width. See cleanup.cpp for merge functions
These functions break the connectivity calculations.
So they are temporary disabled (see my comments in these functions)
bug fix in Marque_Une_Piste(): the last segments created can be see as part of the flagged track:
so delete track (or edit track width) deletes the track and some others segments (last created)
2009-Feb-25 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++EESchema
......
This diff is collapsed.
......@@ -55,18 +55,24 @@ TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
if( aTrackList == NULL )
return NULL;
/* Marquage du segment pointe */
if( flagcolor )
aTrackList->Draw( frame->DrawPanel, DC, flagcolor );
// Ensure the flag BUSY is cleared because we use it to mark segments of the track
for( TRACK* track = frame->GetBoard()->m_Track; track; track = track->Next() )
track->SetState( BUSY , OFF );
/* Set flags of the initial track segment */
aTrackList->SetState( BUSY, ON );
int masque_layer = aTrackList->ReturnMaskLayer();
trackList.push_back( aTrackList );
/* Traitement du segment pointe : si c'est un segment, le cas est simple.
* Si c'est une via, on doit examiner le nombre de segments connectes.
* Si <=2, on doit detecter une piste, si > 2 seule la via est marquee
/* Examine the initial track segment : if it is really a segment, this is easy.
* If it is a via, one must search for connected segments.
* If <=2, this via connect 2 segments (or is connected to only one segment)
* and this via and these 2 segments are a part of a track.
* If > 2 only this via is flagged (the track has only this via)
*/
if( aTrackList->Type() == TYPE_VIA )
{
......@@ -83,17 +89,17 @@ TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
Segm3 = Fast_Locate_Piste( Segm2->Next(), NULL,
aTrackList->m_Start, masque_layer );
}
if( Segm3 )
if( Segm3 ) // More than 2 segments are connected to this via. the "track" is only this via
{
*nb_segm = 1;
return aTrackList;
}
if( Segm1 )
if( Segm1 ) // search for others segments connected to the initial segment start point
{
masque_layer = Segm1->ReturnMaskLayer();
Marque_Chaine_segments( frame->GetBoard(), aTrackList->m_Start, masque_layer, &trackList );
}
if( Segm2 )
if( Segm2 ) // search for others segments connected to the initial segment end point
{
masque_layer = Segm2->ReturnMaskLayer();
Marque_Chaine_segments( frame->GetBoard(), aTrackList->m_Start, masque_layer, &trackList );
......@@ -171,9 +177,7 @@ TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
if( track->GetState( BUSY ) )
{
NbSegmBusy++;
track->UnLink();
list->Insert( track, firstTrack->Next() );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment