kicad2step: fix "ignore virtual components" option
There isn't a "virtual" attribute any more, virtual components are now saved without the "smd" and "through_hole" attributes.
This commit is contained in:
parent
c8b2e69332
commit
58dceb143f
|
@ -46,6 +46,8 @@ KICADFOOTPRINT::KICADFOOTPRINT( KICADPCB* aParent )
|
|||
m_parent = aParent;
|
||||
m_side = LAYER_NONE;
|
||||
m_rotation = 0.0;
|
||||
m_smd = false;
|
||||
m_tht = false;
|
||||
m_virtual = false;
|
||||
|
||||
return;
|
||||
|
@ -143,6 +145,9 @@ bool KICADFOOTPRINT::Read( SEXPR::SEXPR* aEntry )
|
|||
result = parseModel( child );
|
||||
}
|
||||
|
||||
if( !m_smd && !m_tht )
|
||||
m_virtual = true;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -281,7 +286,11 @@ bool KICADFOOTPRINT::parseAttribute( SEXPR::SEXPR* data )
|
|||
else if( child->IsString() )
|
||||
text = child->GetString();
|
||||
|
||||
if( text == "virtual" )
|
||||
if( text == "smd" )
|
||||
m_smd = true;
|
||||
else if( text == "through_hole" )
|
||||
m_tht = true;
|
||||
else if( text == "virtual" )
|
||||
m_virtual = true;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -69,6 +69,8 @@ private:
|
|||
std::string m_refdes;
|
||||
DOUBLET m_position;
|
||||
double m_rotation; // rotation (radians)
|
||||
bool m_smd; // true for a SMD component
|
||||
bool m_tht; // true for a through-hole component
|
||||
bool m_virtual; // true for a virtual (usually mechanical) component
|
||||
|
||||
std::vector< KICADPAD* > m_pads;
|
||||
|
|
Loading…
Reference in New Issue