← Back to team overview

kicad-developers team mailing list archive

[PATCH] pcbnew export position file

 

Hello,

I found small problem when generating position file. It was good before complete library name was used. It is shorted, and it is mainly impossible to understand which package has any footprint - there is mainly only part of library name. for example:

# Ref    Val                  Package PosX       PosY        Rot     Side
C5 1u Capacitor-sm_cap -0.1800 -1.2100 270.0 F.Cu C8 100u/6.3VB Capacitor-sm_cap -0.1800 -1.0300 180.0 F.Cu C9 100n Capacitor-sm_cap -0.1000 0.2150 180.0 F.Cu C12 100n Capacitor-sm_cap -0.0250 0.9550 0.0 F.Cu C13 100n Capacitor-sm_cap 0.3200 0.8050 90.0 F.Cu C14 100n Capacitor-sm_cap 0.4700 0.5100 270.0 F.Cu C16 100n Capacitor-sm_cap -0.4600 1.2600 0.0 F.Cu C17 T22u/10V Capacitor-sm_cap 0.1000 0.2400 0.0 F.Cu C18 1u Capacitor-sm_cap -0.1250 1.0600 180.0 F.Cu C19 100n Capacitor-sm_cap -0.4500 -0.8150 180.0 F.Cu Q1 IRLML0030 libcms:SOT23GDS 0.0950 -0.6950 180.0 F.Cu U1 LP2951 Vlastni-SM-IC:SO -0.4000 -1.2100 90.0 F.Cu

So after patch is visible only package, without library (I think that for machine component placing is library name not important).

# Ref    Val                  Package PosX       PosY        Rot     Side
C5 1u c_1206 -0.1800 -1.2100 270.0 F.Cu C8 100u/6.3VB c_tant_B -0.1800 -1.0300 180.0 F.Cu C9 100n c_0805 -0.1000 0.2150 180.0 F.Cu C12 100n c_0805 -0.0250 0.9550 0.0 F.Cu C13 100n c_0805 0.3200 0.8050 90.0 F.Cu C14 100n c_0805 0.4700 0.5100 270.0 F.Cu C16 100n c_0805 -0.4600 1.2600 0.0 F.Cu C17 T22u/10V c_tant_B 0.1000 0.2400 0.0 F.Cu C18 1u c_1206 -0.1250 1.0600 180.0 F.Cu C19 100n c_0805 -0.4500 -0.8150 180.0 F.Cu Q1 IRLML0030 SOT23GDS 0.0950 -0.6950 180.0 F.Cu U1 LP2951 SOG8 -0.4000 -1.2100 90.0 F.Cu

Michal Jahelka
=== modified file 'pcbnew/exporters/gen_modules_placefile.cpp'
--- pcbnew/exporters/gen_modules_placefile.cpp	2014-10-26 13:59:01 +0000
+++ pcbnew/exporters/gen_modules_placefile.cpp	2014-10-29 08:58:24 +0000
@@ -493,7 +493,7 @@
 
         const wxString& ref = list[ii].m_Reference;
         const wxString& val = list[ii].m_Value;
-        const wxString& pkg = list[ii].m_Module->GetFPID().Format();
+        const wxString& pkg = list[ii].m_Module->GetFPID().GetFootprintName();
 
         sprintf( line, "%-8.8s %-16.16s %-16.16s",
                  TO_UTF8( ref ), TO_UTF8( val ), TO_UTF8( pkg ) );


Follow ups