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