Fix discrepancy between ASCII and CSV fp pos files

Fixes https://gitlab.com/kicad/code/kicad/issues/3897
This commit is contained in:
Michael Kavanagh 2020-03-29 14:07:53 +01:00 committed by Ian McInerney
parent 9d2712a824
commit 570ea62b64
3 changed files with 7 additions and 4 deletions

View File

@ -186,6 +186,9 @@ std::string PLACE_FILE_EXPORTER::GenPositionData()
LAYER_NUM layer = list[ii].m_Module->GetLayer();
wxASSERT( layer == F_Cu || layer == B_Cu );
if( layer == B_Cu )
footprint_pos.x = - footprint_pos.x;
wxString tmp = "\"" + list[ii].m_Reference;
tmp << "\"" << csv_sep;
tmp << "\"" << list[ii].m_Value;

View File

@ -477,7 +477,7 @@ int PCB_EDITOR_CONTROL::GeneratePosFile( const TOOL_EVENT& aEvent )
int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
bool aForceSmdItems, bool aTopSide, bool BottomSide, bool aFormatCSV )
bool aForceSmdItems, bool aTopSide, bool aBottomSide, bool aFormatCSV )
{
FILE * file = NULL;
@ -491,7 +491,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
std::string data;
PLACE_FILE_EXPORTER exporter( GetBoard(), aUnitsMM, aForceSmdItems,
aTopSide, BottomSide, aFormatCSV );
aTopSide, aBottomSide, aFormatCSV );
data = exporter.GenPositionData();
// if aFullFileName is empty, the file is not created, only the

View File

@ -559,14 +559,14 @@ public:
* @param aForceSmdItems = true to force all footprints with smd pads in list
* = false to put only footprints with option "INSERT" in list
* @param aTopSide true to list footprints on front (top) side,
* @param BottomSide true to list footprints on back (bottom) side,
* @param aBottomSide true to list footprints on back (bottom) side,
* if aTopSide and aTopSide are true, list footprints on both sides
* @param aFormatCSV = true to use a comma separated file (CSV) format; defautl = false
* @return the number of footprints found on aSide side,
* or -1 if the file could not be created
*/
int DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
bool aForceSmdItems, bool aTopSide, bool BottomSide, bool aFormatCSV = false );
bool aForceSmdItems, bool aTopSide, bool aBottomSide, bool aFormatCSV = false );
/**
* Function GenFootprintsReport