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 
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  {
79  // DRC error, the change layer is not made
80  return false;
81 
82  // Handle 2 segments.
84  {
86  GetBoard()->m_Track ) )
87  return false;
88  }
89  }
90 
91  /* Save current state before placing a via.
92  * If the via cannot be placed this current state will be reused
93  */
96 
97  m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
98 
99  // create the via
100  VIA* via = new VIA( GetBoard() );
101  via->SetFlags( IS_NEW );
102  via->SetViaType( GetDesignSettings().m_CurrentViaType );
103  via->SetNetCode( GetBoard()->GetHighLightNetCode() );
104  via->SetPosition( g_CurrentTrackSegment->GetEnd() );
105 
106  // for microvias, the size and hole will be changed later.
107  via->SetWidth( GetDesignSettings().GetCurrentViaSize());
108  via->SetDrill( GetDesignSettings().GetCurrentViaDrill() );
109 
110  // Usual via is from copper to component.
111  // layer pair is B_Cu and F_Cu.
112  via->SetLayerPair( B_Cu, F_Cu );
113 
114  PCB_LAYER_ID first_layer = GetActiveLayer();
115  PCB_LAYER_ID last_layer;
116 
117  // prepare switch to new active layer:
118  if( first_layer != GetScreen()->m_Route_Layer_TOP )
119  last_layer = GetScreen()->m_Route_Layer_TOP;
120  else
121  last_layer = GetScreen()->m_Route_Layer_BOTTOM;
122 
123  // Adjust the actual via layer pair
124  switch( via->GetViaType() )
125  {
126  case VIA_BLIND_BURIED:
127  via->SetLayerPair( first_layer, last_layer );
128  break;
129 
130  case VIA_MICROVIA: // from external to the near neighbor inner layer
131  {
132  PCB_LAYER_ID last_inner_layer = ToLAYER_ID( ( GetBoard()->GetCopperLayerCount() - 2 ) );
133 
134  if( first_layer == B_Cu )
135  last_layer = last_inner_layer;
136  else if( first_layer == F_Cu )
137  last_layer = In1_Cu;
138  else if( first_layer == last_inner_layer )
139  last_layer = B_Cu;
140  else if( first_layer == In1_Cu )
141  last_layer = F_Cu;
142  // else error: will be removed later
143  via->SetLayerPair( first_layer, last_layer );
144 
145  // Update diameter and hole size, which where set previously
146  // for normal vias
147  NETINFO_ITEM* net = via->GetNet();
148  via->SetWidth( net->GetMicroViaSize() );
149  via->SetDrill( net->GetMicroViaDrillSize() );
150  }
151  break;
152 
153  default:
154  break;
155  }
156 
157  if( Settings().m_legacyDrcOn &&
158  BAD_DRC == m_drc->DrcOnCreatingTrack( via, GetBoard()->m_Track ) )
159  {
160  // DRC fault: the Via cannot be placed here ...
161  delete via;
162 
163  m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
164 
165  // delete the track(s) added in Begin_Route()
166  while( g_CurrentTrackList.GetCount() > itmp )
167  {
169  }
170 
172 
173  // Refresh DRC diag, erased by previous calls
174  if( m_drc->GetCurrentMarker() )
176 
177  return false;
178  }
179 
180  SetActiveLayer( last_layer );
181 
182  TRACK* lastNonVia = g_CurrentTrackSegment;
183 
184  /* A new via was created. It was Ok.
185  */
187 
188  /* The via is now in linked list and we need a new track segment
189  * after the via, starting at via location.
190  * it will become the new current segment (from via to the mouse cursor)
191  */
192 
193  TRACK* track = (TRACK*)lastNonVia->Clone();
194 
195  /* the above creates a new segment from the last entered segment, with the
196  * current width, flags, netcode, etc... values.
197  * layer, start and end point are not correct,
198  * and will be modified next
199  */
200 
201  // set the layer to the new value
202  track->SetLayer( GetActiveLayer() );
203 
204  /* the start point is the via position and the end point is the cursor
205  * which also is on the via (will change when moving mouse)
206  */
207  track->SetEnd( via->GetStart() );
208  track->SetStart( via->GetStart() );
209 
210  g_CurrentTrackList.PushBack( track );
211 
212  if( Settings().m_legacyUseTwoSegmentTracks )
213  {
214  // Create a second segment (we must have 2 track segments to adjust)
216  }
217 
218  m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
219  SetMsgPanel( via );
220  UpdateStatusBar();
221 
222  return true;
223 }
224 
225 static void ListSetState( EDA_ITEM* Start, int NbItem, STATUS_FLAGS State,
226  bool onoff );
227 
228 
229 void DrawTraces( EDA_DRAW_PANEL* panel, wxDC* DC, TRACK* aTrackList, int nbsegment,
230  GR_DRAWMODE draw_mode )
231 {
232  // preserve the start of the list for debugging.
233  for( TRACK* track = aTrackList; nbsegment > 0 && track; nbsegment--, track = track->Next() )
234  {
235  track->Draw( panel, DC, draw_mode );
236  }
237 }
238 
239 
240 /*
241  * This function try to remove an old track, when a new track is created,
242  * and the old track is no more needed
243  */
245  TRACK* aNewTrack,
246  int aNewTrackSegmentsCount,
247  PICKED_ITEMS_LIST* aItemsListPicker )
248 {
249  TRACK* StartTrack, * EndTrack;
250  TRACK* pt_segm;
251  TRACK* pt_del;
252  int nb_segm, nbconnect;
253  wxPoint start;
254  wxPoint end;
255  LSET startmasklayer, endmasklayer;
256  int netcode = aNewTrack->GetNetCode();
257 
258  // Reconstruct the complete track (the new track has to start on a segment of track).
259  // Note: aNewTrackSegmentsCount conatins the number of new track segments
260  ListSetState( aNewTrack, aNewTrackSegmentsCount, BUSY, false );
261 
262  /* If the new track begins with a via, complete the track segment using
263  * the following segment as a reference because a via is often a hub of
264  * segments, and does not characterize track.
265  */
266  if( aNewTrack->Type() == PCB_VIA_T && ( aNewTrackSegmentsCount > 1 ) )
267  aNewTrack = aNewTrack->Next();
268 
269  // When MarkTrace try to find the entire track, if the starting segment
270  // is fully inside a pad, MarkTrace does not find correctly the full trace,
271  // because the entire track is the set of segments between 2 nodes
272  // (pads or point connecting more than 2 items)
273  // so use another (better) starting segment in this case
274  TRACK* track_segment = aNewTrack;
275 
276  for( int ii = 0; ii < aNewTrackSegmentsCount; ii++ )
277  {
278  D_PAD* pad_st = m_Pcb->GetPad( aNewTrack->GetStart() );
279  D_PAD* pad_end = m_Pcb->GetPad( aNewTrack->GetEnd() );
280 
281  if( pad_st && pad_st == pad_end )
282  track_segment = aNewTrack->Next();
283  else
284  break;
285  }
286 
287  // Mark the full trace containing track_segment, and recalculate the
288  // beginning of the trace, and the number of segments, as the new trace
289  // can contain also already existing track segments
290  aNewTrack = GetBoard()->MarkTrace( GetBoard()->m_Track, track_segment,
291  &aNewTrackSegmentsCount,
292  nullptr, nullptr, true );
293  wxASSERT( aNewTrack );
294 
295  TRACK* bufStart = m_Pcb->m_Track->GetStartNetCode( netcode ); // Beginning of tracks of the net
296  TRACK* bufEnd = bufStart->GetEndNetCode( netcode ); // End of tracks of the net
297 
298  // Flags for cleaning the net.
299  for( pt_del = bufStart; pt_del; pt_del = pt_del->Next() )
300  {
301  // printf( "track %p turning off BUSY | IN_EDIT | IS_LINKED\n", pt_del );
302  pt_del->SetState( BUSY | IN_EDIT | IS_LINKED, false );
303 
304  if( pt_del == bufEnd ) // Last segment reached
305  break;
306  }
307 
308  if( aNewTrack->GetEndSegments( aNewTrackSegmentsCount, &StartTrack, &EndTrack ) == 0 )
309  return 0;
310 
311  if( ( StartTrack == NULL ) || ( EndTrack == NULL ) )
312  return 0;
313 
314  start = StartTrack->GetStart();
315  end = EndTrack->GetEnd();
316 
317  // The start and end points cannot be the same.
318  if( start == end )
319  return 0;
320 
321  // Determine layers interconnected these points.
322  startmasklayer = StartTrack->GetLayerSet();
323  endmasklayer = EndTrack->GetLayerSet();
324 
325  // There may be a via or a pad on the end points.
326  pt_segm = m_Pcb->m_Track->GetVia( NULL, start, startmasklayer );
327 
328  if( pt_segm )
329  startmasklayer |= pt_segm->GetLayerSet();
330 
331  if( StartTrack->start && ( StartTrack->start->Type() == PCB_PAD_T ) )
332  {
333  // Start on pad.
334  D_PAD* pad = (D_PAD*) StartTrack->start;
335  startmasklayer |= pad->GetLayerSet();
336  }
337 
338  pt_segm = m_Pcb->m_Track->GetVia( NULL, end, endmasklayer );
339 
340  if( pt_segm )
341  endmasklayer |= pt_segm->GetLayerSet();
342 
343  if( EndTrack->end && ( EndTrack->end->Type() == PCB_PAD_T ) )
344  {
345  D_PAD* pad = (D_PAD*) EndTrack->end;
346  endmasklayer |= pad->GetLayerSet();
347  }
348 
349  // Mark as deleted a new track (which is not involved in the search for other connections)
350  ListSetState( aNewTrack, aNewTrackSegmentsCount, IS_DELETED, true );
351 
352  /* A segment must be connected to the starting point, otherwise
353  * it is unnecessary to analyze the other point
354  */
355  pt_segm = GetTrack( bufStart, bufEnd, start, startmasklayer );
356 
357  if( pt_segm == NULL ) // Not connected to the track starting point.
358  {
359  // Clear the delete flag.
360  ListSetState( aNewTrack, aNewTrackSegmentsCount, IS_DELETED, false );
361  return 0;
362  }
363 
364  /* Marking a list of candidate segmented connect to endpoint
365  * Note: the vias are not taken into account because they do
366  * not define a track, since they are on an intersection.
367  */
368  for( pt_del = bufStart, nbconnect = 0; ; )
369  {
370  pt_segm = GetTrack( pt_del, bufEnd, end, endmasklayer );
371 
372  if( pt_segm == NULL )
373  break;
374 
375  if( pt_segm->Type() != PCB_VIA_T )
376  {
377  if( pt_segm->GetState( IS_LINKED ) == 0 )
378  {
379  pt_segm->SetState( IS_LINKED, true );
380  nbconnect++;
381  }
382  }
383 
384  if( pt_del == bufEnd )
385  break;
386 
387  pt_del = pt_segm->Next();
388  }
389 
390  if( nbconnect == 0 )
391  {
392  // Clear used flags
393  for( pt_del = bufStart; pt_del; pt_del = pt_del->Next() )
394  {
395  pt_del->SetState( BUSY | IS_DELETED | IN_EDIT | IS_LINKED, false );
396 
397  if( pt_del == bufEnd ) // Last segment reached
398  break;
399  }
400 
401  return 0;
402  }
403 
404  // Mark trace as edited (which does not involve searching for other tracks)
405  ListSetState( aNewTrack, aNewTrackSegmentsCount, IS_DELETED, false );
406  ListSetState( aNewTrack, aNewTrackSegmentsCount, IN_EDIT, true );
407 
408  // Test all marked segments.
409  while( nbconnect )
410  {
411  for( pt_del = bufStart; pt_del; pt_del = pt_del->Next() )
412  {
413  if( pt_del->GetState( IS_LINKED ) )
414  break;
415 
416  if( pt_del == bufEnd ) // Last segment reached
417  break;
418  }
419 
420  nbconnect--;
421 
422  if( pt_del )
423  pt_del->SetState( IS_LINKED, false );
424 
425  pt_del = GetBoard()->MarkTrace( GetBoard()->m_Track, pt_del, &nb_segm,
426  NULL, NULL, true );
427 
428  /* Test if the marked track is redundant, i.e. if one of marked segments
429  * is connected to the starting point of the new track.
430  */
431 
432  pt_segm = pt_del;
433 
434  for( int ii = 0; pt_segm && (ii < nb_segm); pt_segm = pt_segm->Next(), ii++ )
435  {
436  if( pt_segm->GetState( BUSY ) == 0 )
437  break;
438 
439  if( pt_segm->GetStart() == start || pt_segm->GetEnd() == start )
440  {
441  // Marked track can be erased.
442  TRACK* NextS;
443 
444  DrawTraces( m_canvas, aDC, pt_del, nb_segm, GR_XOR | GR_HIGHLIGHT );
445 
446  for( int jj = 0; jj < nb_segm; jj++, pt_del = NextS )
447  {
448  NextS = pt_del->Next();
449 
450  if( aItemsListPicker )
451  {
452  pt_del->UnLink();
453  pt_del->SetStatus( 0 );
454  pt_del->ClearFlags();
455  GetBoard()->GetConnectivity()->Remove( pt_del );
456  ITEM_PICKER picker( pt_del, UR_DELETED );
457  aItemsListPicker->PushItem( picker );
458  }
459  else
460  {
461  GetBoard()->GetConnectivity()->Remove( pt_del );
462  pt_del->DeleteStructure();
463  }
464  }
465 
466  // Clean up flags.
467  for( pt_del = m_Pcb->m_Track; pt_del != NULL; pt_del = pt_del->Next() )
468  {
469  if( pt_del->GetState( IN_EDIT ) )
470  {
471  pt_del->SetState( IN_EDIT, false );
472 
473  if( aDC )
474  pt_del->Draw( m_canvas, aDC, GR_OR );
475  }
476 
477  pt_del->SetState( IN_EDIT | IS_LINKED, false );
478  }
479 
480  return 1;
481  }
482  }
483 
484  // Clear BUSY flag here because the track did not get marked.
485  ListSetState( pt_del, nb_segm, BUSY, false );
486  }
487 
488  // Clear used flags
489  for( pt_del = m_Pcb->m_Track; pt_del; pt_del = pt_del->Next() )
490  {
491  pt_del->SetState( BUSY | IS_DELETED | IN_EDIT | IS_LINKED, false );
492 
493  if( pt_del == bufEnd ) // Last segment reached
494  break;
495  }
496 
497  return 0;
498 }
499 
500 
501 /* Set the bits of .m_State member to on/off value, using bit mask State
502  * of a list of EDA_ITEM
503  */
504 static void ListSetState( EDA_ITEM* Start, int NbItem, STATUS_FLAGS State,
505  bool onoff )
506 {
507  for( ; (Start != NULL ) && ( NbItem > 0 ); NbItem--, Start = Start->Next() )
508  {
509  Start->SetState( State, onoff );
510  }
511 }
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:111
#define g_FirstTrackSegment
first segment created
Definition: pcbnew.h:96
#define g_CurrentTrackSegment
most recently created segment
Definition: pcbnew.h:95
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
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:112
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:458
void SetPosition(const wxPoint &aPoint) override
Definition: class_track.h:430
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:90
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
D_PAD * GetPad(unsigned aIndex) const
Function GetPad.
#define BUSY
Pcbnew: flag indicating that the structure has.
Definition: base_struct.h:135
EDA_ITEM * Next() const
Definition: base_struct.h:209
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:240
const wxPoint & GetEnd() const
Definition: class_track.h:119
Functions relatives to tracks, vias and segments used to fill zones.
int DrcOnCreatingTrack(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:169
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:114
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:256
VIATYPE_T GetViaType() const
Definition: class_track.h:457
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
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:117
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
virtual 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:541
unsigned STATUS_FLAGS
Definition: base_struct.h:147
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...
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
#define BAD_DRC
Definition: drc.h:37
Definition: gr_basic.h:38
int GetNetCode() const
Function GetNetCode.
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:123
Class NETINFO_ITEM handles the data for a net.
Definition: netinfo.h:69
virtual void UpdateStatusBar() override
Update the status bar information.
TRACK * Next() const
Definition: class_track.h:99
void SetState(int type, int state)
Definition: base_struct.h:245
TRACK * GetStartNetCode(int NetCode)
void SetDrill(int aDrill)
Function SetDrill sets the drill value for vias.
Definition: class_track.h:465
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
PCB_SCREEN * GetScreen() const override
Return 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:186
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
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:96
DLIST< TRACK > m_Track
Definition: class_board.h:249
Module description (excepted pads)
TRACK * MarkTrace(TRACK *aTrackList, TRACK *aTrace, int *aCount, double *aTraceLength, double *aInPackageLength, bool aReorder)
Function MarkTrace marks a chain of trace segments, connected to aTrace.
int GetMicroViaSize()
Function GetMicroViaSize returns the size of vias used to route this net.
Definition: netinfo.h:166
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:810
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:296
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