From 683be7155e7044f030a12d6cf73d8ab54b6fe38d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 20 Mar 2018 16:55:31 +0000 Subject: [PATCH] Mirror-image coordinate system on back of board for PNP. Also converts any delimiters in tokens to underscores. Fixes: lp:1679205 * https://bugs.launchpad.net/kicad/+bug/1679205 --- pcbnew/exporters/gen_footprints_placefile.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pcbnew/exporters/gen_footprints_placefile.cpp b/pcbnew/exporters/gen_footprints_placefile.cpp index 9c8a7f903b..86829de76f 100644 --- a/pcbnew/exporters/gen_footprints_placefile.cpp +++ b/pcbnew/exporters/gen_footprints_placefile.cpp @@ -584,10 +584,15 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, LAYER_NUM layer = list[ii].m_Module->GetLayer(); wxASSERT( layer == F_Cu || layer == B_Cu ); - const wxString& ref = list[ii].m_Reference; - const wxString& val = list[ii].m_Value; - const wxString& pkg = list[ii].m_Module->GetFPID().GetLibItemName(); + if( layer == B_Cu ) + footprint_pos.x = - footprint_pos.x; + wxString ref = list[ii].m_Reference; + wxString val = list[ii].m_Value; + wxString pkg = list[ii].m_Module->GetFPID().GetLibItemName(); + ref.Replace( wxT( " " ), wxT( "_" ) ); + val.Replace( wxT( " " ), wxT( "_" ) ); + pkg.Replace( wxT( " " ), wxT( "_" ) ); fprintf(file, "%-*s %-*s %-*s %9.4f %9.4f %8.4f %s\n", lenRefText, TO_UTF8( ref ), lenValText, TO_UTF8( val ),