KiCad PCB EDA Suite
GBR_TO_PCB_EXPORTER Class Reference

Public Member Functions

 GBR_TO_PCB_EXPORTER (GERBVIEW_FRAME *aFrame, const wxString &aFileName)
 
 ~GBR_TO_PCB_EXPORTER ()
 
bool ExportPcb (LAYER_NUM *aLayerLookUpTable, int aCopperLayers)
 Function ExportPcb saves a board from a set of Gerber images. More...
 

Private Member Functions

void export_non_copper_item (GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
 Function export_non_copper_item write a non copper line or arc to the board file. More...
 
void export_copper_item (GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
 Function export_copper_item write a track or via) to the board file. More...
 
void export_flashed_copper_item (GERBER_DRAW_ITEM *aGbrItem)
 Function export_flashed_copper_item write a via to the board file (always uses a via through). More...
 
void export_segline_copper_item (GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
 Function export_segline_copper_item write a track (not via) to the board file. More...
 
void export_segarc_copper_item (GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
 Function export_segarc_copper_item write a set of tracks (arcs are approximated by track segments) to the board file. More...
 
void writePcbLineItem (bool aIsArc, wxPoint &aStart, wxPoint &aEnd, int aWidth, LAYER_NUM aLayer, double aAngle=0)
 function writePcbLineItem basic write function to write a DRAWSEGMENT item or a TRACK item to the board file, from a non flashed item More...
 
void writeCopperLineItem (wxPoint &aStart, wxPoint &aEnd, int aWidth, LAYER_NUM aLayer)
 function writeCopperLineItem basic write function to write a a TRACK item to the board file, from a non flashed item More...
 
void writePcbHeader (LAYER_NUM *aLayerLookUpTable)
 function writePcbHeader Write a very basic header to the board file More...
 

Private Attributes

GERBVIEW_FRAMEm_gerbview_frame
 
wxString m_pcb_file_name
 
FILE * m_fp
 
int m_pcbCopperLayersCount
 
std::vector< wxPointm_vias_coordinates
 

Detailed Description

Definition at line 53 of file export_to_pcbnew.cpp.

Constructor & Destructor Documentation

GBR_TO_PCB_EXPORTER::GBR_TO_PCB_EXPORTER ( GERBVIEW_FRAME aFrame,
const wxString &  aFileName 
)

Definition at line 138 of file export_to_pcbnew.cpp.

References m_fp, m_gerbview_frame, m_pcb_file_name, and m_pcbCopperLayersCount.

139 {
140  m_gerbview_frame = aFrame;
141  m_pcb_file_name = aFileName;
142  m_fp = NULL;
144 }
GERBVIEW_FRAME * m_gerbview_frame
GBR_TO_PCB_EXPORTER::~GBR_TO_PCB_EXPORTER ( )

Definition at line 147 of file export_to_pcbnew.cpp.

148 {
149 }

Member Function Documentation

void GBR_TO_PCB_EXPORTER::export_copper_item ( GERBER_DRAW_ITEM aGbrItem,
LAYER_NUM  aLayer 
)
private

Function export_copper_item write a track or via) to the board file.

Parameters
aGbrItem= the Gerber item (line, arc, flashed) to export
aLayer= the copper layer to use

Definition at line 307 of file export_to_pcbnew.cpp.

References export_flashed_copper_item(), export_segarc_copper_item(), export_segline_copper_item(), GBR_ARC, GBR_SPOT_CIRCLE, GBR_SPOT_OVAL, GBR_SPOT_RECT, and GERBER_DRAW_ITEM::m_Shape.

Referenced by ExportPcb().

308 {
309  switch( aGbrItem->m_Shape )
310  {
311  case GBR_SPOT_CIRCLE:
312  case GBR_SPOT_RECT:
313  case GBR_SPOT_OVAL:
314  // replace spots with vias when possible
315  export_flashed_copper_item( aGbrItem );
316  break;
317 
318  case GBR_ARC:
319  export_segarc_copper_item( aGbrItem, aLayer );
320  break;
321 
322  default:
323  export_segline_copper_item( aGbrItem, aLayer );
324  break;
325  }
326 }
void export_segline_copper_item(GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
Function export_segline_copper_item write a track (not via) to the board file.
void export_flashed_copper_item(GERBER_DRAW_ITEM *aGbrItem)
Function export_flashed_copper_item write a via to the board file (always uses a via through)...
void export_segarc_copper_item(GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
Function export_segarc_copper_item write a set of tracks (arcs are approximated by track segments) to...
void GBR_TO_PCB_EXPORTER::export_flashed_copper_item ( GERBER_DRAW_ITEM aGbrItem)
private

Function export_flashed_copper_item write a via to the board file (always uses a via through).

Parameters
aGbrItem= the flashed Gerber item to export

Definition at line 415 of file export_to_pcbnew.cpp.

References B_Cu, Double2Str(), F_Cu, GetPCBDefaultLayerName(), m_fp, GERBER_DRAW_ITEM::m_Size, GERBER_DRAW_ITEM::m_Start, m_vias_coordinates, TO_PCB_UNIT, TO_UTF8, wxPoint::x, and wxPoint::y.

Referenced by export_copper_item().

416 {
417  // First, explore already created vias, before creating a new via
418  for( unsigned ii = 0; ii < m_vias_coordinates.size(); ii++ )
419  {
420  if( m_vias_coordinates[ii] == aGbrItem->m_Start ) // Already created
421  return;
422  }
423 
424  m_vias_coordinates.push_back( aGbrItem->m_Start );
425 
426  wxPoint via_pos = aGbrItem->m_Start;
427  int width = (aGbrItem->m_Size.x + aGbrItem->m_Size.y) / 2;
428  // Reverse Y axis:
429  via_pos.y = -via_pos.y;
430 
431  // Layers are Front to Back
432  fprintf( m_fp, " (via (at %s %s) (size %s)",
433  Double2Str( TO_PCB_UNIT(via_pos.x) ).c_str(),
434  Double2Str( TO_PCB_UNIT(via_pos.y) ).c_str(),
435  Double2Str( TO_PCB_UNIT( width ) ).c_str() );
436 
437  fprintf( m_fp, " (layers %s %s))\n",
440 }
#define TO_PCB_UNIT(x)
std::string Double2Str(double aValue)
Helper function Double2Str to print a float number without using scientific notation and no trailing ...
Definition: base_units.cpp:61
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
std::vector< wxPoint > m_vias_coordinates
const wxString GetPCBDefaultLayerName(LAYER_NUM aLayerNumber)
void GBR_TO_PCB_EXPORTER::export_non_copper_item ( GERBER_DRAW_ITEM aGbrItem,
LAYER_NUM  aLayer 
)
private

Function export_non_copper_item write a non copper line or arc to the board file.

Parameters
aGbrItem= the Gerber item (line, arc) to export
aLayer= the technical layer to use

Definition at line 276 of file export_to_pcbnew.cpp.

References PNS::angle(), GBR_ARC, GERBER_DRAW_ITEM::m_ArcCentre, GERBER_DRAW_ITEM::m_End, GERBER_DRAW_ITEM::m_Shape, GERBER_DRAW_ITEM::m_Size, GERBER_DRAW_ITEM::m_Start, RAD2DEG(), writePcbLineItem(), wxPoint::x, and wxPoint::y.

Referenced by ExportPcb().

277 {
278  bool isArc = false;
279 
280  double angle = 0;
281  wxPoint seg_start = aGbrItem->m_Start;
282  wxPoint seg_end = aGbrItem->m_End;
283 
284  if( aGbrItem->m_Shape == GBR_ARC )
285  {
286  double a = atan2( (double) ( aGbrItem->m_Start.y - aGbrItem->m_ArcCentre.y),
287  (double) ( aGbrItem->m_Start.x - aGbrItem->m_ArcCentre.x ) );
288  double b = atan2( (double) ( aGbrItem->m_End.y - aGbrItem->m_ArcCentre.y ),
289  (double) ( aGbrItem->m_End.x - aGbrItem->m_ArcCentre.x ) );
290 
291  isArc = true;
292  angle = RAD2DEG(b - a);
293  seg_start = aGbrItem->m_ArcCentre;
294 
295  // Ensure arc orientation is CCW
296  if( angle < 0 )
297  angle += 360.0;
298  }
299 
300  // Reverse Y axis:
301  seg_start.y = -seg_start.y;
302  seg_end.y = -seg_end.y;
303  writePcbLineItem( isArc, seg_start, seg_end, aGbrItem->m_Size.x, aLayer, angle );
304 }
void writePcbLineItem(bool aIsArc, wxPoint &aStart, wxPoint &aEnd, int aWidth, LAYER_NUM aLayer, double aAngle=0)
function writePcbLineItem basic write function to write a DRAWSEGMENT item or a TRACK item to the boa...
double RAD2DEG(double rad)
Definition: trigo.h:200
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
void GBR_TO_PCB_EXPORTER::export_segarc_copper_item ( GERBER_DRAW_ITEM aGbrItem,
LAYER_NUM  aLayer 
)
private

Function export_segarc_copper_item write a set of tracks (arcs are approximated by track segments) to the board file.

Parameters
aGbrItem= the Gerber item (arc only) to export
aLayer= the copper layer to use

Definition at line 357 of file export_to_pcbnew.cpp.

References DELTA_ANGLE, GERBER_DRAW_ITEM::m_ArcCentre, GERBER_DRAW_ITEM::m_End, GERBER_DRAW_ITEM::m_Size, GERBER_DRAW_ITEM::m_Start, RAD2DECIDEG(), RotatePoint(), writeCopperLineItem(), wxPoint::x, and wxPoint::y.

Referenced by export_copper_item().

358 {
359  double a = atan2( (double) ( aGbrItem->m_Start.y - aGbrItem->m_ArcCentre.y ),
360  (double) ( aGbrItem->m_Start.x - aGbrItem->m_ArcCentre.x ) );
361  double b = atan2( (double) ( aGbrItem->m_End.y - aGbrItem->m_ArcCentre.y ),
362  (double) ( aGbrItem->m_End.x - aGbrItem->m_ArcCentre.x ) );
363 
364  wxPoint start = aGbrItem->m_Start;
365  wxPoint end = aGbrItem->m_End;
366 
367  /* Because Pcbnew does not know arcs in tracks,
368  * approximate arc by segments (SEG_COUNT__CIRCLE segment per 360 deg)
369  * The arc is drawn anticlockwise from the start point to the end point.
370  */
371  #define SEG_COUNT_CIRCLE 16
372  #define DELTA_ANGLE 2 * M_PI / SEG_COUNT_CIRCLE
373 
374  // calculate the number of segments from a to b.
375  // we want CNT_PER_360 segments fo a circle
376  if( a > b )
377  b += 2 * M_PI;
378 
379  wxPoint curr_start = start;
380  wxPoint seg_start, seg_end;
381 
382  int ii = 1;
383 
384  for( double rot = a; rot < (b - DELTA_ANGLE); rot += DELTA_ANGLE, ii++ )
385  {
386  seg_start = curr_start;
387  wxPoint curr_end = start;
388  RotatePoint( &curr_end, aGbrItem->m_ArcCentre,
389  -RAD2DECIDEG( DELTA_ANGLE * ii ) );
390  seg_end = curr_end;
391  // Reverse Y axis:
392  seg_start.y = -seg_start.y;
393  seg_end.y = -seg_end.y;
394  writeCopperLineItem( seg_start, seg_end, aGbrItem->m_Size.x, aLayer );
395  curr_start = curr_end;
396  }
397 
398  if( end != curr_start )
399  {
400  seg_start = curr_start;
401  seg_end = end;
402  // Reverse Y axis:
403  seg_start.y = -seg_start.y;
404  seg_end.y = -seg_end.y;
405  writeCopperLineItem( seg_start, seg_end, aGbrItem->m_Size.x, aLayer );
406  }
407 }
double RAD2DECIDEG(double rad)
Definition: trigo.h:204
#define DELTA_ANGLE
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:317
void writeCopperLineItem(wxPoint &aStart, wxPoint &aEnd, int aWidth, LAYER_NUM aLayer)
function writeCopperLineItem basic write function to write a a TRACK item to the board file...
void GBR_TO_PCB_EXPORTER::export_segline_copper_item ( GERBER_DRAW_ITEM aGbrItem,
LAYER_NUM  aLayer 
)
private

Function export_segline_copper_item write a track (not via) to the board file.

Parameters
aGbrItem= the Gerber item (line only) to export
aLayer= the copper layer to use

Definition at line 329 of file export_to_pcbnew.cpp.

References GERBER_DRAW_ITEM::m_End, GERBER_DRAW_ITEM::m_Size, GERBER_DRAW_ITEM::m_Start, writeCopperLineItem(), and wxPoint::y.

Referenced by export_copper_item().

330 {
331  wxPoint seg_start, seg_end;
332 
333  seg_start = aGbrItem->m_Start;
334  seg_end = aGbrItem->m_End;
335 
336  // Reverse Y axis:
337  seg_start.y = -seg_start.y;
338  seg_end.y = -seg_end.y;
339 
340  writeCopperLineItem( seg_start, seg_end, aGbrItem->m_Size.x, aLayer );
341 }
void writeCopperLineItem(wxPoint &aStart, wxPoint &aEnd, int aWidth, LAYER_NUM aLayer)
function writeCopperLineItem basic write function to write a a TRACK item to the board file...
bool GBR_TO_PCB_EXPORTER::ExportPcb ( LAYER_NUM aLayerLookUpTable,
int  aCopperLayers 
)

Function ExportPcb saves a board from a set of Gerber images.

Definition at line 205 of file export_to_pcbnew.cpp.

References DisplayError(), export_copper_item(), export_non_copper_item(), GetChars(), GERBER_FILE_IMAGE_LIST::GetGbrImage(), GERBVIEW_FRAME::GetGerberLayout(), GBR_LAYOUT::GetImagesList(), GERBER_FILE_IMAGE::GetItemsList(), GERBER_FILE_IMAGE_LIST::ImagesMaxCount(), IsPcbLayer(), m_fp, m_gerbview_frame, m_pcb_file_name, m_pcbCopperLayersCount, GERBER_DRAW_ITEM::Next(), and writePcbHeader().

Referenced by GERBVIEW_FRAME::ExportDataInPcbnewFormat().

206 {
207  LOCALE_IO toggle; // toggles on, then off, the C locale.
208 
209  m_fp = wxFopen( m_pcb_file_name, wxT( "wt" ) );
210 
211  if( m_fp == NULL )
212  {
213  wxString msg;
214  msg.Printf( _( "Cannot create file '%s'" ), GetChars( m_pcb_file_name ) );
216  return false;
217  }
218 
219  m_pcbCopperLayersCount = aCopperLayers;
220 
221  writePcbHeader( aLayerLookUpTable );
222 
223  // create an image of gerber data
224  // First: non copper layers:
225  const int pcbCopperLayerMax = 31;
227 
228  for( unsigned layer = 0; layer < images->ImagesMaxCount(); ++layer )
229  {
230  GERBER_FILE_IMAGE* gerber = images->GetGbrImage( layer );
231 
232  if( gerber == NULL ) // Graphic layer not yet used
233  continue;
234 
235  LAYER_NUM pcb_layer_number = aLayerLookUpTable[layer];
236 
237  if( !IsPcbLayer( pcb_layer_number ) )
238  continue;
239 
240  if( pcb_layer_number <= pcbCopperLayerMax ) // copper layer
241  continue;
242 
243  GERBER_DRAW_ITEM* gerb_item = gerber->GetItemsList();
244 
245  for( ; gerb_item; gerb_item = gerb_item->Next() )
246  export_non_copper_item( gerb_item, pcb_layer_number );
247  }
248 
249  // Copper layers
250  for( unsigned layer = 0; layer < images->ImagesMaxCount(); ++layer )
251  {
252  GERBER_FILE_IMAGE* gerber = images->GetGbrImage( layer );
253 
254  if( gerber == NULL ) // Graphic layer not yet used
255  continue;
256 
257  LAYER_NUM pcb_layer_number = aLayerLookUpTable[layer];
258 
259  if( pcb_layer_number < 0 || pcb_layer_number > pcbCopperLayerMax )
260  continue;
261 
262  GERBER_DRAW_ITEM* gerb_item = gerber->GetItemsList();
263 
264  for( ; gerb_item; gerb_item = gerb_item->Next() )
265  export_copper_item( gerb_item, pcb_layer_number );
266  }
267 
268  fprintf( m_fp, ")\n" );
269 
270  fclose( m_fp );
271  m_fp = NULL;
272  return true;
273 }
Class LOCALE_IO is a class that can be instantiated within a scope in which you are expecting excepti...
Definition: common.h:166
Class GERBER_FILE_IMAGE holds the Image data and parameters for one gerber file and layer parameters ...
void export_non_copper_item(GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
Function export_non_copper_item write a non copper line or arc to the board file. ...
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
GERBER_DRAW_ITEM * Next() const
GERBVIEW_FRAME * m_gerbview_frame
GBR_LAYOUT * GetGerberLayout() const
int LAYER_NUM
Type LAYER_NUM can be replaced with int and removed.
void export_copper_item(GERBER_DRAW_ITEM *aGbrItem, LAYER_NUM aLayer)
Function export_copper_item write a track or via) to the board file.
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
GERBER_DRAW_ITEM * GetItemsList()
Function GetItemsList.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
bool IsPcbLayer(LAYER_NUM aLayer)
Function IsPcbLayer tests whether a layer is a valid layer for pcbnew.
void DisplayError(wxWindow *parent, const wxString &text, int displaytime)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
void writePcbHeader(LAYER_NUM *aLayerLookUpTable)
function writePcbHeader Write a very basic header to the board file
void GBR_TO_PCB_EXPORTER::writeCopperLineItem ( wxPoint aStart,
wxPoint aEnd,
int  aWidth,
LAYER_NUM  aLayer 
)
private

function writeCopperLineItem basic write function to write a a TRACK item to the board file, from a non flashed item

Definition at line 344 of file export_to_pcbnew.cpp.

References Double2Str(), GetPCBDefaultLayerName(), m_fp, TO_PCB_UNIT, TO_UTF8, wxPoint::x, and wxPoint::y.

Referenced by export_segarc_copper_item(), and export_segline_copper_item().

346 {
347  fprintf( m_fp, "(segment (start %s %s) (end %s %s) (width %s) (layer %s) (net 0))\n",
348  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
349  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
350  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
351  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
352  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str(),
353  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ) );
354 }
#define TO_PCB_UNIT(x)
std::string Double2Str(double aValue)
Helper function Double2Str to print a float number without using scientific notation and no trailing ...
Definition: base_units.cpp:61
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
const wxString GetPCBDefaultLayerName(LAYER_NUM aLayerNumber)
void GBR_TO_PCB_EXPORTER::writePcbHeader ( LAYER_NUM aLayerLookUpTable)
private

function writePcbHeader Write a very basic header to the board file

Definition at line 442 of file export_to_pcbnew.cpp.

References B_Adhes, B_Cu, GetBuildVersion(), GetPCBDefaultLayerName(), m_fp, m_pcbCopperLayersCount, PCB_LAYER_ID_COUNT, and TO_UTF8.

Referenced by ExportPcb().

443 {
444  fprintf( m_fp, "(kicad_pcb (version 4) (host Gerbview \"%s\")\n\n",
445  TO_UTF8( GetBuildVersion() ) );
446 
447  // Write layers section
448  fprintf( m_fp, " (layers \n" );
449 
450  for( int ii = 0; ii < m_pcbCopperLayersCount; ii++ )
451  {
452  int id = ii;
453 
454  if( ii == m_pcbCopperLayersCount-1)
455  id = B_Cu;
456 
457  fprintf( m_fp, " (%d %s signal)\n", id, TO_UTF8( GetPCBDefaultLayerName( id ) ) );
458  }
459 
460  for( int ii = B_Adhes; ii < PCB_LAYER_ID_COUNT; ii++ )
461  {
462  fprintf( m_fp, " (%d %s user)\n", ii, TO_UTF8( GetPCBDefaultLayerName( ii ) ) );
463  }
464 
465  fprintf( m_fp, " )\n\n" );
466 }
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
wxString GetBuildVersion()
Function GetBuildVersion Return the build version string.
const wxString GetPCBDefaultLayerName(LAYER_NUM aLayerNumber)
void GBR_TO_PCB_EXPORTER::writePcbLineItem ( bool  aIsArc,
wxPoint aStart,
wxPoint aEnd,
int  aWidth,
LAYER_NUM  aLayer,
double  aAngle = 0 
)
private

function writePcbLineItem basic write function to write a DRAWSEGMENT item or a TRACK item to the board file, from a non flashed item

Definition at line 469 of file export_to_pcbnew.cpp.

References Double2Str(), GetPCBDefaultLayerName(), m_fp, TO_PCB_UNIT, TO_UTF8, wxPoint::x, and wxPoint::y.

Referenced by export_non_copper_item().

471 {
472  if( aIsArc && ( aAngle == 360.0 || aAngle == 0 ) )
473  {
474  fprintf( m_fp, "(gr_circle (center %s %s) (end %s %s)(layer %s) (width %s))\n",
475  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
476  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
477  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
478  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
479  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ),
480  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str()
481  );
482  }
483  else if( aIsArc )
484  {
485  fprintf( m_fp, "(gr_arc (start %s %s) (end %s %s) (angle %s)(layer %s) (width %s))\n",
486  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
487  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
488  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
489  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
490  Double2Str( aAngle ).c_str(),
491  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ),
492  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str()
493  );
494  }
495  else
496  {
497  fprintf( m_fp, "(gr_line (start %s %s) (end %s %s)(layer %s) (width %s))\n",
498  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
499  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
500  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
501  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
502  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ),
503  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str()
504  );
505  }
506 }
#define TO_PCB_UNIT(x)
std::string Double2Str(double aValue)
Helper function Double2Str to print a float number without using scientific notation and no trailing ...
Definition: base_units.cpp:61
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
const wxString GetPCBDefaultLayerName(LAYER_NUM aLayerNumber)

Member Data Documentation

FILE* GBR_TO_PCB_EXPORTER::m_fp
private
GERBVIEW_FRAME* GBR_TO_PCB_EXPORTER::m_gerbview_frame
private

Definition at line 56 of file export_to_pcbnew.cpp.

Referenced by ExportPcb(), and GBR_TO_PCB_EXPORTER().

wxString GBR_TO_PCB_EXPORTER::m_pcb_file_name
private

Definition at line 57 of file export_to_pcbnew.cpp.

Referenced by ExportPcb(), and GBR_TO_PCB_EXPORTER().

int GBR_TO_PCB_EXPORTER::m_pcbCopperLayersCount
private

Definition at line 59 of file export_to_pcbnew.cpp.

Referenced by ExportPcb(), GBR_TO_PCB_EXPORTER(), and writePcbHeader().

std::vector<wxPoint> GBR_TO_PCB_EXPORTER::m_vias_coordinates
private

Definition at line 60 of file export_to_pcbnew.cpp.

Referenced by export_flashed_copper_item().


The documentation for this class was generated from the following file: