diff --git a/utils/kicad2step/pcb/kicadfootprint.cpp b/utils/kicad2step/pcb/kicadfootprint.cpp index 0feaa2ec6a..fce0ddf0ca 100644 --- a/utils/kicad2step/pcb/kicadfootprint.cpp +++ b/utils/kicad2step/pcb/kicadfootprint.cpp @@ -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; diff --git a/utils/kicad2step/pcb/kicadfootprint.h b/utils/kicad2step/pcb/kicadfootprint.h index 6687b08669..e0810f9c20 100644 --- a/utils/kicad2step/pcb/kicadfootprint.h +++ b/utils/kicad2step/pcb/kicadfootprint.h @@ -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;