Commit 3d82623c authored by dickelbeck's avatar dickelbeck

track & via recovery stuff

parent ce91e15b
...@@ -4,6 +4,19 @@ Started 2007-June-11 ...@@ -4,6 +4,19 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2007-Oct-19 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ pcbnew
* "Clean tracks" changed to "Track operations".
* Housekeeping on clean.cpp completed.
Added static void ConnectDanglingEndToVia( BOARD* pcb ) in clean.cpp which
extends tracks to via centers. Call it from "extend to pads", works nice.
* Added tooltip text to cleaningoptions_dialog.cpp's m_ConnectToPadsOpt
but don't know if DialogBlocks will parse this backwards.
* Made compilable, somebody broke #define VIA_???? s throughout. Would not compile.
* SEGVIA::SetPos() & GetPos() added.
2007-Oct-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-Oct-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+ pcbnew: + pcbnew:
...@@ -11,8 +24,6 @@ email address. ...@@ -11,8 +24,6 @@ email address.
rastnest computation does not work (errors) with short track segments rastnest computation does not work (errors) with short track segments
(lenght < width) . This is not a bug, but an algorithm problem, so (lenght < width) . This is not a bug, but an algorithm problem, so
I must work on algos. I must work on algos.
2007-Oct-17 UPDATE Geoff Harland <gharlandau@yahoo.com.au> 2007-Oct-17 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
......
...@@ -244,6 +244,9 @@ public: ...@@ -244,6 +244,9 @@ public:
void SetLayerPair( int top_layer, int bottom_layer ); void SetLayerPair( int top_layer, int bottom_layer );
void ReturnLayerPair( int* top_layer, int* bottom_layer ) const; void ReturnLayerPair( int* top_layer, int* bottom_layer ) const;
const wxPoint& GetPos() const { return m_Start; }
void SetPos( const wxPoint& aPoint ) { m_Start=aPoint; m_End=aPoint; }
/** /**
* Function GetClass * Function GetClass
* returns the class name. * returns the class name.
......
This diff is collapsed.
...@@ -160,6 +160,7 @@ void WinEDA_CleaningOptionsFrame::CreateControls() ...@@ -160,6 +160,7 @@ void WinEDA_CleaningOptionsFrame::CreateControls()
itemStaticBoxSizer4->Add(m_DeleteunconnectedOpt, 0, wxALIGN_LEFT|wxALL, 5); itemStaticBoxSizer4->Add(m_DeleteunconnectedOpt, 0, wxALIGN_LEFT|wxALL, 5);
m_ConnectToPadsOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Connect to Pads"), wxDefaultPosition, wxDefaultSize, 0 ); m_ConnectToPadsOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Connect to Pads"), wxDefaultPosition, wxDefaultSize, 0 );
m_ConnectToPadsOpt->SetToolTip( _("Extend dangling tracks which partially cover a pad or via, all the way to pad or via center") );
m_ConnectToPadsOpt->SetValue(false); m_ConnectToPadsOpt->SetValue(false);
itemStaticBoxSizer4->Add(m_ConnectToPadsOpt, 0, wxALIGN_LEFT|wxALL, 5); itemStaticBoxSizer4->Add(m_ConnectToPadsOpt, 0, wxALIGN_LEFT|wxALL, 5);
......
...@@ -262,11 +262,10 @@ D_PAD* Locate_Pad_Connecte( BOARD* Pcb, TRACK* ptr_piste, int extr ) ...@@ -262,11 +262,10 @@ D_PAD* Locate_Pad_Connecte( BOARD* Pcb, TRACK* ptr_piste, int extr )
*/ */
{ {
D_PAD* ptr_pad = NULL; D_PAD* ptr_pad = NULL;
int masque_layer;
MODULE* module;
wxPoint ref_pos; wxPoint ref_pos;
masque_layer = g_TabOneLayerMask[ptr_piste->GetLayer()]; int masque_layer = g_TabOneLayerMask[ptr_piste->GetLayer()];
if( extr == START ) if( extr == START )
{ {
ref_pos = ptr_piste->m_Start; ref_pos = ptr_piste->m_Start;
...@@ -275,8 +274,8 @@ D_PAD* Locate_Pad_Connecte( BOARD* Pcb, TRACK* ptr_piste, int extr ) ...@@ -275,8 +274,8 @@ D_PAD* Locate_Pad_Connecte( BOARD* Pcb, TRACK* ptr_piste, int extr )
{ {
ref_pos = ptr_piste->m_End; ref_pos = ptr_piste->m_End;
} }
module = Pcb->m_Modules;
for( ; module != NULL; module = (MODULE*) module->Pnext ) for( MODULE* module = Pcb->m_Modules; module; module = module->Next() )
{ {
ptr_pad = Locate_Pads( module, ref_pos, masque_layer ); ptr_pad = Locate_Pads( module, ref_pos, masque_layer );
if( ptr_pad != NULL ) if( ptr_pad != NULL )
...@@ -421,13 +420,12 @@ D_PAD* Locate_Any_Pad( BOARD* Pcb, int typeloc, bool OnlyCurrentLayer ) ...@@ -421,13 +420,12 @@ D_PAD* Locate_Any_Pad( BOARD* Pcb, int typeloc, bool OnlyCurrentLayer )
D_PAD* Locate_Any_Pad( BOARD* Pcb, const wxPoint& ref_pos, bool OnlyCurrentLayer ) D_PAD* Locate_Any_Pad( BOARD* Pcb, const wxPoint& ref_pos, bool OnlyCurrentLayer )
{ {
D_PAD* pt_pad;
MODULE* module;
int layer_mask = g_TabOneLayerMask[ ( (PCB_SCREEN*) ActiveScreen )->m_Active_Layer]; int layer_mask = g_TabOneLayerMask[ ( (PCB_SCREEN*) ActiveScreen )->m_Active_Layer];
module = Pcb->m_Modules; for( MODULE* module=Pcb->m_Modules; module; module = module->Next() )
for( ; module != NULL; module = (MODULE*) module->Pnext )
{ {
D_PAD* pt_pad;
/* First: Search a pad on the active layer: */ /* First: Search a pad on the active layer: */
if( ( pt_pad = Locate_Pads( module, ref_pos, layer_mask ) ) != NULL ) if( ( pt_pad = Locate_Pads( module, ref_pos, layer_mask ) ) != NULL )
return pt_pad; return pt_pad;
...@@ -468,8 +466,7 @@ D_PAD* Locate_Pads( MODULE* module, int masque_layer, int typeloc ) ...@@ -468,8 +466,7 @@ D_PAD* Locate_Pads( MODULE* module, int masque_layer, int typeloc )
D_PAD* Locate_Pads( MODULE* module, const wxPoint& ref_pos, int masque_layer ) D_PAD* Locate_Pads( MODULE* module, const wxPoint& ref_pos, int masque_layer )
{ {
D_PAD* pt_pad = module->m_Pads; for( D_PAD* pt_pad = module->m_Pads; pt_pad; pt_pad = pt_pad->Next() )
for( ; pt_pad != NULL; pt_pad = (D_PAD*) pt_pad->Pnext )
{ {
/* ... et sur la bonne couche */ /* ... et sur la bonne couche */
if( (pt_pad->m_Masque_Layer & masque_layer) == 0 ) if( (pt_pad->m_Masque_Layer & masque_layer) == 0 )
......
...@@ -251,8 +251,8 @@ wxMenuBar * menuBar = GetMenuBar(); ...@@ -251,8 +251,8 @@ wxMenuBar * menuBar = GetMenuBar();
item->SetBitmap(tools_xpm); item->SetBitmap(tools_xpm);
miscellaneous_menu->Append(item); miscellaneous_menu->Append(item);
item = new wxMenuItem(miscellaneous_menu, ID_MENU_PCB_CLEAN, _("&Clean tracks"), item = new wxMenuItem(miscellaneous_menu, ID_MENU_PCB_CLEAN, _("&Track operations"),
_("Clean stubs, vias, delete break points")); _("Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias"));
item->SetBitmap(delete_body_xpm); item->SetBitmap(delete_body_xpm);
miscellaneous_menu->Append(item); miscellaneous_menu->Append(item);
......
...@@ -72,4 +72,7 @@ others (what are they?): ...@@ -72,4 +72,7 @@ others (what are they?):
: :
: :
*** Add tooltip text to cleaningoptions_dialog.cpp throughout for all options.
Might need to do this using DialogBlocks.
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