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-2016 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 
30 #include <wx/wx.h>
31 #include <wx/config.h>
32 
33 #include <common.h>
34 
35 #include <pcb_arc.h>
36 #include <pcb_copper_pour.h>
37 #include <pcb_cutout.h>
38 #include <pcb_plane.h>
39 #include <pcb_line.h>
40 #include <pcb_module.h>
41 #include <pcb_pad.h>
42 #include <pcb_polygon.h>
43 #include <pcb_text.h>
44 #include <pcb_via.h>
45 
46 #include <trigo.h>
47 
48 namespace PCAD2KICAD {
49 
50 PCB_MODULE::PCB_MODULE( PCB_CALLBACKS* aCallbacks, BOARD* aBoard ) : PCB_COMPONENT( aCallbacks,
51  aBoard )
52 {
54  m_mirror = 0;
55  m_objType = wxT( 'M' ); // MODULE
56  m_KiCadLayer = F_SilkS; // default
57 }
58 
59 
61 {
62  int i;
63 
64  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
65  {
66  delete m_moduleObjects[i];
67  }
68 }
69 
70 
71 XNODE* PCB_MODULE::FindModulePatternDefName( XNODE* aNode, const wxString& aName )
72 {
73  XNODE* result, * lNode;
74  wxString propValue1, propValue2;
75 
76  result = NULL;
77  lNode = FindNode( aNode, wxT( "patternDef" ) );
78 
79  while( lNode )
80  {
81  if( lNode->GetName() == wxT( "patternDef" ) )
82  {
83  lNode->GetAttribute( wxT( "Name" ), &propValue1 );
84  FindNode( lNode,
85  wxT( "originalName" ) )->GetAttribute( wxT( "Name" ), &propValue2 );
86 
87  if( ValidateName( propValue1 ) == aName
88  || ValidateName( propValue2 ) == aName )
89  {
90  result = lNode;
91  lNode = NULL;
92  }
93  }
94 
95  if( lNode )
96  lNode = lNode->GetNext();
97  }
98 
99  if( result == NULL )
100  {
101  lNode = FindNode( aNode, wxT( "patternDefExtended" ) ); // New file format
102 
103  while( lNode )
104  {
105  if( lNode->GetName() == wxT( "patternDefExtended" ) )
106  {
107  lNode->GetAttribute( wxT( "Name" ), &propValue1 );
108 
109  if( ValidateName( propValue1 ) == aName )
110  {
111  result = lNode;
112  lNode = NULL;
113  }
114  }
115 
116  if( lNode )
117  lNode = lNode->GetNext();
118  }
119  }
120 
121  return result;
122 }
123 
124 
125 XNODE* PCB_MODULE::FindPatternMultilayerSection( XNODE* aNode, wxString* aPatGraphRefName )
126 {
127  XNODE* result, * pNode, * lNode;
128  wxString propValue, patName;
129 
130  result = NULL;
131  pNode = aNode; // pattern;
132  lNode = aNode;
133 
134  // calling from library conversion we need to find pattern
135  if( lNode->GetName() == wxT( "compDef" ) )
136  {
137  lNode->GetAttribute( wxT( "Name" ), &propValue );
138  propValue.Trim( false );
139  patName = ValidateName( propValue );
140 
141  if( FindNode( lNode, wxT( "attachedPattern" ) ) )
142  {
143  FindNode( FindNode( lNode, wxT( "attachedPattern" ) ),
144  wxT( "patternName" ) )->GetAttribute( wxT( "Name" ), &propValue );
145  propValue.Trim( false );
146  propValue.Trim( true );
147  patName = ValidateName( propValue );
148  }
149 
150  lNode = FindModulePatternDefName( lNode->GetParent(), patName );
151  pNode = lNode; // pattern;
152  }
153 
154  lNode = NULL;
155 
156  if( pNode )
157  lNode = FindNode( pNode, wxT( "multiLayer" ) ); // Old file format
158 
159  if( lNode )
160  {
161  *aPatGraphRefName = wxEmptyString; // default
162  result = lNode;
163  }
164  else
165  {
166  // New file format
167 
168  if( *aPatGraphRefName == wxEmptyString ) // default
169  {
170  if( FindNode( aNode, wxT( "patternGraphicsNameRef" ) ) )
171  {
172  FindNode( aNode,
173  wxT( "patternGraphicsNameRef" ) )->GetAttribute( wxT( "Name" ),
174  aPatGraphRefName );
175  }
176  }
177 
178  if( FindNode( aNode, wxT( "patternGraphicsDef" ) ) )
179  lNode = FindNode( aNode, wxT( "patternGraphicsDef" ) );
180  else if( pNode )
181  lNode = FindNode( pNode, wxT( "patternGraphicsDef" ) );
182 
183  if( *aPatGraphRefName == wxEmptyString ) // no patern delection, the first is actual...
184  {
185  if( lNode )
186  {
187  result = FindNode( lNode, wxT( "multiLayer" ) );
188  lNode = NULL;
189  }
190  }
191 
192  while( lNode ) // selected by name
193  {
194  if( lNode->GetName() == wxT( "patternGraphicsDef" ) )
195  {
196  FindNode( lNode,
197  wxT( "patternGraphicsNameDef" ) )->GetAttribute( wxT( "Name" ),
198  &propValue );
199 
200  if( propValue == *aPatGraphRefName )
201  {
202  result = FindNode( lNode, wxT( "multiLayer" ) );
203  lNode = NULL;
204  }
205  else
206  lNode = lNode->GetNext();
207  }
208  else
209  lNode = lNode->GetNext();
210  }
211  }
212 
213  return result;
214 }
215 
216 
218  PCB_MODULE* aPCBModule,
219  PCB_COMPONENTS_ARRAY* aList,
220  wxStatusBar* aStatusBar,
221  const wxString& aDefaultMeasurementUnit,
222  const wxString& aActualConversion )
223 {
224  PCB_ARC* arc;
225  PCB_POLYGON* polygon;
226  PCB_POLYGON *plane_layer = NULL;
227  PCB_COPPER_POUR* copperPour;
228  PCB_CUTOUT* cutout;
229  PCB_PLANE* plane;
230  VERTICES_ARRAY* plane_layer_polygon;
231  PCB_LINE* line;
232  PCB_TEXT* text;
233  XNODE* lNode, * tNode;
234  wxString propValue;
235  long long i;
236  int PCadLayer;
237  long num = 0;
238 
239  i = 0;
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 && aPCBModule )
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,
301  &aPCBModule->m_name,
302  aDefaultMeasurementUnit,
303  aActualConversion );
304  }
305  }
306  }
307 
308  // added as Sergeys request 02/2008
309  if( lNode->GetName() == wxT( "arc" ) || lNode->GetName() == wxT( "triplePointArc" ) )
310  {
311  arc = new PCB_ARC( m_callbacks, m_board );
312  arc->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
313  aList->Add( arc );
314  }
315 
316  if( lNode->GetName() == wxT( "pcbPoly" ) )
317  {
318  if( m_callbacks->GetLayerType( PCadLayer ) == LAYER_TYPE_PLANE )
319  {
320  plane_layer_polygon = new VERTICES_ARRAY;
321  wxASSERT( plane_layer );
322  plane_layer->FormPolygon( lNode, plane_layer_polygon, aDefaultMeasurementUnit, aActualConversion );
323  plane_layer->m_cutouts.Add( plane_layer_polygon );
324  }
325  else
326  {
327  polygon = new PCB_POLYGON( m_callbacks, m_board, PCadLayer );
328  if( polygon->Parse( lNode,
329  aDefaultMeasurementUnit,
330  aActualConversion ) )
331  aList->Add( polygon );
332  else
333  delete polygon;
334  }
335  }
336 
337  if( lNode->GetName() == wxT( "copperPour95" ) )
338  {
339  copperPour = new PCB_COPPER_POUR( m_callbacks, m_board, PCadLayer );
340 
341  if( copperPour->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
342  aList->Add( copperPour );
343  else
344  delete copperPour;
345  }
346 
347  if( lNode->GetName() == wxT( "polyCutOut" ) )
348  {
349  cutout = new PCB_CUTOUT( m_callbacks, m_board, PCadLayer );
350 
351  if( cutout->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
352  aList->Add( cutout );
353  else
354  delete cutout;
355  }
356 
357  if( lNode->GetName() == wxT( "planeObj" ) )
358  {
359  plane = new PCB_PLANE( m_callbacks, m_board, PCadLayer );
360 
361  if( plane->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
362  aList->Add( plane );
363  else
364  delete plane;
365  }
366 
367  lNode = lNode->GetNext();
368  }
369 }
370 
371 
372 void PCB_MODULE::SetName( const wxString& aPin, const wxString& aName )
373 {
374  int i;
375  long num;
376 
377  aPin.ToLong( &num );
378 
379  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
380  {
381  if( m_moduleObjects[i]->m_objType == wxT( 'P' ) )
382  if( ( (PCB_PAD*) m_moduleObjects[i] )->m_number == num )
383  ( (PCB_PAD*) m_moduleObjects[i] )->m_name.text = aName;
384 
385 
386  }
387 }
388 
389 
390 void PCB_MODULE::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
391  const wxString& aDefaultMeasurementUnit,
392  const wxString& aActualConversion )
393 {
394  XNODE* lNode, * tNode, * mNode;
395  PCB_PAD* pad;
396  PCB_VIA* via;
397  wxString propValue, str;
398 
399  FindNode( aNode, wxT( "originalName" ) )->GetAttribute( wxT( "Name" ),
400  &propValue );
401  propValue.Trim( false );
402  m_name.text = propValue;
403 
404  // aStatusBar->SetStatusText( wxT( "Creating Component : " ) + m_name.text );
405  lNode = aNode;
407 
408  if( lNode )
409  {
410  tNode = lNode;
411  tNode = tNode->GetChildren();
412 
413  while( tNode )
414  {
415  if( tNode->GetName() == wxT( "pad" ) )
416  {
417  pad = new PCB_PAD( m_callbacks, m_board );
418  pad->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
419  m_moduleObjects.Add( pad );
420  }
421 
422  if( tNode->GetName() == wxT( "via" ) )
423  {
424  via = new PCB_VIA( m_callbacks, m_board );
425  via->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
426  m_moduleObjects.Add( via );
427  }
428 
429  tNode = tNode->GetNext();
430  }
431  }
432 
433  if( lNode )
434  lNode = lNode->GetParent();
435 
436  if( lNode )
437  lNode = FindNode( lNode, wxT( "layerContents" ) );
438 
439  while( lNode )
440  {
441  if( lNode->GetName() == wxT( "layerContents" ) )
442  DoLayerContentsObjects( lNode, this, &m_moduleObjects, aStatusBar,
443  aDefaultMeasurementUnit, aActualConversion );
444 
445  lNode = lNode->GetNext();
446  }
447 
448  // map pins
449  lNode = FindPinMap( aNode );
450 
451  if( lNode )
452  {
453  mNode = lNode->GetChildren();
454 
455  while( mNode )
456  {
457  if( mNode->GetName() == wxT( "padNum" ) )
458  {
459  str = mNode->GetNodeContent();
460  mNode = mNode->GetNext();
461 
462  if( !mNode )
463  break;
464 
465  mNode->GetAttribute( wxT( "Name" ), &propValue );
466  SetName( str, propValue );
467  mNode = mNode->GetNext();
468  }
469  else
470  {
471  mNode = mNode->GetNext();
472 
473  if( !mNode )
474  break;
475 
476  mNode = mNode->GetNext();
477  }
478  }
479  }
480 }
481 
482 
483 wxString PCB_MODULE::ModuleLayer( int aMirror )
484 {
485  wxString result;
486 
487  // ///NOT ! {IntToStr(KiCadLayer)} NOT !
488  // / MODULES ARE HARD PLACED ON COMPONENT OR COPPER LAYER.
489  // / IsFLIPPED--> MIRROR attribute is decision Point!!!
490 
491  if( aMirror == 0 )
492  result = wxT( "15" ); // Components side
493  else
494  result = wxT( "0" ); // Copper side
495 
496  return result;
497 }
498 
499 
501 {
502  int i;
503  int r;
504 
505  // transform text positions
508  (double) -m_rotation );
509 
512  (double) -m_rotation );
513 
514  MODULE* module = new MODULE( m_board );
515  m_board->Add( module, ADD_APPEND );
516 
518  module->SetLayer( m_mirror ? B_Cu : F_Cu );
519  module->SetOrientation( m_rotation );
520  module->SetTimeStamp( 0 );
521  module->SetLastEditTime( 0 );
522 
523  module->SetFPID( LIB_ID( m_compRef ) );
524 
525  module->SetAttributes( MOD_DEFAULT | MOD_CMS );
526 
527  // reference text
528  TEXTE_MODULE* ref_text = &module->Reference();
529 
530  ref_text->SetText( ValidateReference( m_name.text ) );
532 
534  if( m_name.isTrueType )
536  else
538 
540  ref_text->SetTextAngle( r );
541  ref_text->SetUnlocked( true );
542 
543  ref_text->SetItalic( m_name.isItalic );
544  ref_text->SetThickness( m_name.textstrokeWidth );
545 
546  ref_text->SetMirrored( m_name.mirror );
547  ref_text->SetVisible( m_name.textIsVisible );
548 
550 
551  // Calculate the actual position.
552  ref_text->SetDrawCoord();
553 
554  // value text
555  TEXTE_MODULE* val_text = &module->Value();
556 
557  val_text->SetText( m_value.text );
559 
561  if( m_value.isTrueType )
563  else
565 
567  val_text->SetTextAngle( r );
568  val_text->SetUnlocked( true );
569 
570  val_text->SetItalic( m_value.isItalic );
571  val_text->SetThickness( m_value.textstrokeWidth );
572 
573  val_text->SetMirrored( m_value.mirror );
574  val_text->SetVisible( m_value.textIsVisible );
575 
576  val_text->SetLayer( m_value.mirror ? FlipLayer( m_KiCadLayer ) : m_KiCadLayer );
577 
578  // Calculate the actual position.
579  val_text->SetDrawCoord();
580 
581  // TEXTS
582  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
583  {
584  if( m_moduleObjects[i]->m_objType == wxT( 'T' ) )
585  {
586  ( (PCB_TEXT*) m_moduleObjects[i] )->m_tag = i + 2;
587  m_moduleObjects[i]->AddToModule( module );
588  }
589  }
590 
591  // MODULE LINES
592  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
593  {
594  if( m_moduleObjects[i]->m_objType == wxT( 'L' ) )
595  m_moduleObjects[i]->AddToModule( module );
596  }
597 
598  // MODULE Arcs
599  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
600  {
601  if( m_moduleObjects[i]->m_objType == wxT( 'A' ) )
602  m_moduleObjects[i]->AddToModule( module );
603  }
604 
605  // MODULE POLYGONS
606  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
607  {
608  if( m_moduleObjects[i]->m_objType == wxT( 'Z' ) )
609  m_moduleObjects[i]->AddToModule( module );
610  }
611 
612  // PADS
613  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
614  {
615  if( m_moduleObjects[i]->m_objType == wxT( 'P' ) )
616  ( (PCB_PAD*) m_moduleObjects[i] )->AddToModule( module, m_rotation, false );
617  }
618 
619  // VIAS
620  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
621  {
622  if( m_moduleObjects[i]->m_objType == wxT( 'V' ) )
623  ( (PCB_VIA*) m_moduleObjects[i] )->AddToModule( module, m_rotation, false );
624  }
625 
626  module->CalculateBoundingBox();
627 }
628 
629 
631 {
632  int i;
633 
634  if( m_mirror == 1 )
635  {
637 
638  for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ )
639  {
640  if( m_moduleObjects[i]->m_objType == wxT( 'L' ) || // lines
641  m_moduleObjects[i]->m_objType == wxT( 'A' ) || // arcs
642  m_moduleObjects[i]->m_objType == wxT( 'Z' ) || // polygons
643  m_moduleObjects[i]->m_objType == wxT( 'P' ) || // pads
644  m_moduleObjects[i]->m_objType == wxT( 'V' ) ) // vias
645  {
646  m_moduleObjects[i]->Flip();
647  }
648  }
649  }
650 }
651 
652 } // namespace PCAD2KICAD
void SetMirrored(bool isMirrored)
Definition: eda_text.h:176
TEXTE_MODULE & Reference()
Definition: class_module.h:502
wxString ModuleLayer(int aMirror)
Definition: pcb_module.cpp:483
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.
void CalculateBoundingBox()
Function CalculateBoundingBox calculates the bounding box in board coordinates.
void SetItalic(bool isItalic)
Definition: eda_text.h:167
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
Function FlippedLayerNumber.
Definition: lset.cpp:472
void SetOutline(VERTICES_ARRAY *aOutline)
Definition: pcb_polygon.cpp:88
void SetVisible(bool aVisible)
Definition: eda_text.h:173
Set for modules listed in the automatic insertion list (usually SMD footprints)
Definition: class_module.h:77
void SetName(const wxString &aPin, const wxString &aName)
Definition: pcb_module.cpp:372
virtual void Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_pad.cpp:59
XNODE * FindPatternMultilayerSection(XNODE *aNode, wxString *aPatGraphRefName)
Definition: pcb_module.cpp:125
ISLANDS_ARRAY m_cutouts
Definition: pcb_polygon.h:49
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:216
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:49
void SetTextSizeFromTrueTypeFontHeight(EDA_TEXT *aText, int aTextHeight)
const string & str
Definition: json11.cpp:596
virtual void AddToModule(MODULE *aModule)
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion)
Definition: pcb_text.cpp:51
XNODE * FindModulePatternDefName(XNODE *aNode, const wxString &aName)
Definition: pcb_module.cpp:71
XNODE * GetParent() const
Definition: xnode.h:73
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion) override
wxString ValidateName(wxString aName)
PCB_MODULE(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
Definition: pcb_module.cpp:50
virtual void Flip() override
Definition: pcb_module.cpp:630
TEXTE_MODULE & Value()
read/write accessors:
Definition: class_module.h:501
void SetLastEditTime(timestamp_t aTime)
Definition: class_module.h:309
XNODE * GetChildren() const
Definition: xnode.h:63
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_INSERT) override
Adds an item to the container.
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:390
void SetPosition(const wxPoint &aPos) override
void SetType(TEXT_TYPE aType)
virtual wxString GetLayerNetNameRef(int aPCadLayer)=0
void SetPos0(const wxPoint &aPos)
default
Definition: class_module.h:76
Class XNODE holds an XML or S-expression element.
Definition: xnode.h:43
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:217
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
void SetOrientation(double newangle)
void CorrectTextPosition(TTEXTVALUE *aValue)
void SetUnlocked(bool unlocked)
void FormPolygon(XNODE *aNode, VERTICES_ARRAY *aPolygon, const wxString &aDefaultMeasurementUnit, const wxString &actualConversion)
size_t i
Definition: json11.cpp:597
void SetDrawCoord()
Set absolute coordinates.
PCB_COMPONENTS_ARRAY m_moduleObjects
Definition: pcb_module.h:44
XNODE * FindNode(XNODE *aChild, const wxString &aTag)
void InitTTextValue(TTEXTVALUE *aTextValue)
The common library.
PCB_CALLBACKS * m_callbacks
Definition: pcb_component.h:78
void SetTextSizeFromStrokeFontHeight(EDA_TEXT *aText, int aTextHeight)
void SetTextAngle(double aAngle)
virtual void Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion) override
Definition: pcb_via.cpp:49
XNODE * GetNext() const
Definition: xnode.h:68
XNODE * FindPinMap(XNODE *aNode)
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion) override
Definition: pcb_plane.cpp:52
void AssignNet(const wxString &aNetName)
Definition: pcb_polygon.cpp:82
void SetFPID(const LIB_ID &aFPID)
Definition: class_module.h:192
void AddToBoard() override
Definition: pcb_module.cpp:500
void SetThickness(int aNewThickness)
Function SetThickness sets pen width.
Definition: eda_text.h:146
void SetAttributes(int aAttributes)
Definition: class_module.h:225
void SetTimeStamp(timestamp_t aNewTimeStamp)
Definition: base_struct.h:214
VERTICES_ARRAY m_boardOutline
Definition: pcb_module.h:46
virtual void SetText(const wxString &aText)
Definition: eda_text.h:139