KiCad PCB EDA Suite
pcb_footprint.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, 2008 Lubo Racko <developer@lura.sk>
5  * Copyright (C) 2007, 2008, 2012-2013 Alexander Lunev <al.lunev@yahoo.com>
6  * Copyright (C) 2012-2020 KiCad Developers, see CHANGELOG.TXT for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <wx/wx.h>
27 
28 #include <pcb_arc.h>
29 #include <pcb_copper_pour.h>
30 #include <pcb_cutout.h>
31 #include <pcb_plane.h>
32 #include <pcb_line.h>
33 #include <pcb_footprint.h>
34 #include <pcb_pad.h>
35 #include <pcb_polygon.h>
36 #include <plugins/pcad/pcb_text.h>
37 #include <pcb_via.h>
38 
39 #include <trigo.h>
40 
41 namespace PCAD2KICAD {
42 
44  PCB_COMPONENT( aCallbacks, aBoard )
45 {
47  m_Mirror = 0;
48  m_objType = wxT( 'M' ); // FOOTPRINT
49  m_KiCadLayer = F_SilkS; // default
50 }
51 
52 
54 {
55  int i;
56 
57  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
58  {
59  delete m_FootprintItems[i];
60  }
61 }
62 
63 
64 XNODE* PCB_FOOTPRINT::FindModulePatternDefName( XNODE* aNode, const wxString& aName )
65 {
66  XNODE* result, * lNode;
67  wxString propValue1, propValue2;
68 
69  result = NULL;
70  lNode = FindNode( aNode, wxT( "patternDef" ) );
71 
72  while( lNode )
73  {
74  if( lNode->GetName() == wxT( "patternDef" ) )
75  {
76  lNode->GetAttribute( wxT( "Name" ), &propValue1 );
77  FindNode( lNode,
78  wxT( "originalName" ) )->GetAttribute( wxT( "Name" ), &propValue2 );
79 
80  if( ValidateName( propValue1 ) == aName
81  || ValidateName( propValue2 ) == aName )
82  {
83  result = lNode;
84  lNode = NULL;
85  }
86  }
87 
88  if( lNode )
89  lNode = lNode->GetNext();
90  }
91 
92  if( result == NULL )
93  {
94  lNode = FindNode( aNode, wxT( "patternDefExtended" ) ); // New file format
95 
96  while( lNode )
97  {
98  if( lNode->GetName() == wxT( "patternDefExtended" ) )
99  {
100  lNode->GetAttribute( wxT( "Name" ), &propValue1 );
101 
102  if( ValidateName( propValue1 ) == aName )
103  {
104  result = lNode;
105  lNode = NULL;
106  }
107  }
108 
109  if( lNode )
110  lNode = lNode->GetNext();
111  }
112  }
113 
114  return result;
115 }
116 
117 
118 XNODE* PCB_FOOTPRINT::FindPatternMultilayerSection( XNODE* aNode, wxString* aPatGraphRefName )
119 {
120  XNODE* result, * pNode, * lNode;
121  wxString propValue, patName;
122 
123  result = NULL;
124  pNode = aNode; // pattern;
125  lNode = aNode;
126 
127  // calling from library conversion we need to find pattern
128  if( lNode->GetName() == wxT( "compDef" ) )
129  {
130  lNode->GetAttribute( wxT( "Name" ), &propValue );
131  propValue.Trim( false );
132  patName = ValidateName( propValue );
133 
134  if( FindNode( lNode, wxT( "attachedPattern" ) ) )
135  {
136  FindNode( FindNode( lNode, wxT( "attachedPattern" ) ),
137  wxT( "patternName" ) )->GetAttribute( wxT( "Name" ), &propValue );
138  propValue.Trim( false );
139  propValue.Trim( true );
140  patName = ValidateName( propValue );
141  }
142 
143  lNode = FindModulePatternDefName( lNode->GetParent(), patName );
144  pNode = lNode; // pattern;
145  }
146 
147  lNode = NULL;
148 
149  if( pNode )
150  lNode = FindNode( pNode, wxT( "multiLayer" ) ); // Old file format
151 
152  if( lNode )
153  {
154  *aPatGraphRefName = wxEmptyString; // default
155  result = lNode;
156  }
157  else
158  {
159  // New file format
160 
161  if( *aPatGraphRefName == wxEmptyString ) // default
162  {
163  if( FindNode( aNode, wxT( "patternGraphicsNameRef" ) ) )
164  {
165  FindNode( aNode,
166  wxT( "patternGraphicsNameRef" ) )->GetAttribute( wxT( "Name" ),
167  aPatGraphRefName );
168  }
169  }
170 
171  if( FindNode( aNode, wxT( "patternGraphicsDef" ) ) )
172  lNode = FindNode( aNode, wxT( "patternGraphicsDef" ) );
173  else if( pNode )
174  lNode = FindNode( pNode, wxT( "patternGraphicsDef" ) );
175 
176  if( *aPatGraphRefName == wxEmptyString ) // no patern delection, the first is actual...
177  {
178  if( lNode )
179  {
180  result = FindNode( lNode, wxT( "multiLayer" ) );
181  lNode = NULL;
182  }
183  }
184 
185  while( lNode ) // selected by name
186  {
187  if( lNode->GetName() == wxT( "patternGraphicsDef" ) )
188  {
189  FindNode( lNode,
190  wxT( "patternGraphicsNameDef" ) )->GetAttribute( wxT( "Name" ),
191  &propValue );
192 
193  if( propValue == *aPatGraphRefName )
194  {
195  result = FindNode( lNode, wxT( "multiLayer" ) );
196  lNode = NULL;
197  }
198  else
199  lNode = lNode->GetNext();
200  }
201  else
202  lNode = lNode->GetNext();
203  }
204  }
205 
206  return result;
207 }
208 
209 
211  PCB_FOOTPRINT* aFootprint,
212  PCB_COMPONENTS_ARRAY* aList,
213  wxStatusBar* aStatusBar,
214  const wxString& aDefaultMeasurementUnit,
215  const wxString& aActualConversion )
216 {
217  PCB_ARC* arc;
218  PCB_POLYGON* polygon;
219  PCB_POLYGON *plane_layer = NULL;
220  PCB_COPPER_POUR* copperPour;
221  PCB_CUTOUT* cutout;
222  PCB_PLANE* plane;
223  VERTICES_ARRAY* plane_layer_polygon;
224  PCB_LINE* line;
225  PCB_TEXT* text;
226  XNODE* lNode, * tNode;
227  wxString propValue;
228  long long i;
229  int PCadLayer;
230  long num = 0;
231 
232  i = 0;
233  // aStatusBar->SetStatusText( wxT( "Processing LAYER CONTENT OBJECTS " ) );
234  if( FindNode( aNode, wxT( "layerNumRef" ) ) )
235  FindNode( aNode, wxT( "layerNumRef" ) )->GetNodeContent().ToLong( &num );
236 
237  PCadLayer = (int) num;
238 
239  if( m_callbacks->GetLayerType( PCadLayer ) == LAYER_TYPE_PLANE )
240  {
241  plane_layer = new PCB_POLYGON( m_callbacks, m_board, PCadLayer );
242  plane_layer->AssignNet( m_callbacks->GetLayerNetNameRef( PCadLayer ) );
243  plane_layer->SetOutline( &m_BoardOutline );
244  aList->Add( plane_layer );
245 
246  // fill the polygon with the same contour as its outline is
247  //plane_layer->AddIsland( &m_boardOutline );
248  }
249 
250  lNode = aNode->GetChildren();
251 
252  while( lNode )
253  {
254  i++;
255  // aStatusBar->SetStatusText( wxString::Format( "Processing LAYER CONTENT OBJECTS :%lld",
256  // i ) );
257 
258  if( lNode->GetName() == wxT( "line" ) )
259  {
260  line = new PCB_LINE( m_callbacks, m_board );
261  line->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
262  aList->Add( line );
263  }
264 
265  if( lNode->GetName() == wxT( "text" ) )
266  {
267  text = new PCB_TEXT( m_callbacks, m_board );
268  text->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
269  aList->Add( text );
270  }
271 
272  // added as Sergeys request 02/2008
273  if( lNode->GetName() == wxT( "attr" ) )
274  {
275  // assign fonts to Module Name,Value,Type,....s
276  lNode->GetAttribute( wxT( "Name" ), &propValue );
277  propValue.Trim( false );
278  propValue.Trim( true );
279 
280  if( propValue == wxT( "RefDes" ) )
281  {
282  tNode = FindNode( lNode, wxT( "textStyleRef" ) );
283 
284  if( tNode && aFootprint )
285  {
286  // TODO: to understand and may be repair
287  // Alexander Lunev: originally in Delphi version of the project there was
288  // a strange access to pcbModule->m_name (it was global variable). This access
289  // is necessary when the function DoLayerContentsObjects() is called from
290  // function CreatePCBModule(). However it is not clear whether the access is
291  // required when the function DoLayerContentsObjects() is called from
292  // function ProcessXMLtoPCBLib().
293  SetFontProperty( tNode,
294  &aFootprint->m_name,
295  aDefaultMeasurementUnit,
296  aActualConversion );
297  }
298  }
299  }
300 
301  // added as Sergeys request 02/2008
302  if( lNode->GetName() == wxT( "arc" ) || lNode->GetName() == wxT( "triplePointArc" ) )
303  {
304  arc = new PCB_ARC( m_callbacks, m_board );
305  arc->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
306  aList->Add( arc );
307  }
308 
309  if( lNode->GetName() == wxT( "pcbPoly" ) )
310  {
311  if( m_callbacks->GetLayerType( PCadLayer ) == LAYER_TYPE_PLANE )
312  {
313  plane_layer_polygon = new VERTICES_ARRAY;
314  wxASSERT( plane_layer );
315  plane_layer->FormPolygon( lNode, plane_layer_polygon, aDefaultMeasurementUnit, aActualConversion );
316  plane_layer->m_cutouts.Add( plane_layer_polygon );
317  }
318  else
319  {
320  polygon = new PCB_POLYGON( m_callbacks, m_board, PCadLayer );
321  if( polygon->Parse( lNode,
322  aDefaultMeasurementUnit,
323  aActualConversion ) )
324  aList->Add( polygon );
325  else
326  delete polygon;
327  }
328  }
329 
330  if( lNode->GetName() == wxT( "copperPour95" ) )
331  {
332  copperPour = new PCB_COPPER_POUR( m_callbacks, m_board, PCadLayer );
333 
334  if( copperPour->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
335  aList->Add( copperPour );
336  else
337  delete copperPour;
338  }
339 
340  if( lNode->GetName() == wxT( "polyCutOut" ) )
341  {
342  cutout = new PCB_CUTOUT( m_callbacks, m_board, PCadLayer );
343 
344  if( cutout->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
345  aList->Add( cutout );
346  else
347  delete cutout;
348  }
349 
350  if( lNode->GetName() == wxT( "planeObj" ) )
351  {
352  plane = new PCB_PLANE( m_callbacks, m_board, PCadLayer );
353 
354  if( plane->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
355  aList->Add( plane );
356  else
357  delete plane;
358  }
359 
360  lNode = lNode->GetNext();
361  }
362 }
363 
364 
365 void PCB_FOOTPRINT::SetName( const wxString& aPin, const wxString& aName )
366 {
367  int i;
368  long num;
369 
370  aPin.ToLong( &num );
371 
372  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
373  {
374  if( m_FootprintItems[i]->m_objType == wxT( 'P' ) )
375  if(( (PCB_PAD*) m_FootprintItems[i] )->m_Number == num )
376  ( (PCB_PAD*) m_FootprintItems[i] )->m_name.text = aName;
377 
378 
379  }
380 }
381 
382 
383 void PCB_FOOTPRINT::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
384  const wxString& aDefaultMeasurementUnit,
385  const wxString& aActualConversion )
386 {
387  XNODE* lNode, * tNode, * mNode;
388  PCB_PAD* pad;
389  PCB_VIA* via;
390  wxString propValue, str;
391 
392  FindNode( aNode, wxT( "originalName" ) )->GetAttribute( wxT( "Name" ),
393  &propValue );
394  propValue.Trim( false );
395  m_name.text = propValue;
396 
397  // aStatusBar->SetStatusText( wxT( "Creating Component : " ) + m_name.text );
398  lNode = aNode;
400 
401  if( lNode )
402  {
403  tNode = lNode;
404  tNode = tNode->GetChildren();
405 
406  while( tNode )
407  {
408  if( tNode->GetName() == wxT( "pad" ) )
409  {
410  pad = new PCB_PAD( m_callbacks, m_board );
411  pad->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
412  m_FootprintItems.Add( pad );
413  }
414 
415  if( tNode->GetName() == wxT( "via" ) )
416  {
417  via = new PCB_VIA( m_callbacks, m_board );
418  via->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
419  m_FootprintItems.Add( via );
420  }
421 
422  tNode = tNode->GetNext();
423  }
424 
425  lNode = lNode->GetParent();
426  }
427 
428  if( lNode )
429  lNode = FindNode( lNode, wxT( "layerContents" ) );
430 
431  while( lNode )
432  {
433  if( lNode->GetName() == wxT( "layerContents" ) )
434  DoLayerContentsObjects( lNode, this, &m_FootprintItems, aStatusBar,
435  aDefaultMeasurementUnit, aActualConversion );
436 
437  lNode = lNode->GetNext();
438  }
439 
440  // map pins
441  lNode = FindPinMap( aNode );
442 
443  if( lNode )
444  {
445  mNode = lNode->GetChildren();
446 
447  while( mNode )
448  {
449  if( mNode->GetName() == wxT( "padNum" ) )
450  {
451  str = mNode->GetNodeContent();
452  mNode = mNode->GetNext();
453 
454  if( !mNode )
455  break;
456 
457  mNode->GetAttribute( wxT( "Name" ), &propValue );
458  SetName( str, propValue );
459  mNode = mNode->GetNext();
460  }
461  else
462  {
463  mNode = mNode->GetNext();
464 
465  if( !mNode )
466  break;
467 
468  mNode = mNode->GetNext();
469  }
470  }
471  }
472 }
473 
474 
475 wxString PCB_FOOTPRINT::ModuleLayer( int aMirror )
476 {
477  wxString result;
478 
479  // ///NOT ! {IntToStr(KiCadLayer)} NOT !
480  // / FOOTPRINTs ARE HARD PLACED ON COMPONENT OR COPPER LAYER.
481  // / IsFLIPPED--> MIRROR attribute is decision Point!!!
482 
483  if( aMirror == 0 )
484  result = wxT( "15" ); // Components side
485  else
486  result = wxT( "0" ); // Copper side
487 
488  return result;
489 }
490 
491 
493 {
494  int i;
495  int r;
496 
497  // transform text positions
500 
503 
504  FOOTPRINT* footprint = new FOOTPRINT( m_board );
505  m_board->Add( footprint, ADD_MODE::APPEND );
506 
507  footprint->SetPosition( wxPoint( m_positionX, m_positionY ) );
508  footprint->SetLayer( m_Mirror ? B_Cu : F_Cu );
509  footprint->SetOrientation( m_rotation );
510  footprint->SetLastEditTime( 0 );
511 
512  LIB_ID fpID;
513  fpID.Parse( m_compRef, true );
514  footprint->SetFPID( fpID );
515 
516  // reference text
517  FP_TEXT* ref_text = &footprint->Reference();
518 
519  ref_text->SetText( ValidateReference( m_name.text ) );
520  ref_text->SetType( FP_TEXT::TEXT_is_REFERENCE );
521 
522  ref_text->SetPos0( wxPoint( m_name.correctedPositionX, m_name.correctedPositionY ) );
523  if( m_name.isTrueType )
525  else
527 
529  ref_text->SetTextAngle( r );
530  ref_text->SetKeepUpright( false );
531 
532  ref_text->SetItalic( m_name.isItalic );
534 
535  ref_text->SetMirrored( m_name.mirror );
536  ref_text->SetVisible( m_name.textIsVisible );
537 
539 
540  // Calculate the actual position.
541  ref_text->SetDrawCoord();
542 
543  // value text
544  FP_TEXT* val_text = &footprint->Value();
545 
546  val_text->SetText( m_Value.text );
547  val_text->SetType( FP_TEXT::TEXT_is_VALUE );
548 
550  if( m_Value.isTrueType )
552  else
554 
556  val_text->SetTextAngle( r );
557  val_text->SetKeepUpright( false );
558 
559  val_text->SetItalic( m_Value.isItalic );
561 
562  val_text->SetMirrored( m_Value.mirror );
563  val_text->SetVisible( m_Value.textIsVisible );
564 
566 
567  // Calculate the actual position.
568  val_text->SetDrawCoord();
569 
570  // TEXTS
571  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
572  {
573  if( m_FootprintItems[i]->m_objType == wxT( 'T' ) )
574  {
575  ( (PCB_TEXT*) m_FootprintItems[i] )->m_tag = i + 2;
576  m_FootprintItems[ i ]->AddToFootprint( footprint );
577  }
578  }
579 
580  // FOOTPRINT LINES
581  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
582  {
583  if( m_FootprintItems[i]->m_objType == wxT( 'L' ) )
584  m_FootprintItems[ i ]->AddToFootprint( footprint );
585  }
586 
587  // FOOTPRINT ARCS
588  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
589  {
590  if( m_FootprintItems[i]->m_objType == wxT( 'A' ) )
591  m_FootprintItems[ i ]->AddToFootprint( footprint );
592  }
593 
594  // FOOTPRINT POLYGONS
595  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
596  {
597  if( m_FootprintItems[i]->m_objType == wxT( 'Z' ) )
598  m_FootprintItems[ i ]->AddToFootprint( footprint );
599  }
600 
601  // PADS
602  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
603  {
604  if( m_FootprintItems[i]->m_objType == wxT( 'P' ) )
605  ((PCB_PAD*) m_FootprintItems[ i ] )->AddToFootprint( footprint, m_rotation, false );
606  }
607 
608  // VIAS
609  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
610  {
611  if( m_FootprintItems[i]->m_objType == wxT( 'V' ) )
612  ((PCB_VIA*) m_FootprintItems[ i ] )->AddToFootprint( footprint, m_rotation, false );
613  }
614 }
615 
616 
618 {
619  int i;
620 
621  if( m_Mirror == 1 )
622  {
624 
625  for( i = 0; i < (int) m_FootprintItems.GetCount(); i++ )
626  {
627  if( m_FootprintItems[i]->m_objType == wxT( 'L' ) || // lines
628  m_FootprintItems[i]->m_objType == wxT( 'A' ) || // arcs
629  m_FootprintItems[i]->m_objType == wxT( 'Z' ) || // polygons
630  m_FootprintItems[i]->m_objType == wxT( 'P' ) || // pads
631  m_FootprintItems[i]->m_objType == wxT( 'V' ) ) // vias
632  {
633  m_FootprintItems[i]->Flip();
634  }
635  }
636  }
637 }
638 
639 } // namespace PCAD2KICAD
void SetMirrored(bool isMirrored)
Definition: eda_text.h:195
virtual void AddToFootprint(FOOTPRINT *aFootprint)
void SetFontProperty(XNODE *aNode, TTEXTVALUE *aTextValue, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:194
virtual void Parse(XNODE *aNode, wxStatusBar *aStatusBar, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
void SetTextAngle(double aAngle) override
Definition: fp_text.cpp:70
void SetItalic(bool isItalic)
Definition: eda_text.h:186
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
Definition: lset.cpp:521
void SetOutline(VERTICES_ARRAY *aOutline)
Definition: pcb_polygon.cpp:92
void SetVisible(bool aVisible)
Definition: eda_text.h:192
void DoLayerContentsObjects(XNODE *aNode, PCB_FOOTPRINT *aFootprint, PCB_COMPONENTS_ARRAY *aList, wxStatusBar *aStatusBar, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
wxString ModuleLayer(int aMirror)
void SetDrawCoord()
Set relative coordinates.
Definition: fp_text.cpp:187
XNODE * FindPatternMultilayerSection(XNODE *aNode, wxString *aPatGraphRefName)
XNODE * FindModulePatternDefName(XNODE *aNode, const wxString &aName)
ISLANDS_ARRAY m_cutouts
Definition: pcb_polygon.h:49
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:228
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &actualConversion) override
Definition: pcb_cutout.cpp:48
void SetType(TEXT_TYPE aType)
Definition: fp_text.h:140
void SetTextSizeFromTrueTypeFontHeight(EDA_TEXT *aText, int aTextHeight)
FP_TEXT & Value()
read/write accessors:
Definition: footprint.h:462
virtual wxString GetLayerNetNameRef(int aPCadLayer) const =0
FP_TEXT & Reference()
Definition: footprint.h:463
virtual void Flip() override
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion) override
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
Definition: board.cpp:563
wxString ValidateName(wxString aName)
void SetName(const wxString &aPin, const wxString &aName)
virtual LAYER_TYPE_T GetLayerType(int aPCadLayer) const =0
XNODE * GetChildren() const
Definition: xnode.h:62
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:121
#define NULL
XNODE * GetParent() const
Definition: xnode.h:72
void SetOrientation(double aNewAngle)
Definition: footprint.cpp:1557
VERTICES_ARRAY m_BoardOutline
Definition: pcb_footprint.h:42
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_line.cpp:54
wxString ValidateReference(wxString aRef)
void SetPos0(const wxPoint &aPos)
Definition: fp_text.h:165
Hold an XML or S-expression element.
Definition: xnode.h:43
void SetFPID(const LIB_ID &aFPID)
Definition: footprint.h:191
void SetKeepUpright(bool aKeepUpright)
Definition: fp_text.h:115
PCB_COMPONENTS_ARRAY m_FootprintItems
Definition: pcb_footprint.h:40
XNODE * GetNext() const
Definition: xnode.h:67
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
Definition: lib_id.cpp:122
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_arc.cpp:55
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
void SetLastEditTime(timestamp_t aTime)
Definition: footprint.h:330
void CorrectTextPosition(TTEXTVALUE *aValue)
void FormPolygon(XNODE *aNode, VERTICES_ARRAY *aPolygon, const wxString &aDefaultMeasurementUnit, const wxString &actualConversion)
PCB_FOOTPRINT(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
XNODE * FindNode(XNODE *aChild, const wxString &aTag)
void InitTTextValue(TTEXTVALUE *aTextValue)
PCB_CALLBACKS * m_callbacks
Definition: pcb_component.h:74
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
Definition: eda_text.h:166
void SetTextSizeFromStrokeFontHeight(EDA_TEXT *aText, int aTextHeight)
void SetPosition(const wxPoint &aPos) override
Definition: footprint.cpp:1438
XNODE * FindPinMap(XNODE *aNode)
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion) override
Definition: pcb_plane.cpp:51
void AssignNet(const wxString &aNetName)
Definition: pcb_polygon.cpp:86