71 XNODE* result, * lNode;
72 wxString propValue1, propValue2;
75 lNode =
FindNode( aNode, wxT(
"patternDef" ) );
79 if( lNode->GetName() == wxT(
"patternDef" ) )
81 lNode->GetAttribute( wxT(
"Name" ), &propValue1 );
83 wxT(
"originalName" ) )->GetAttribute( wxT(
"Name" ), &propValue2 );
96 if( result ==
nullptr )
98 lNode =
FindNode( aNode, wxT(
"patternDefExtended" ) );
102 if( lNode->GetName() == wxT(
"patternDefExtended" ) )
104 lNode->GetAttribute( wxT(
"Name" ), &propValue1 );
124 XNODE* result, * pNode, * lNode;
125 wxString propValue, patName;
132 if( lNode->GetName() == wxT(
"compDef" ) )
134 lNode->GetAttribute( wxT(
"Name" ), &propValue );
135 propValue.Trim(
false );
138 if(
FindNode( lNode, wxT(
"attachedPattern" ) ) )
141 wxT(
"patternName" ) )->GetAttribute( wxT(
"Name" ), &propValue );
142 propValue.Trim(
false );
143 propValue.Trim(
true );
154 lNode =
FindNode( pNode, wxT(
"multiLayer" ) );
158 *aPatGraphRefName = wxEmptyString;
165 if( *aPatGraphRefName == wxEmptyString )
167 if(
FindNode( aNode, wxT(
"patternGraphicsNameRef" ) ) )
170 wxT(
"patternGraphicsNameRef" ) )->GetAttribute( wxT(
"Name" ),
175 if(
FindNode( aNode, wxT(
"patternGraphicsDef" ) ) )
176 lNode =
FindNode( aNode, wxT(
"patternGraphicsDef" ) );
178 lNode =
FindNode( pNode, wxT(
"patternGraphicsDef" ) );
180 if( *aPatGraphRefName == wxEmptyString )
184 result =
FindNode( lNode, wxT(
"multiLayer" ) );
191 if( lNode->GetName() == wxT(
"patternGraphicsDef" ) )
194 wxT(
"patternGraphicsNameDef" ) )->GetAttribute( wxT(
"Name" ),
197 if( propValue == *aPatGraphRefName )
199 result =
FindNode( lNode, wxT(
"multiLayer" ) );
219 PCAD_COMPONENTS_ARRAY* aList, wxStatusBar* aStatusBar,
220 const wxString& aDefaultMeasurementUnit,
221 const wxString& aActualConversion )
229 VERTICES_ARRAY* plane_layer_polygon;
242 if(
FindNode( aNode, wxT(
"layerNumRef" ) ) )
243 FindNode( aNode, wxT(
"layerNumRef" ) )->GetNodeContent().ToLong( &num );
245 PCadLayer = (int) num;
252 aList->Add( plane_layer );
266 if( lNode->GetName() == wxT(
"line" ) )
269 line->
Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
273 if( lNode->GetName() == wxT(
"text" ) )
276 text->Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
281 if( lNode->GetName() == wxT(
"attr" ) )
284 lNode->GetAttribute( wxT(
"Name" ), &propValue );
285 propValue.Trim(
false );
286 propValue.Trim(
true );
288 if( propValue == wxT(
"RefDes" ) )
290 tNode =
FindNode( lNode, wxT(
"textStyleRef" ) );
292 if( tNode && aFootprint )
308 if( lNode->GetName() == wxT(
"arc" ) || lNode->GetName() == wxT(
"triplePointArc" ) )
311 arc->
Parse( lNode, PCadLayer, aDefaultMeasurementUnit, aActualConversion );
315 if( lNode->GetName() == wxT(
"pcbPoly" ) )
319 plane_layer_polygon =
new VERTICES_ARRAY;
320 plane_layer->
FormPolygon( lNode, plane_layer_polygon, aDefaultMeasurementUnit,
322 plane_layer->
m_Cutouts.Add( plane_layer_polygon );
328 if( polygon->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
329 aList->Add( polygon );
335 if( lNode->GetName() == wxT(
"copperPour95" ) )
339 if( copperPour->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
340 aList->Add( copperPour );
345 if( lNode->GetName() == wxT(
"polyCutOut" ) )
349 if( cutout->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
350 aList->Add( cutout );
355 if( lNode->GetName() == wxT(
"planeObj" ) )
359 if( plane->
Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
389 const wxString& aDefaultMeasurementUnit,
390 const wxString& aActualConversion )
392 XNODE* lNode, * tNode, * mNode;
395 wxString propValue, str;
397 FindNode( aNode, wxT(
"originalName" ) )->GetAttribute( wxT(
"Name" ), &propValue );
398 propValue.Trim(
false );
412 if( tNode->GetName() == wxT(
"pad" ) )
415 pad->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
419 if( tNode->GetName() == wxT(
"via" ) )
422 via->Parse( tNode, aDefaultMeasurementUnit, aActualConversion );
433 lNode =
FindNode( lNode, wxT(
"layerContents" ) );
437 if( lNode->GetName() == wxT(
"layerContents" ) )
439 aDefaultMeasurementUnit, aActualConversion );
453 if( mNode->GetName() == wxT(
"padNum" ) )
455 str = mNode->GetNodeContent();
461 mNode->GetAttribute( wxT(
"Name" ), &propValue );
482 wxCHECK( aFootprint ==
nullptr, );
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
void SetFPRelativePosition(const VECTOR2I &aPos)
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.
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayer) const
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)
Set the text to be italic - this will also update the font if needed.
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
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)
PCAD_CALLBACKS * m_callbacks
wxString m_PatGraphRefName
PCB_LAYER_ID m_KiCadLayer
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion) override
void SetOutline(VERTICES_ARRAY *aOutline)
virtual bool Parse(XNODE *aNode, const wxString &aDefaultUnits, const wxString &aActualConversion)
void FormPolygon(XNODE *aNode, VERTICES_ARRAY *aPolygon, const wxString &aDefaultUnits, const wxString &actualConversion)
void AssignNet(const wxString &aNetName)
Hold an XML or S-expression element.
XNODE * GetParent() const
XNODE * GetChildren() const
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)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
VECTOR2< int32_t > VECTOR2I