KiCad PCB EDA Suite
pcb_module.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_module.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 
43 PCB_MODULE::PCB_MODULE( PCB_CALLBACKS* aCallbacks, BOARD* aBoard ) : PCB_COMPONENT( aCallbacks,
44  aBoard )
45 {
47  m_mirror = 0;
48  m_objType = wxT( 'M' ); // MODULE
49  m_KiCadLayer = F_SilkS; // default
50 }
51 
52 
54 {
55  int i;
56 
57  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
58  {
59  delete m_moduleObjects[i];
60  }
61 }
62 
63 
64 XNODE* PCB_MODULE::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_MODULE::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_MODULE* aPCBModule,
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 && aPCBModule )
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  &aPCBModule->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_MODULE::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_moduleObjects.GetCount(); i++ )
373  {
374  if( m_moduleObjects[i]->m_objType == wxT( 'P' ) )
375  if( ( (PCB_PAD*) m_moduleObjects[i] )->m_number == num )
376  ( (PCB_PAD*) m_moduleObjects[i] )->m_name.text = aName;
377 
378 
379  }
380 }
381 
382 
383 void PCB_MODULE::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_moduleObjects.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_moduleObjects.Add( via );
420  }
421 
422  tNode = tNode->GetNext();
423  }
424  }
425 
426  if( lNode )
427  lNode = lNode->GetParent();
428 
429  if( lNode )
430  lNode = FindNode( lNode, wxT( "layerContents" ) );
431 
432  while( lNode )
433  {
434  if( lNode->GetName() == wxT( "layerContents" ) )
435  DoLayerContentsObjects( lNode, this, &m_moduleObjects, aStatusBar,
436  aDefaultMeasurementUnit, aActualConversion );
437 
438  lNode = lNode->GetNext();
439  }
440 
441  // map pins
442  lNode = FindPinMap( aNode );
443 
444  if( lNode )
445  {
446  mNode = lNode->GetChildren();
447 
448  while( mNode )
449  {
450  if( mNode->GetName() == wxT( "padNum" ) )
451  {
452  str = mNode->GetNodeContent();
453  mNode = mNode->GetNext();
454 
455  if( !mNode )
456  break;
457 
458  mNode->GetAttribute( wxT( "Name" ), &propValue );
459  SetName( str, propValue );
460  mNode = mNode->GetNext();
461  }
462  else
463  {
464  mNode = mNode->GetNext();
465 
466  if( !mNode )
467  break;
468 
469  mNode = mNode->GetNext();
470  }
471  }
472  }
473 }
474 
475 
476 wxString PCB_MODULE::ModuleLayer( int aMirror )
477 {
478  wxString result;
479 
480  // ///NOT ! {IntToStr(KiCadLayer)} NOT !
481  // / MODULES ARE HARD PLACED ON COMPONENT OR COPPER LAYER.
482  // / IsFLIPPED--> MIRROR attribute is decision Point!!!
483 
484  if( aMirror == 0 )
485  result = wxT( "15" ); // Components side
486  else
487  result = wxT( "0" ); // Copper side
488 
489  return result;
490 }
491 
492 
494 {
495  int i;
496  int r;
497 
498  // transform text positions
501 
504 
505  MODULE* module = new MODULE( m_board );
506  m_board->Add( module, ADD_MODE::APPEND );
507 
508  module->SetPosition( wxPoint( m_positionX, m_positionY ) );
509  module->SetLayer( m_mirror ? B_Cu : F_Cu );
510  module->SetOrientation( m_rotation );
511  module->SetLastEditTime( 0 );
512 
513  LIB_ID fpID;
514  fpID.Parse( m_compRef, LIB_ID::ID_PCB, true );
515  module->SetFPID( fpID );
516 
517  // reference text
518  FP_TEXT* ref_text = &module->Reference();
519 
520  ref_text->SetText( ValidateReference( m_name.text ) );
521  ref_text->SetType( FP_TEXT::TEXT_is_REFERENCE );
522 
523  ref_text->SetPos0( wxPoint( m_name.correctedPositionX, m_name.correctedPositionY ) );
524  if( m_name.isTrueType )
526  else
528 
530  ref_text->SetTextAngle( r );
531  ref_text->SetKeepUpright( false );
532 
533  ref_text->SetItalic( m_name.isItalic );
535 
536  ref_text->SetMirrored( m_name.mirror );
537  ref_text->SetVisible( m_name.textIsVisible );
538 
540 
541  // Calculate the actual position.
542  ref_text->SetDrawCoord();
543 
544  // value text
545  FP_TEXT* val_text = &module->Value();
546 
547  val_text->SetText( m_value.text );
548  val_text->SetType( FP_TEXT::TEXT_is_VALUE );
549 
551  if( m_value.isTrueType )
553  else
555 
557  val_text->SetTextAngle( r );
558  val_text->SetKeepUpright( false );
559 
560  val_text->SetItalic( m_value.isItalic );
562 
563  val_text->SetMirrored( m_value.mirror );
564  val_text->SetVisible( m_value.textIsVisible );
565 
567 
568  // Calculate the actual position.
569  val_text->SetDrawCoord();
570 
571  // TEXTS
572  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
573  {
574  if( m_moduleObjects[i]->m_objType == wxT( 'T' ) )
575  {
576  ( (PCB_TEXT*) m_moduleObjects[i] )->m_tag = i + 2;
577  m_moduleObjects[i]->AddToModule( module );
578  }
579  }
580 
581  // MODULE LINES
582  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
583  {
584  if( m_moduleObjects[i]->m_objType == wxT( 'L' ) )
585  m_moduleObjects[i]->AddToModule( module );
586  }
587 
588  // MODULE Arcs
589  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
590  {
591  if( m_moduleObjects[i]->m_objType == wxT( 'A' ) )
592  m_moduleObjects[i]->AddToModule( module );
593  }
594 
595  // MODULE POLYGONS
596  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
597  {
598  if( m_moduleObjects[i]->m_objType == wxT( 'Z' ) )
599  m_moduleObjects[i]->AddToModule( module );
600  }
601 
602  // PADS
603  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
604  {
605  if( m_moduleObjects[i]->m_objType == wxT( 'P' ) )
606  ( (PCB_PAD*) m_moduleObjects[i] )->AddToModule( module, m_rotation, false );
607  }
608 
609  // VIAS
610  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
611  {
612  if( m_moduleObjects[i]->m_objType == wxT( 'V' ) )
613  ( (PCB_VIA*) m_moduleObjects[i] )->AddToModule( module, m_rotation, false );
614  }
615 
616  module->CalculateBoundingBox();
617 }
618 
619 
621 {
622  int i;
623 
624  if( m_mirror == 1 )
625  {
627 
628  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
629  {
630  if( m_moduleObjects[i]->m_objType == wxT( 'L' ) || // lines
631  m_moduleObjects[i]->m_objType == wxT( 'A' ) || // arcs
632  m_moduleObjects[i]->m_objType == wxT( 'Z' ) || // polygons
633  m_moduleObjects[i]->m_objType == wxT( 'P' ) || // pads
634  m_moduleObjects[i]->m_objType == wxT( 'V' ) ) // vias
635  {
636  m_moduleObjects[i]->Flip();
637  }
638  }
639  }
640 }
641 
642 } // namespace PCAD2KICAD
void SetMirrored(bool isMirrored)
Definition: eda_text.h:194
wxString ModuleLayer(int aMirror)
Definition: pcb_module.cpp:476
void SetFontProperty(XNODE *aNode, TTEXTVALUE *aTextValue, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
virtual void SetLayer(PCB_LAYER_ID aLayer)
Function SetLayer sets the layer this item is on.
FP_TEXT & Value()
read/write accessors:
Definition: class_module.h:475
void CalculateBoundingBox()
Function CalculateBoundingBox calculates the bounding box in board coordinates.
void SetTextAngle(double aAngle) override
Definition: fp_text.cpp:68
void SetItalic(bool isItalic)
Definition: eda_text.h:185
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
Definition: lset.cpp:520
void SetOutline(VERTICES_ARRAY *aOutline)
Definition: pcb_polygon.cpp:92
void SetVisible(bool aVisible)
Definition: eda_text.h:191
void SetDrawCoord()
Set absolute coordinates.
Definition: fp_text.cpp:198
void SetName(const wxString &aPin, const wxString &aName)
Definition: pcb_module.cpp:365
virtual void Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_pad.cpp:58
XNODE * FindPatternMultilayerSection(XNODE *aNode, wxString *aPatGraphRefName)
Definition: pcb_module.cpp:118
ISLANDS_ARRAY m_cutouts
Definition: pcb_polygon.h:49
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:208
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:142
void SetTextSizeFromTrueTypeFontHeight(EDA_TEXT *aText, int aTextHeight)
virtual void AddToModule(MODULE *aModule)
XNODE * FindModulePatternDefName(XNODE *aNode, const wxString &aName)
Definition: pcb_module.cpp:64
FP_TEXT & Reference()
Definition: class_module.h:476
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.
wxString ValidateName(wxString aName)
XNODE * GetChildren() const
Definition: xnode.h:63
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:120
#define NULL
PCB_MODULE(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
Definition: pcb_module.cpp:43
virtual void Flip() override
Definition: pcb_module.cpp:620
XNODE * GetParent() const
Definition: xnode.h:73
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
void SetLastEditTime(timestamp_t aTime)
Definition: class_module.h:339
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_line.cpp:54
wxString ValidateReference(wxString aRef)
virtual void Parse(XNODE *aNode, wxStatusBar *aStatusBar, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_module.cpp:383
void SetPosition(const wxPoint &aPos) override
virtual wxString GetLayerNetNameRef(int aPCadLayer)=0
void SetPos0(const wxPoint &aPos)
Definition: fp_text.h:169
void SetOrientation(double aNewAngle)
XNODE holds an XML or S-expression element.
Definition: xnode.h:43
void SetKeepUpright(bool aKeepUpright)
Definition: fp_text.h:117
XNODE * GetNext() const
Definition: xnode.h:68
virtual LAYER_TYPE_T GetLayerType(int aPCadLayer)=0
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_arc.cpp:55
void DoLayerContentsObjects(XNODE *aNode, PCB_MODULE *aPCBModule, PCB_COMPONENTS_ARRAY *aList, wxStatusBar *aStatusBar, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_module.cpp:210
Information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:186
void CorrectTextPosition(TTEXTVALUE *aValue)
void FormPolygon(XNODE *aNode, VERTICES_ARRAY *aPolygon, const wxString &aDefaultMeasurementUnit, const wxString &actualConversion)
PCB_COMPONENTS_ARRAY m_moduleObjects
Definition: pcb_module.h:44
XNODE * FindNode(XNODE *aChild, const wxString &aTag)
void InitTTextValue(TTEXTVALUE *aTextValue)
PCB_CALLBACKS * m_callbacks
Definition: pcb_component.h:75
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
Definition: eda_text.h:164
void SetTextSizeFromStrokeFontHeight(EDA_TEXT *aText, int aTextHeight)
virtual void Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion) override
Definition: pcb_via.cpp:48
int Parse(const UTF8 &aId, LIB_ID_TYPE aType, bool aFix=false)
Parse LIB_ID with the information from aId.
Definition: lib_id.cpp:122
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
void SetFPID(const LIB_ID &aFPID)
Definition: class_module.h:211
void AddToBoard() override
Definition: pcb_module.cpp:493
VERTICES_ARRAY m_boardOutline
Definition: pcb_module.h:46