70 XNODE* result, * lNode;
71 wxString propValue1, propValue2;
74 lNode =
FindNode( aNode, wxT(
"patternDef" ) );
78 if( lNode->GetName() == wxT(
"patternDef" ) )
80 lNode->GetAttribute( wxT(
"Name" ), &propValue1 );
82 wxT(
"originalName" ) )->GetAttribute( wxT(
"Name" ), &propValue2 );
95 if( result ==
nullptr )
97 lNode =
FindNode( aNode, wxT(
"patternDefExtended" ) );
101 if( lNode->GetName() == wxT(
"patternDefExtended" ) )
103 lNode->GetAttribute( wxT(
"Name" ), &propValue1 );
123 XNODE* result, * pNode, * lNode;
124 wxString propValue, patName;
131 if( lNode->GetName() == wxT(
"compDef" ) )
133 lNode->GetAttribute( wxT(
"Name" ), &propValue );
134 propValue.Trim(
false );
137 if(
FindNode( lNode, wxT(
"attachedPattern" ) ) )
140 wxT(
"patternName" ) )->GetAttribute( wxT(
"Name" ), &propValue );
141 propValue.Trim(
false );
142 propValue.Trim(
true );
153 lNode =
FindNode( pNode, wxT(
"multiLayer" ) );
157 *aPatGraphRefName = wxEmptyString;
164 if( *aPatGraphRefName == wxEmptyString )
166 if(
FindNode( aNode, wxT(
"patternGraphicsNameRef" ) ) )
169 wxT(
"patternGraphicsNameRef" ) )->GetAttribute( wxT(
"Name" ),
174 if(
FindNode( aNode, wxT(
"patternGraphicsDef" ) ) )
175 lNode =
FindNode( aNode, wxT(
"patternGraphicsDef" ) );
177 lNode =
FindNode( pNode, wxT(
"patternGraphicsDef" ) );
179 if( *aPatGraphRefName == wxEmptyString )
183 result =
FindNode( lNode, wxT(
"multiLayer" ) );
190 if( lNode->GetName() == wxT(
"patternGraphicsDef" ) )
193 wxT(
"patternGraphicsNameDef" ) )->GetAttribute( wxT(
"Name" ),
196 if( propValue == *aPatGraphRefName )
198 result =
FindNode( lNode, wxT(
"multiLayer" ) );
218 PCB_COMPONENTS_ARRAY* aList, wxStatusBar* aStatusBar,
219 const wxString& aDefaultMeasurementUnit,
220 const wxString& aActualConversion )
228 VERTICES_ARRAY* plane_layer_polygon;
231 XNODE* lNode, * tNode;
240 if(
FindNode( aNode, wxT(
"layerNumRef" ) ) )
241 FindNode( aNode, wxT(
"layerNumRef" ) )->GetNodeContent().ToLong( &num );
243 PCadLayer = (int) num;
250 aList->Add( plane_layer );
264 if( lNode->GetName() == wxT(
"line" ) )
267 line->
Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
271 if( lNode->GetName() == wxT(
"text" ) )
274 text->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
279 if( lNode->GetName() == wxT(
"attr" ) )
282 lNode->GetAttribute( wxT(
"Name" ), &propValue );
283 propValue.Trim(
false );
284 propValue.Trim(
true );
286 if( propValue == wxT(
"RefDes" ) )
288 tNode =
FindNode( lNode, wxT(
"textStyleRef" ) );
290 if( tNode && aFootprint )
306 if( lNode->GetName() == wxT(
"arc" ) || lNode->GetName() == wxT(
"triplePointArc" ) )
309 arc->
Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
313 if( lNode->GetName() == wxT(
"pcbPoly" ) )
317 plane_layer_polygon =
new VERTICES_ARRAY;
318 plane_layer->
FormPolygon( lNode, plane_layer_polygon, aDefaultMeasurementUnit,
320 plane_layer->
m_cutouts.Add( plane_layer_polygon );
326 if( polygon->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
327 aList->Add( polygon );
333 if( lNode->GetName() == wxT(
"copperPour95" ) )
337 if( copperPour->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
338 aList->Add( copperPour );
343 if( lNode->GetName() == wxT(
"polyCutOut" ) )
347 if( cutout->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
348 aList->Add( cutout );
353 if( lNode->GetName() == wxT(
"planeObj" ) )
357 if( plane->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
387 const wxString& aDefaultMeasurementUnit,
388 const wxString& aActualConversion )
390 XNODE* lNode, * tNode, * mNode;
393 wxString propValue, str;
395 FindNode( aNode, wxT(
"originalName" ) )->GetAttribute( wxT(
"Name" ), &propValue );
396 propValue.Trim(
false );
410 if( tNode->GetName() == wxT(
"pad" ) )
413 pad->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
417 if( tNode->GetName() == wxT(
"via" ) )
420 via->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
431 lNode =
FindNode( lNode, wxT(
"layerContents" ) );
435 if( lNode->GetName() == wxT(
"layerContents" ) )
437 aDefaultMeasurementUnit, aActualConversion );
451 if( mNode->GetName() == wxT(
"padNum" ) )
453 str = mNode->GetNodeContent();
459 mNode->GetAttribute( wxT(
"Name" ), &propValue );
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Information pertinent to a Pcbnew printed circuit board.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
void SetMirrored(bool isMirrored)
virtual void SetVisible(bool aVisible)
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
void SetKeepUpright(bool aKeepUpright)
virtual void SetText(const wxString &aText)
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
void SetItalic(bool aItalic)
void SetType(TEXT_TYPE aType)
void SetDrawCoord()
Set relative coordinates.
void SetPos0(const VECTOR2I &aPos)
A logical library item identifier and consists of various portions much like a URI.
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultUnits, const wxString &aActualConversion)
virtual LAYER_TYPE_T GetLayerType(int aPCadLayer) const =0
virtual wxString GetLayerNetNameRef(int aPCadLayer) const =0
PCB_LAYER_ID m_KiCadLayer
wxString m_patGraphRefName
virtual void AddToFootprint(FOOTPRINT *aFootprint)
PCB_CALLBACKS * m_callbacks
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion) override
virtual bool Parse(XNODE *aNode, const wxString &aDefaultMeasurementUnit, const wxString &actualConversion) override
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultUnits, const wxString &aActualConversion)
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion) override
void FormPolygon(XNODE *aNode, VERTICES_ARRAY *aPolygon, const wxString &aDefaultUnits, const wxString &actualConversion)
void AssignNet(const wxString &aNetName)
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion)
void SetOutline(VERTICES_ARRAY *aOutline)
Hold an XML or S-expression element.
XNODE * GetParent() const
XNODE * GetChildren() const
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
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)
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)