KiCad PCB EDA Suite
editrack-part2.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
7  * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, you may find one here:
21  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22  * or you may search the http://www.gnu.org website for the version 2 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
32 #include <fctsys.h>
33 #include <gr_basic.h>
34 #include <class_drawpanel.h>
35 #include <confirm.h>
36 #include <pcb_edit_frame.h>
37 
38 #include <class_board.h>
39 #include <class_module.h>
40 #include <class_track.h>
41 #include <class_marker_pcb.h>
42 
43 #include <pcbnew.h>
44 #include <drc.h>
45 
46 #include <connectivity_data.h>
47 
48 
49 bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
50 {
51  unsigned itmp;
52 
53  if( aTrack == NULL )
54  {
55  if( GetActiveLayer() != GetScreen()->m_Route_Layer_TOP )
56  SetActiveLayer( GetScreen()->m_Route_Layer_TOP );
57  else
58  SetActiveLayer( GetScreen()->m_Route_Layer_BOTTOM );
59 
61  return true;
62  }
63 
64  // Avoid more than one via on the current location:
65  if( GetBoard()->GetViaByPosition( g_CurrentTrackSegment->GetEnd(),
66  g_CurrentTrackSegment->GetLayer() ) )
67  return false;
68 
69  for( TRACK* segm = g_FirstTrackSegment; segm; segm = segm->Next() )
70  {
71  if( segm->Type() == PCB_VIA_T && g_CurrentTrackSegment->GetEnd() == segm->GetStart() )
72  return false;
73  }
74 
75  // Is the current segment Ok (no DRC error) ?
76  if( Settings().m_legacyDrcOn )
77  {
78  if( BAD_DRC==m_drc->Drc( g_CurrentTrackSegment, GetBoard()->m_Track ) )
79  // DRC error, the change layer is not made
80  return false;
81 
82  // Handle 2 segments.
84  {
85  if( BAD_DRC == m_drc->Drc( g_CurrentTrackSegment->Back(), GetBoard()->m_Track ) )
86  return false;
87  }
88  }
89 
90  /* Save current state before placing a via.
91  * If the via cannot be placed this current state will be reused
92  */
95 
96  m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
97 
98  // create the via
99  VIA* via = new VIA( GetBoard() );
100  via->SetFlags( IS_NEW );
101  via->SetViaType( GetDesignSettings().m_CurrentViaType );
102  via->SetNetCode( GetBoard()->GetHighLightNetCode() );
103  via->SetPosition( g_CurrentTrackSegment->GetEnd() );
104 
105  // for microvias, the size and hole will be changed later.
106  via->SetWidth( GetDesignSettings().GetCurrentViaSize());
107  via->SetDrill( GetDesignSettings().GetCurrentViaDrill() );
108 
109  // Usual via is from copper to component.
110  // layer pair is B_Cu and F_Cu.
111  via->SetLayerPair( B_Cu, F_Cu );
112 
113  PCB_LAYER_ID first_layer = GetActiveLayer();
114  PCB_LAYER_ID last_layer;
115 
116  // prepare switch to new active layer:
117  if( first_layer != GetScreen()->m_Route_Layer_TOP )
118  last_layer = GetScreen()->m_Route_Layer_TOP;
119  else
120  last_layer = GetScreen()->m_Route_Layer_BOTTOM;
121 
122  // Adjust the actual via layer pair
123  switch( via->GetViaType() )
124  {
125  case VIA_BLIND_BURIED:
126  via->SetLayerPair( first_layer, last_layer );
127  break;
128 
129  case VIA_MICROVIA: // from external to the near neighbor inner layer
130  {
131  PCB_LAYER_ID last_inner_layer = ToLAYER_ID( ( GetBoard()->GetCopperLayerCount() - 2 ) );
132 
133  if( first_layer == B_Cu )
134  last_layer = last_inner_layer;
135  else if( first_layer == F_Cu )
136  last_layer = In1_Cu;
137  else if( first_layer == last_inner_layer )
138  last_layer = B_Cu;
139  else if( first_layer == In1_Cu )
140  last_layer = F_Cu;
141  // else error: will be removed later
142  via->SetLayerPair( first_layer, last_layer );
143 
144  // Update diameter and hole size, which where set previously
145  // for normal vias
146  NETINFO_ITEM* net = via->GetNet();
147  via->SetWidth( net->GetMicroViaSize() );
148  via->SetDrill( net->GetMicroViaDrillSize() );
149  }
150  break;
151 
152  default:
153  break;
154  }
155 
156  if( Settings().m_legacyDrcOn && BAD_DRC == m_drc->Drc( via, GetBoard()->m_Track ) )
157  {
158  // DRC fault: the Via cannot be placed here ...
159  delete via;
160 
161  m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
162 
163  // delete the track(s) added in Begin_Route()
164  while( g_CurrentTrackList.GetCount() > itmp )
165  {
167  }
168 
170 
171  // Refresh DRC diag, erased by previous calls
172  if( m_drc->GetCurrentMarker() )
174 
175  return false;
176  }
177 
178  SetActiveLayer( last_layer );
179 
180  TRACK* lastNonVia = g_CurrentTrackSegment;
181 
182  /* A new via was created. It was Ok.
183  */
185 
186  /* The via is now in linked list and we need a new track segment
187  * after the via, starting at via location.
188  * it will become the new current segment (from via to the mouse cursor)
189  */
190 
191  TRACK* track = (TRACK*)lastNonVia->Clone();
192 
193  /* the above creates a new segment from the last entered segment, with the
194  * current width, flags, netcode, etc... values.
195  * layer, start and end point are not correct,
196  * and will be modified next
197  */
198 
199  // set the layer to the new value
200  track->SetLayer( GetActiveLayer() );
201 
202  /* the start point is the via position and the end point is the cursor
203  * which also is on the via (will change when moving mouse)
204  */
205  track->SetEnd( via->GetStart() );
206  track->SetStart( via->GetStart() );
207 
208  g_CurrentTrackList.PushBack( track );
209 
210  if( Settings().m_legacyUseTwoSegmentTracks )
211  {
212  // Create a second segment (we must have 2 track segments to adjust)
214  }
215 
216  m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
217  SetMsgPanel( via );
218  UpdateStatusBar();
219 
220  return true;
221 }
222 
223 static void ListSetState( EDA_ITEM* Start, int NbItem, STATUS_FLAGS State,
224  bool onoff );
225 
226 
227 void DrawTraces( EDA_DRAW_PANEL* panel, wxDC* DC, TRACK* aTrackList, int nbsegment,
228  GR_DRAWMODE draw_mode )
229 {
230  // preserve the start of the list for debugging.
231  for( TRACK* track = aTrackList; nbsegment > 0 && track; nbsegment--, track = track->Next() )
232  {
233  track->Draw( panel, DC, draw_mode );
234  }
235 }
236 
237 
238 /*
239  * This function try to remove an old track, when a new track is created,
240  * and the old track is no more needed
241  */
243  TRACK* aNewTrack,
244  int aNewTrackSegmentsCount,
245  PICKED_ITEMS_LIST* aItemsListPicker )
246 {
247  TRACK* StartTrack, * EndTrack;
248  TRACK* pt_segm;
249  TRACK* pt_del;
250  int ii, jj, nb_segm, nbconnect;
251  wxPoint start;
252  wxPoint end;
253  LSET startmasklayer, endmasklayer;
254 
255  int netcode = aNewTrack->GetNetCode();
256 
257  /* Reconstruct the complete track (the new track has to start on a segment of track).
258  */
259  ListSetState( aNewTrack, aNewTrackSegmentsCount, BUSY, false );
260 
261  /* If the new track begins with a via, complete the track segment using
262  * the following segment as a reference because a via is often a hub of
263  * segments, and does not characterize track.
264  */
265  if( aNewTrack->Type() == PCB_VIA_T && ( aNewTrackSegmentsCount > 1 ) )
266  aNewTrack = aNewTrack->Next();
267 
268  aNewTrack = GetBoard()->MarkTrace( aNewTrack, &aNewTrackSegmentsCount, NULL, NULL, true );
269  wxASSERT( aNewTrack );
270 
271 #if 0 && defined(DEBUG)
272  TRACK* EndNewTrack; // The last segment of the list chained to the track
273 
274  EndNewTrack = aNewTrack;
275 
276  for( ii = 1; ii < aNewTrackSegmentsCount; ii++ )
277  {
278  wxASSERT( EndNewTrack->GetState( -1 ) != 0 );
279  D( printf( "track %p is newly part of net %d\n", EndNewTrack, netcode ); )
280  EndNewTrack = EndNewTrack->Next();
281  }
282 
283  wxASSERT( EndNewTrack->GetState( -1 ) != 0 );
284  D( printf( "track %p is newly part of net %d\n", EndNewTrack, netcode ); )
285 
286  for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() )
287  track->Show( 0, std::cout );
288 
289 #endif
290 
291  TRACK* bufStart = m_Pcb->m_Track->GetStartNetCode( netcode ); // Beginning of tracks of the net
292  TRACK* bufEnd = bufStart->GetEndNetCode( netcode ); // End of tracks of the net
293 
294  // Flags for cleaning the net.
295  for( pt_del = bufStart; pt_del; pt_del = pt_del->Next() )
296  {
297 // D( std::cout<<"track "<<pt_del<<" turning off BUSY | IN_EDIT | IS_LINKED"<<std::endl; )
298  pt_del->SetState( BUSY | IN_EDIT | IS_LINKED, false );
299 
300  if( pt_del == bufEnd ) // Last segment reached
301  break;
302  }
303 
304  if( aNewTrack->GetEndSegments( aNewTrackSegmentsCount, &StartTrack, &EndTrack ) == 0 )
305  return 0;
306 
307  if( ( StartTrack == NULL ) || ( EndTrack == NULL ) )
308  return 0;
309 
310  start = StartTrack->GetStart();
311  end = EndTrack->GetEnd();
312 
313  // The start and end points cannot be the same.
314  if( start == end )
315  return 0;
316 
317  // Determine layers interconnected these points.
318  startmasklayer = StartTrack->GetLayerSet();
319  endmasklayer = EndTrack->GetLayerSet();
320 
321  // There may be a via or a pad on the end points.
322  pt_segm = m_Pcb->m_Track->GetVia( NULL, start, startmasklayer );
323 
324  if( pt_segm )
325  startmasklayer |= pt_segm->GetLayerSet();
326 
327  if( StartTrack->start && ( StartTrack->start->Type() == PCB_PAD_T ) )
328  {
329  // Start on pad.
330  D_PAD* pad = (D_PAD*) StartTrack->start;
331  startmasklayer |= pad->GetLayerSet();
332  }
333 
334  pt_segm = m_Pcb->m_Track->GetVia( NULL, end, endmasklayer );
335 
336  if( pt_segm )
337  endmasklayer |= pt_segm->GetLayerSet();
338 
339  if( EndTrack->end && ( EndTrack->end->Type() == PCB_PAD_T ) )
340  {
341  D_PAD* pad = (D_PAD*) EndTrack->end;
342  endmasklayer |= pad->GetLayerSet();
343  }
344 
345  // Mark as deleted a new track (which is not involved in the search for other connections)
346  ListSetState( aNewTrack, aNewTrackSegmentsCount, IS_DELETED, true );
347 
348  /* A segment must be connected to the starting point, otherwise
349  * it is unnecessary to analyze the other point
350  */
351  pt_segm = GetTrack( bufStart, bufEnd, start, startmasklayer );
352 
353  if( pt_segm == NULL ) // Not connected to the track starting point.
354  {
355  // Clear the delete flag.
356  ListSetState( aNewTrack, aNewTrackSegmentsCount, IS_DELETED, false );
357  return 0;
358  }
359 
360  /* Marking a list of candidate segmented connect to endpoint
361  * Note: the vias are not taken into account because they do
362  * not define a track, since they are on an intersection.
363  */
364  for( pt_del = bufStart, nbconnect = 0; ; )
365  {
366  pt_segm = GetTrack( pt_del, bufEnd, end, endmasklayer );
367 
368  if( pt_segm == NULL )
369  break;
370 
371  if( pt_segm->Type() != PCB_VIA_T )
372  {
373  if( pt_segm->GetState( IS_LINKED ) == 0 )
374  {
375  pt_segm->SetState( IS_LINKED, true );
376  nbconnect++;
377  }
378  }
379 
380  if( pt_del == bufEnd )
381  break;
382 
383  pt_del = pt_segm->Next();
384  }
385 
386  if( nbconnect == 0 )
387  {
388  // Clear used flags
389  for( pt_del = bufStart; pt_del; pt_del = pt_del->Next() )
390  {
391  pt_del->SetState( BUSY | IS_DELETED | IN_EDIT | IS_LINKED, false );
392 
393  if( pt_del == bufEnd ) // Last segment reached
394  break;
395  }
396 
397  return 0;
398  }
399 
400  // Mark trace as edited (which does not involve searching for other tracks)
401  ListSetState( aNewTrack, aNewTrackSegmentsCount, IS_DELETED, false );
402  ListSetState( aNewTrack, aNewTrackSegmentsCount, IN_EDIT, true );
403 
404  // Test all marked segments.
405  while( nbconnect )
406  {
407  for( pt_del = bufStart; pt_del; pt_del = pt_del->Next() )
408  {
409  if( pt_del->GetState( IS_LINKED ) )
410  break;
411 
412  if( pt_del == bufEnd ) // Last segment reached
413  break;
414  }
415 
416  nbconnect--;
417 
418  if( pt_del )
419  pt_del->SetState( IS_LINKED, false );
420 
421  pt_del = GetBoard()->MarkTrace( pt_del, &nb_segm, NULL, NULL, true );
422 
423  /* Test if the marked track is redundant, i.e. if one of marked segments
424  * is connected to the starting point of the new track.
425  */
426  ii = 0;
427  pt_segm = pt_del;
428 
429  for( ; pt_segm && (ii < nb_segm); pt_segm = pt_segm->Next(), ii++ )
430  {
431  if( pt_segm->GetState( BUSY ) == 0 )
432  break;
433 
434  if( pt_segm->GetStart() == start || pt_segm->GetEnd() == start )
435  {
436  // Marked track can be erased.
437  TRACK* NextS;
438 
439  DrawTraces( m_canvas, aDC, pt_del, nb_segm, GR_XOR | GR_HIGHLIGHT );
440 
441  for( jj = 0; jj < nb_segm; jj++, pt_del = NextS )
442  {
443  NextS = pt_del->Next();
444 
445  if( aItemsListPicker )
446  {
447  pt_del->UnLink();
448  pt_del->SetStatus( 0 );
449  pt_del->ClearFlags();
450  GetBoard()->GetConnectivity()->Remove( pt_del );
451  ITEM_PICKER picker( pt_del, UR_DELETED );
452  aItemsListPicker->PushItem( picker );
453  }
454  else
455  {
456  GetBoard()->GetConnectivity()->Remove( pt_del );
457  pt_del->DeleteStructure();
458  }
459  }
460 
461  // Clean up flags.
462  for( pt_del = m_Pcb->m_Track; pt_del != NULL; pt_del = pt_del->Next() )
463  {
464  if( pt_del->GetState( IN_EDIT ) )
465  {
466  pt_del->SetState( IN_EDIT, false );
467 
468  if( aDC )
469  pt_del->Draw( m_canvas, aDC, GR_OR );
470  }
471 
472  pt_del->SetState( IN_EDIT | IS_LINKED, false );
473  }
474 
475  return 1;
476  }
477  }
478 
479  // Clear BUSY flag here because the track did not get marked.
480  ListSetState( pt_del, nb_segm, BUSY, false );
481  }
482 
483  // Clear used flags
484  for( pt_del = m_Pcb->m_Track; pt_del; pt_del = pt_del->Next() )
485  {
486  pt_del->SetState( BUSY | IS_DELETED | IN_EDIT | IS_LINKED, false );
487 
488  if( pt_del == bufEnd ) // Last segment reached
489  break;
490  }
491 
492  return 0;
493 }
494 
495 
496 /* Set the bits of .m_State member to on/off value, using bit mask State
497  * of a list of EDA_ITEM
498  */
499 static void ListSetState( EDA_ITEM* Start, int NbItem, STATUS_FLAGS State,
500  bool onoff )
501 {
502  for( ; (Start != NULL ) && ( NbItem > 0 ); NbItem--, Start = Start->Next() )
503  {
504  Start->SetState( State, onoff );
505  }
506 }
static void ListSetState(EDA_ITEM *Start, int NbItem, STATUS_FLAGS State, bool onoff)
#define IS_LINKED
Used in calculation to mark linked items (temporary use)
Definition: base_struct.h:106
#define g_FirstTrackSegment
first segment created
Definition: pcbnew.h:100
#define g_CurrentTrackSegment
most recently created segment
Definition: pcbnew.h:99
KICAD_T Type() const
Function Type()
Definition: base_struct.h:209
bool Other_Layer_Route(TRACK *track, wxDC *DC)
Function Other_Layer_Route operates in one of two ways.
TRACK * GetTrack(TRACK *aStartTrace, const TRACK *aEndTrace, const wxPoint &aPosition, LSET aLayerMask)
Function GetTrack is a helper function to locate a trace segment having an end point at aPosition on ...
Definition: class_track.cpp:68
#define IN_EDIT
Item currently edited.
Definition: base_struct.h:107
TRACK * Delete_Segment(wxDC *DC, TRACK *Track)
Function Delete_Segment removes a track segment.
Definition: deltrack.cpp:45
void SetViaType(VIATYPE_T aViaType)
Definition: class_track.h:459
void SetPosition(const wxPoint &aPoint) override
Definition: class_track.h:431
virtual void SetLayer(PCB_LAYER_ID aLayer)
Function SetLayer sets the layer this item is on.
This file is part of the common library.
void SetEnd(const wxPoint &aEnd)
Definition: class_track.h:118
DLIST< TRACK > g_CurrentTrackList
Definition: pcbnew.cpp:89
Class BOARD to handle a board.
void SetCurItem(BOARD_ITEM *aItem, bool aDisplayInfo=true)
Function SetCurItem sets the currently selected item and displays it in the MsgPanel.
virtual EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
int GetEndSegments(int NbSegm, TRACK **StartTrack, TRACK **EndTrack)
Function GetEndSegments get the segments connected to the end point of the track. ...
BOARD * GetBoard() const
void PushItem(const ITEM_PICKER &aItem)
Function PushItem pushes aItem to the top of the list.
class D_PAD, a pad in a footprint
Definition: typeinfo.h:90
#define BUSY
Pcbnew: flag indicating that the structure has.
Definition: base_struct.h:130
EDA_ITEM * Next() const
Definition: base_struct.h:217
DRC * m_drc
the DRC controller, see drc.cpp
TRACK * Begin_Route(TRACK *aTrack, wxDC *aDC)
Function Begin_Route Starts a new track and/or establish of a new track point.
Definition: editrack.cpp:98
virtual void UnLink()
Function UnLink detaches this object from its owner.
int GetState(int type) const
Definition: base_struct.h:248
const wxPoint & GetEnd() const
Definition: class_track.h:119
Functions relatives to tracks, vias and segments used to fill zones.
void SetWidth(int aWidth)
Definition: class_track.h:115
void PushBack(T *aNewElement)
Function PushBack puts aNewElement at the end of the list sequence.
Definition: dlist.h:250
#define IS_NEW
New item, just created.
Definition: base_struct.h:109
VIA * GetVia(const wxPoint &aPosition, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
Function GetVia finds the first VIA object at aPosition on aLayer starting at the trace...
Markers used to show a drc problem on boards.
PCB_LAYER_ID
A quick note on layer IDs:
Class LSET is a set of PCB_LAYER_IDs.
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:264
VIATYPE_T GetViaType() const
Definition: class_track.h:458
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Function SetMsgPanel clears the message panel and populates it with the contents of aList...
Definition: draw_frame.cpp:831
int EraseRedundantTrack(wxDC *aDC, TRACK *aNewTrack, int aNewTrackSegmentsCount, PICKED_ITEMS_LIST *aItemsListPicker)
Function EraseRedundantTrack Called after creating a track Remove (if exists) the old track that have...
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
#define IS_DELETED
Definition: base_struct.h:112
PCB_GENERAL_SETTINGS & Settings()
const wxPoint & GetStart() const
Definition: class_track.h:122
LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
Definition: class_pad.h:402
void CallMouseCapture(wxDC *aDC, const wxPoint &aPosition, bool aErase)
Function CallMouseCapture calls the mouse capture callback.
virtual LSET GetLayerSet() const
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
MARKER_PCB * GetCurrentMarker()
Definition: drc.h:546
unsigned STATUS_FLAGS
Definition: base_struct.h:142
void DrawTraces(EDA_DRAW_PANEL *panel, wxDC *DC, TRACK *aTrackList, int nbsegment, GR_DRAWMODE draw_mode)
Function DrawTraces Draws n consecutive track segments in list.
PCB_LAYER_ID m_Route_Layer_BOTTOM
Definition: pcb_screen.h:46
bool SetNetCode(int aNetCode, bool aNoAssert=false)
Function SetNetCode sets net using a net code.
TRACK * GetEndNetCode(int NetCode)
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings returns the BOARD_DESIGN_SETTINGS for the BOARD owned by this frame...
void SetLayerPair(PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer)
Function SetLayerPair For a via m_Layer contains the top layer, the other layer is in m_BottomLayer...
TRACK * MarkTrace(TRACK *aTrace, int *aCount, double *aTraceLength, double *aInPackageLength, bool aReorder)
Function MarkTrace marks a chain of trace segments, connected to aTrace.
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
#define BAD_DRC
Definition: drc.h:36
Definition: gr_basic.h:38
int GetNetCode() const
Function GetNetCode.
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:106
Class NETINFO_ITEM handles the data for a net.
Definition: netinfo.h:69
virtual void UpdateStatusBar() override
Function UpdateStatusBar updates the status bar information.
#define D(x)
Definition: ptree.cpp:41
TRACK * Next() const
Definition: class_track.h:99
void SetState(int type, int state)
Definition: base_struct.h:253
TRACK * GetStartNetCode(int NetCode)
void SetDrill(int aDrill)
Function SetDrill sets the drill value for vias.
Definition: class_track.h:466
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:162
PCB_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
int GetMicroViaDrillSize()
Function GetViaDrillSize returns the size of via drills used to route this net.
Definition: netinfo.h:182
unsigned GetCount() const
Function GetCount returns the number of elements in the list.
Definition: dlist.h:126
void SetStart(const wxPoint &aStart)
Definition: class_track.h:121
int Drc(TRACK *aRefSeg, TRACK *aList)
Function Drc tests the current segment and returns the result and displays the error in the status pa...
Definition: drc.cpp:163
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:96
DLIST< TRACK > m_Track
Definition: class_board.h:246
Module description (excepted pads)
int GetMicroViaSize()
Function GetMicroViaSize returns the size of vias used to route this net.
Definition: netinfo.h:162
BOARD_CONNECTED_ITEM * end
Definition: class_track.h:91
BOARD_CONNECTED_ITEM * start
Definition: class_track.h:90
virtual void SetActiveLayer(PCB_LAYER_ID aLayer) override
Function SetActiveLayer will change the currently active layer to aLayer and also update the PCB_LAYE...
virtual PCB_LAYER_ID GetActiveLayer() const
Function GetActiveLayer returns the active layer.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:796
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:291
NETINFO_ITEM * GetNet() const
Function GetNet Returns NET_INFO object for a given item.
PCB_LAYER_ID m_Route_Layer_TOP
Definition: pcb_screen.h:45