KiCad PCB EDA Suite
specctra_import.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) 2007-2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
5  * Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 
26 /* This source is a complement to specctra.cpp and implements the import of
27  a specctra session file (*.ses), and import of a specctra design file
28  (*.dsn) file. The specification for the grammar of the specctra dsn file
29  used to develop this code is given here:
30  http://tech.groups.yahoo.com/group/kicad-users/files/ then file "specctra.pdf"
31  Also see the comments at the top of the specctra.cpp file itself.
32 */
33 
34 
35 #include <confirm.h> // DisplayError()
36 #include <gestfich.h> // EDA_FileSelector()
37 #include <pcb_edit_frame.h>
38 #include <locale_io.h>
39 #include <macros.h>
40 #include <board.h>
41 #include <board_design_settings.h>
42 #include <footprint.h>
43 #include <pcb_track.h>
45 #include <view/view.h>
46 #include "specctra.h"
47 #include <math/util.h> // for KiROUND
48 #include <pcbnew_settings.h>
49 
50 using namespace DSN;
51 
52 
53 bool PCB_EDIT_FRAME::ImportSpecctraSession( const wxString& fullFileName )
54 {
55  // To avoid issues with undo/redo lists (dangling pointers)
56  // clear the lists
57  // todo: use undo/redo feature
58  ClearUndoRedoList();
59 
60  SPECCTRA_DB db;
61  LOCALE_IO toggle;
62 
63  try
64  {
65  db.LoadSESSION( fullFileName );
66  db.FromSESSION( GetBoard() );
67  }
68  catch( const IO_ERROR& ioe )
69  {
70  wxString msg = _( "Board may be corrupted, do not save it.\n Fix problem and try again" );
71 
72  wxString extra = ioe.What();
73 
74  DisplayErrorMessage( this, msg, extra);
75  return false;
76  }
77 
78  OnModify();
79 
80  GetBoard()->GetConnectivity()->Clear();
81  GetBoard()->GetConnectivity()->Build( GetBoard() );
82 
83  if( GetCanvas() ) // Update view:
84  {
85  // Update footprint positions
86  GetCanvas()->GetView()->RecacheAllItems();
87 
88  // add imported tracks (previous tracks are removed, therfore all are new)
89  for( auto track : GetBoard()->Tracks() )
90  GetCanvas()->GetView()->Add( track );
91  }
92 
93  SetStatusText( wxString( _( "Session file imported and merged OK." ) ) );
94 
95  Refresh();
96 
97  return true;
98 }
99 
100 
101 namespace DSN {
102 
103 
112 static int scale( double distance, UNIT_RES* aResolution )
113 {
114  double resValue = aResolution->GetValue();
115  double factor;
116 
117  switch( aResolution->GetEngUnits() )
118  {
119  default:
120  case T_inch:
121  factor = 25.4e6; // nanometers per inch
122  break;
123  case T_mil:
124  factor = 25.4e3; // nanometers per mil
125  break;
126  case T_cm:
127  factor = 1e7; // nanometers per cm
128  break;
129  case T_mm:
130  factor = 1e6; // nanometers per mm
131  break;
132  case T_um:
133  factor = 1e3; // nanometers per um
134  break;
135  }
136 
137  int ret = KiROUND( factor * distance / resValue );
138 
139  return ret;
140 }
141 
142 
151 static wxPoint mapPt( const POINT& aPoint, UNIT_RES* aResolution )
152 {
153  wxPoint ret( scale( aPoint.x, aResolution ),
154  -scale( aPoint.y, aResolution ) ); // negate y
155 
156  return ret;
157 }
158 
159 
160 PCB_TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode )
161 {
162  int layerNdx = findLayerName( aPath->layer_id );
163 
164  if( layerNdx == -1 )
165  {
166  THROW_IO_ERROR( wxString::Format( _( "Session file uses invalid layer id '%s'." ),
167  FROM_UTF8( aPath->layer_id.c_str() ) ) );
168  }
169 
170  PCB_TRACK* track = new PCB_TRACK( m_sessionBoard );
171 
172  track->SetStart( mapPt( aPath->points[aPointIndex+0], m_routeResolution ) );
173  track->SetEnd( mapPt( aPath->points[aPointIndex+1], m_routeResolution ) );
174  track->SetLayer( m_pcbLayer2kicad[layerNdx] );
175  track->SetWidth( scale( aPath->aperture_width, m_routeResolution ) );
176  track->SetNetCode( aNetcode );
177 
178  return track;
179 }
180 
181 
182 PCB_VIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNetCode,
183  int aViaDrillDefault )
184 {
185  PCB_VIA* via = 0;
186  SHAPE* shape;
187  int shapeCount = aPadstack->Length();
188  int drill_diam_iu = -1;
189  int copperLayerCount = m_sessionBoard->GetCopperLayerCount();
190 
191 
192  // The drill diameter is encoded in the padstack name if Pcbnew did the DSN export.
193  // It is after the colon and before the last '_'
194  int drillStartNdx = aPadstack->padstack_id.find( ':' );
195 
196  if( drillStartNdx != -1 )
197  {
198  ++drillStartNdx; // skip over the ':'
199 
200  int drillEndNdx = aPadstack->padstack_id.rfind( '_' );
201  if( drillEndNdx != -1 )
202  {
203  std::string diam_txt( aPadstack->padstack_id,
204  drillStartNdx, drillEndNdx-drillStartNdx );
205 
206  double drill_um = strtod( diam_txt.c_str(), 0 );
207 
208  drill_diam_iu = int( drill_um * (IU_PER_MM / 1000.0) );
209 
210  if( drill_diam_iu == aViaDrillDefault )
211  drill_diam_iu = UNDEFINED_DRILL_DIAMETER;
212  }
213  }
214 
215  if( shapeCount == 0 )
216  {
217  THROW_IO_ERROR( _( "Session via padstack has no shapes" ) );
218  }
219  else if( shapeCount == 1 )
220  {
221  shape = (SHAPE*) (*aPadstack)[0];
222  DSN_T type = shape->shape->Type();
223 
224  if( type != T_circle )
225  {
226  THROW_IO_ERROR( wxString::Format( _( "Unsupported via shape: %s." ),
227  GetTokenString( type ) ) );
228  }
229 
230  CIRCLE* circle = (CIRCLE*) shape->shape;
231  int viaDiam = scale( circle->diameter, m_routeResolution );
232 
233  via = new PCB_VIA( m_sessionBoard );
234  via->SetPosition( mapPt( aPoint, m_routeResolution ) );
235  via->SetDrill( drill_diam_iu );
236  via->SetViaType( VIATYPE::THROUGH );
237  via->SetWidth( viaDiam );
238  via->SetLayerPair( F_Cu, B_Cu );
239  }
240  else if( shapeCount == copperLayerCount )
241  {
242  shape = (SHAPE*) (*aPadstack)[0];
243  DSN_T type = shape->shape->Type();
244  if( type != T_circle )
246  wxString::Format( _( "Unsupported via shape: %s" ), GetTokenString( type ) ) );
247 
248  CIRCLE* circle = (CIRCLE*) shape->shape;
249  int viaDiam = scale( circle->diameter, m_routeResolution );
250 
251  via = new PCB_VIA( m_sessionBoard );
252  via->SetPosition( mapPt( aPoint, m_routeResolution ) );
253  via->SetDrill( drill_diam_iu );
254  via->SetViaType( VIATYPE::THROUGH );
255  via->SetWidth( viaDiam );
256  via->SetLayerPair( F_Cu, B_Cu );
257  }
258  else // VIA_MICROVIA or VIA_BLIND_BURIED
259  {
260  int topLayerNdx = -1; // session layer detectors
261  int botLayerNdx = INT_MAX;
262 
263  int viaDiam = -1;
264 
265  for( int i=0; i<shapeCount; ++i )
266  {
267  shape = (SHAPE*) (*aPadstack)[i];
268  DSN_T type = shape->shape->Type();
269  if( type != T_circle )
271  _( "Unsupported via shape: %s" ), GetTokenString( type ) ) );
272 
273  CIRCLE* circle = (CIRCLE*) shape->shape;
274 
275  int layerNdx = findLayerName( circle->layer_id );
276  if( layerNdx == -1 )
277  {
278  wxString layerName = FROM_UTF8( circle->layer_id.c_str() );
280  _( "Session file uses invalid layer id \"%s\"" ), layerName ) );
281  }
282 
283  if( layerNdx > topLayerNdx )
284  topLayerNdx = layerNdx;
285 
286  if( layerNdx < botLayerNdx )
287  botLayerNdx = layerNdx;
288 
289  if( viaDiam == -1 )
290  viaDiam = scale( circle->diameter, m_routeResolution );
291  }
292 
293  via = new PCB_VIA( m_sessionBoard );
294  via->SetPosition( mapPt( aPoint, m_routeResolution ) );
295  via->SetDrill( drill_diam_iu );
296 
297  if( (topLayerNdx==0 && botLayerNdx==1)
298  || (topLayerNdx==copperLayerCount-2 && botLayerNdx==copperLayerCount-1))
299  via->SetViaType( VIATYPE::MICROVIA );
300  else
301  via->SetViaType( VIATYPE::BLIND_BURIED );
302 
303  via->SetWidth( viaDiam );
304 
305  PCB_LAYER_ID topLayer = m_pcbLayer2kicad[topLayerNdx];
306  PCB_LAYER_ID botLayer = m_pcbLayer2kicad[botLayerNdx];
307 
308  via->SetLayerPair( topLayer, botLayer );
309  }
310 
311  wxASSERT( via );
312 
313  via->SetNetCode( aNetCode );
314  return via;
315 }
316 
317 
318 // no UI code in this function, throw exception to report problems to the
319 // UI handler: void PCB_EDIT_FRAME::ImportSpecctraSession( wxCommandEvent& event )
320 
322 {
323  m_sessionBoard = aBoard; // not owned here
324 
325  if( !m_session )
326  THROW_IO_ERROR( _("Session file is missing the \"session\" section") );
327 
328  if( !m_session->route )
329  THROW_IO_ERROR( _("Session file is missing the \"routes\" section") );
330 
331  if( !m_session->route->library )
332  THROW_IO_ERROR( _("Session file is missing the \"library_out\" section") );
333 
334  // delete all the old tracks and vias
335  aBoard->Tracks().clear();
336 
337  aBoard->DeleteMARKERs();
338 
339  buildLayerMaps( aBoard );
340 
341  if( m_session->placement )
342  {
343  // Walk the PLACEMENT object's COMPONENTs list, and for each PLACE within
344  // each COMPONENT, reposition and re-orient each component and put on
345  // correct side of the board.
346  COMPONENTS& components = m_session->placement->components;
347  for( COMPONENTS::iterator comp=components.begin(); comp!=components.end(); ++comp )
348  {
349  PLACES& places = comp->places;
350  for( unsigned i=0; i<places.size(); ++i )
351  {
352  PLACE* place = &places[i]; // '&' even though places[] holds a pointer!
353 
354  wxString reference = FROM_UTF8( place->component_id.c_str() );
355  FOOTPRINT* footprint = aBoard->FindFootprintByReference( reference );
356 
357  if( !footprint )
358  {
359  THROW_IO_ERROR( wxString::Format( _( "Reference '%s' not found." ),
360  reference ) );
361  }
362 
363  if( !place->hasVertex )
364  continue;
365 
366  UNIT_RES* resolution = place->GetUnits();
367  wxASSERT( resolution );
368 
369  wxPoint newPos = mapPt( place->vertex, resolution );
370  footprint->SetPosition( newPos );
371 
372  if( place->side == T_front )
373  {
374  // convert from degrees to tenths of degrees used in KiCad.
375  int orientation = KiROUND( place->rotation * 10.0 );
376 
377  if( footprint->GetLayer() != F_Cu )
378  {
379  // footprint is on copper layer (back)
380  footprint->Flip( footprint->GetPosition(), false );
381  }
382 
383  footprint->SetOrientation( orientation );
384  }
385  else if( place->side == T_back )
386  {
387  int orientation = KiROUND( (place->rotation + 180.0) * 10.0 );
388 
389  if( footprint->GetLayer() != B_Cu )
390  {
391  // footprint is on component layer (front)
392  footprint->Flip( footprint->GetPosition(), false );
393  }
394 
395  footprint->SetOrientation( orientation );
396  }
397  else
398  {
399  // as I write this, the PARSER *is* catching this, so we should never see below:
400  wxFAIL_MSG( wxT("DSN::PARSER did not catch an illegal side := 'back|front'") );
401  }
402  }
403  }
404  }
405 
407 
408  // Walk the NET_OUTs and create tracks and vias anew.
409  NET_OUTS& net_outs = m_session->route->net_outs;
410  for( NET_OUTS::iterator net = net_outs.begin(); net!=net_outs.end(); ++net )
411  {
412  int netoutCode = 0;
413 
414  // page 143 of spec says wire's net_id is optional
415  if( net->net_id.size() )
416  {
417  wxString netName = FROM_UTF8( net->net_id.c_str() );
418  NETINFO_ITEM* netinfo = aBoard->FindNet( netName );
419 
420  if( netinfo )
421  {
422  netoutCode = netinfo->GetNetCode();
423  }
424  else // else netCode remains 0
425  {
426  // int breakhere = 1;
427  }
428  }
429 
430  WIRES& wires = net->wires;
431  for( unsigned i = 0; i<wires.size(); ++i )
432  {
433  WIRE* wire = &wires[i];
434  DSN_T shape = wire->shape->Type();
435 
436  if( shape != T_path )
437  {
438  /* shape == T_polygon is expected from freerouter if you have
439  a zone on a non "power" type layer, i.e. a T_signal layer
440  and the design does a round trip back in as session here.
441  We kept our own zones in the BOARD, so ignore this so called
442  'wire'.
443 
444  wxString netId = FROM_UTF8( wire->net_id.c_str() );
445  THROW_IO_ERROR( wxString::Format( _("Unsupported wire shape: \"%s\" for net: \"%s\""),
446  DLEX::GetTokenString(shape).GetData(),
447  netId.GetData()
448  ) );
449  */
450  }
451  else
452  {
453  PATH* path = (PATH*) wire->shape;
454 
455  for( unsigned pt=0; pt<path->points.size()-1; ++pt )
456  {
457  PCB_TRACK* track = makeTRACK( path, pt, netoutCode );
458  aBoard->Add( track );
459  }
460  }
461  }
462 
463  WIRE_VIAS& wire_vias = net->wire_vias;
465  for( unsigned i=0; i<wire_vias.size(); ++i )
466  {
467  int netCode = 0;
468 
469  // page 144 of spec says wire_via's net_id is optional
470  if( net->net_id.size() )
471  {
472  wxString netName = FROM_UTF8( net->net_id.c_str() );
473  NETINFO_ITEM* netvia = aBoard->FindNet( netName );
474 
475  if( netvia )
476  netCode = netvia->GetNetCode();
477 
478  // else netCode remains 0
479  }
480 
481  WIRE_VIA* wire_via = &wire_vias[i];
482 
483  // example: (via Via_15:8_mil 149000 -71000 )
484 
485  PADSTACK* padstack = library.FindPADSTACK( wire_via->GetPadstackId() );
486  if( !padstack )
487  {
488  // Dick Feb 29, 2008:
489  // Freerouter has a bug where it will not round trip all vias.
490  // Vias which have a (use_via) element will be round tripped.
491  // Vias which do not, don't come back in in the session library,
492  // even though they may be actually used in the pre-routed,
493  // protected wire_vias. So until that is fixed, create the
494  // padstack from its name as a work around.
495 
496 
497  // Could use a STRING_FORMATTER here and convert the entire
498  // wire_via to text and put that text into the exception.
499  wxString psid( FROM_UTF8( wire_via->GetPadstackId().c_str() ) );
500 
501  THROW_IO_ERROR( wxString::Format( _( "A wire_via refers to missing padstack '%s'." ),
502  psid ) );
503  }
504 
505  NETCLASSPTR netclass = aBoard->GetDesignSettings().GetNetClasses().GetDefault();
506 
507  int via_drill_default = netclass->GetViaDrill();
508 
509  for( unsigned v=0; v<wire_via->vertexes.size(); ++v )
510  {
511  PCB_VIA* via = makeVIA( padstack, wire_via->vertexes[v], netCode,
512  via_drill_default );
513  aBoard->Add( via );
514  }
515  }
516  }
517 }
518 
519 
520 } // namespace DSN
void LoadSESSION(const wxString &aFilename)
A recursive descent parser for a SPECCTRA DSN "session" file.
Definition: specctra.cpp:277
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Definition: board.cpp:1344
void buildLayerMaps(BOARD *aBoard)
Create a few data translation structures for layer name and number mapping between the DSN::PCB struc...
Definition: specctra.cpp:76
BOARD * m_sessionBoard
a copy to avoid passing as an argument, memory for it is not owned here.
Definition: specctra.h:3998
DSN::T DSN_T
Definition: specctra.h:46
static wxString FROM_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.
Definition: macros.h:110
This source file implements export and import capabilities to the specctra dsn file format.
Definition: specctra.cpp:63
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:284
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: locale_io.h:40
double y
Definition: specctra.h:105
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:192
This file is part of the common library.
boost::ptr_vector< WIRE_VIA > WIRE_VIAS
Definition: specctra.h:3130
void SetEnd(const wxPoint &aEnd)
Definition: pcb_track.h:104
static constexpr double IU_PER_MM
Mock up a conversion function.
NET_OUTS net_outs
Definition: specctra.h:3518
static POINT mapPt(const wxPoint &pt)
Convert a KiCad point into a DSN file point.
POINTS vertexes
Definition: specctra.h:3120
A holder for either a T_unit or T_resolution object which are usually mutually exclusive in the dsn g...
Definition: specctra.h:402
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
double x
Definition: specctra.h:104
boost::ptr_vector< NET_OUT > NET_OUTS
Definition: specctra.h:3451
DSN_T GetEngUnits() const
Definition: specctra.h:419
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:589
std::string layer_id
Definition: specctra.h:650
int GetValue() const
Definition: specctra.h:420
This file contains miscellaneous commonly used macros and functions.
POINT vertex
Definition: specctra.h:1740
int findLayerName(const std::string &aLayerName) const
Return the PCB layer index for a given layer name, within the specctra sessionfile.
Definition: specctra.cpp:125
Support both the <path_descriptor> and the <polygon_descriptor> per the specctra dsn spec.
Definition: specctra.h:582
double rotation
Definition: specctra.h:1737
bool hasVertex
Definition: specctra.h:1739
ELEM * shape
Definition: specctra.h:2971
UNIT_RES * GetUnits() const override
Return the units for this section.
Definition: specctra.h:3475
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
Definition: board.cpp:607
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:30
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
void DeleteMARKERs()
Delete all MARKERS from the board.
Definition: board.cpp:827
boost::ptr_vector< COMPONENT > COMPONENTS
Definition: specctra.h:1812
DSN_T side
Definition: specctra.h:1735
Implement a <placement_reference> in the specctra dsn spec.
Definition: specctra.h:1687
#define UNDEFINED_DRILL_DIAMETER
Definition: pcb_track.h:69
LIBRARY * library
Definition: specctra.h:3517
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
Definition: board.h:344
void SetStart(const wxPoint &aStart)
Definition: pcb_track.h:107
#define _(s)
std::string component_id
reference designator
Definition: specctra.h:1733
Hold either a via or a pad definition.
Definition: specctra.h:2126
NETCLASSES & GetNetClasses() const
PCB_VIA * makeVIA(PADSTACK *aPadstack, const POINT &aPoint, int aNetCode, int aViaDrillDefault)
Instantiate a KiCad #VIA on the heap and initializes it with internal values consistent with the give...
A DSN data tree, usually coming from a DSN file.
Definition: specctra.h:3647
static float distance(const SFVEC2UI &a, const SFVEC2UI &b)
std::string layer_id
Definition: specctra.h:775
BOARD * GetBoard()
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
UNIT_RES * m_routeResolution
used during FromSESSION() only, memory for it is not owned here.
Definition: specctra.h:3995
A "(shape ..)" element in the specctra dsn spec.
Definition: specctra.h:1893
PLACEMENT * placement
Definition: specctra.h:3630
const std::string & GetPadstackId()
Definition: specctra.h:3001
void SetWidth(int aWidth)
Definition: pcb_track.h:101
Handle the data for a net.
Definition: netinfo.h:64
bool ImportSpecctraSession(const wxString &aFullFilename)
Import a specctra *.ses file and use it to relocate MODULEs and to replace all vias and tracks in an ...
A <library_descriptor> in the specctra dsn specification.
Definition: specctra.h:2257
std::vector< PCB_LAYER_ID > m_pcbLayer2kicad
maps PCB layer number to BOARD layer numbers
Definition: specctra.h:3992
A point in the SPECCTRA DSN coordinate system.
Definition: specctra.h:102
A <wire_shape_descriptor> in the specctra dsn spec.
Definition: specctra.h:2880
boost::ptr_vector< PLACE > PLACES
Definition: specctra.h:1761
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
DSN_T Type() const
Definition: specctra.h:210
PCB_TRACK * makeTRACK(PATH *aPath, int aPointIndex, int aNetcode)
Create a #TRACK form the #PATH and BOARD info.
POINTS points
Definition: specctra.h:653
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:64
Definition: layer_ids.h:70
int GetCopperLayerCount() const
Definition: board.cpp:454
SESSION * m_session
Definition: specctra.h:3981
static double scale(int kicadDist)
Convert a distance from Pcbnew internal units to the reported Specctra DSN units in floating point fo...
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:73
double aperture_width
Definition: specctra.h:651
std::string padstack_id
Definition: specctra.h:2226
ROUTE * route
Definition: specctra.h:3632
virtual UNIT_RES * GetUnits() const
Return the units for this section.
Definition: specctra.cpp:3765
ELEM * shape
Definition: specctra.h:893
NETCLASSPTR GetDefault() const
Definition: netclass.h:253
boost::ptr_vector< WIRE > WIRES
Definition: specctra.h:2983
A <wire_via_descriptor> in the specctra dsn spec.
Definition: specctra.h:2989
void FromSESSION(BOARD *aBoard)
Add the entire #SESSION info to a BOARD but does not write it out.
int Length() const
Return the number of ELEMs in this holder.
Definition: specctra.h:317
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:75
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:38
COMPONENTS components
Definition: specctra.h:1882
TRACKS & Tracks()
Definition: board.h:230
FOOTPRINT * FindFootprintByReference(const wxString &aReference) const
Search for a FOOTPRINT within this board with the given reference designator.
Definition: board.cpp:1365
double diameter
Definition: specctra.h:777
int GetNetCode() const
Definition: netinfo.h:113