215
fn.SetName( fn.GetName() + wxT( "_" ) + wxT("all") );
215
fn.SetName( fn.GetName() + wxT( "-" ) + wxT("all") );
218
fn.SetName( fn.GetName() + wxT( "_" ) + frontLayerName );
218
fn.SetName( fn.GetName() + wxT( "-" ) + frontLayerName );
220
220
fn.SetExt( FootprintPlaceFileExtension );
253
253
fn = screen->GetFileName();
254
254
fn.SetPath( GetOutputDirectory() );
255
fn.SetName( fn.GetName() + wxT( "_" ) + backLayerName );
255
fn.SetName( fn.GetName() + wxT( "-" ) + backLayerName );
256
256
fn.SetExt( wxT( "pos" ) );
258
258
fpcount = m_parent->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(),
288
288
// Defined values to write coordinates using inches or mm:
289
static const double conv_unit_inch = 0.0001; // units = INCHES
289
static const double conv_unit_inch = 0.001 / IU_PER_MILS ; // units = INCHES
290
290
static const char unit_text_inch[] = "## Unit = inches, Angle = deg.\n";
292
static const double conv_unit_mm = 0.00254; // units = mm
292
static const double conv_unit_mm = 1.0 / IU_PER_MM; // units = mm
293
293
static const char unit_text_mm[] = "## Unit = mm, Angle = deg.\n";
295
295
static wxPoint File_Place_Offset; // Offset coordinates for generated file.
451
451
fputs( line, file );
454
"# Ref Val PosX PosY Rot Side\n" );
454
"# Ref Val Package PosX PosY Rot Side\n" );
455
455
fputs( line, file );
457
457
for( int ii = 0; ii < moduleCount; ii++ )
459
459
wxPoint module_pos;
460
wxString ref = list[ii].m_Reference;
461
wxString val = list[ii].m_Value;
462
sprintf( line, "%-8.8s %-16.16s ", TO_UTF8( ref ), TO_UTF8( val ) );
460
const wxString& ref = list[ii].m_Reference;
461
const wxString& val = list[ii].m_Value;
462
const wxString& pkg = list[ii].m_Module->m_LibRef;
463
sprintf( line, "%-8.8s %-16.16s %-16.16s",
464
TO_UTF8( ref ), TO_UTF8( val ), TO_UTF8( pkg ) );
464
466
module_pos = list[ii].m_Module->m_Pos;
465
467
module_pos -= File_Place_Offset;
467
469
char* text = line + strlen( line );
470
/* Keep the coordinates in the first quadrant, like the gerbers
471
* (i.e. change sign to y) */
468
472
sprintf( text, " %9.4f %9.4f %8.1f ",
469
473
module_pos.x * conv_unit,
470
module_pos.y * conv_unit,
474
-module_pos.y * conv_unit,
471
475
double(list[ii].m_Module->m_Orient) / 10 );
473
477
int layer = list[ii].m_Module->GetLayer();