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