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 306 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().

307 {
308  switch( aGbrItem->m_Shape )
309  {
310  case GBR_SPOT_CIRCLE:
311  case GBR_SPOT_RECT:
312  case GBR_SPOT_OVAL:
313  // replace spots with vias when possible
314  export_flashed_copper_item( aGbrItem );
315  break;
316 
317  case GBR_ARC:
318  export_segarc_copper_item( aGbrItem, aLayer );
319  break;
320 
321  default:
322  export_segline_copper_item( aGbrItem, aLayer );
323  break;
324  }
325 }
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 414 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().

415 {
416  // First, explore already created vias, before creating a new via
417  for( unsigned ii = 0; ii < m_vias_coordinates.size(); ii++ )
418  {
419  if( m_vias_coordinates[ii] == aGbrItem->m_Start ) // Already created
420  return;
421  }
422 
423  m_vias_coordinates.push_back( aGbrItem->m_Start );
424 
425  wxPoint via_pos = aGbrItem->m_Start;
426  int width = (aGbrItem->m_Size.x + aGbrItem->m_Size.y) / 2;
427  // Reverse Y axis:
428  via_pos.y = -via_pos.y;
429 
430  // Layers are Front to Back
431  fprintf( m_fp, " (via (at %s %s) (size %s)",
432  Double2Str( TO_PCB_UNIT(via_pos.x) ).c_str(),
433  Double2Str( TO_PCB_UNIT(via_pos.y) ).c_str(),
434  Double2Str( TO_PCB_UNIT( width ) ).c_str() );
435 
436  fprintf( m_fp, " (layers %s %s))\n",
439 }
#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:60
#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 275 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().

276 {
277  bool isArc = false;
278 
279  double angle = 0;
280  wxPoint seg_start = aGbrItem->m_Start;
281  wxPoint seg_end = aGbrItem->m_End;
282 
283  if( aGbrItem->m_Shape == GBR_ARC )
284  {
285  double a = atan2( (double) ( aGbrItem->m_Start.y - aGbrItem->m_ArcCentre.y),
286  (double) ( aGbrItem->m_Start.x - aGbrItem->m_ArcCentre.x ) );
287  double b = atan2( (double) ( aGbrItem->m_End.y - aGbrItem->m_ArcCentre.y ),
288  (double) ( aGbrItem->m_End.x - aGbrItem->m_ArcCentre.x ) );
289 
290  isArc = true;
291  angle = RAD2DEG(b - a);
292  seg_start = aGbrItem->m_ArcCentre;
293 
294  // Ensure arc orientation is CCW
295  if( angle < 0 )
296  angle += 360.0;
297  }
298 
299  // Reverse Y axis:
300  seg_start.y = -seg_start.y;
301  seg_end.y = -seg_end.y;
302  writePcbLineItem( isArc, seg_start, seg_end, aGbrItem->m_Size.x, aLayer, angle );
303 }
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 356 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().

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

329 {
330  wxPoint seg_start, seg_end;
331 
332  seg_start = aGbrItem->m_Start;
333  seg_end = aGbrItem->m_End;
334 
335  // Reverse Y axis:
336  seg_start.y = -seg_start.y;
337  seg_end.y = -seg_end.y;
338 
339  writeCopperLineItem( seg_start, seg_end, aGbrItem->m_Size.x, aLayer );
340 }
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 204 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().

205 {
206  LOCALE_IO toggle; // toggles on, then off, the C locale.
207 
208  m_fp = wxFopen( m_pcb_file_name, wxT( "wt" ) );
209 
210  if( m_fp == NULL )
211  {
212  wxString msg;
213  msg.Printf( _( "Cannot create file '%s'" ), GetChars( m_pcb_file_name ) );
215  return false;
216  }
217 
218  m_pcbCopperLayersCount = aCopperLayers;
219 
220  writePcbHeader( aLayerLookUpTable );
221 
222  // create an image of gerber data
223  // First: non copper layers:
224  const int pcbCopperLayerMax = 31;
226 
227  for( unsigned layer = 0; layer < images->ImagesMaxCount(); ++layer )
228  {
229  GERBER_FILE_IMAGE* gerber = images->GetGbrImage( layer );
230 
231  if( gerber == NULL ) // Graphic layer not yet used
232  continue;
233 
234  LAYER_NUM pcb_layer_number = aLayerLookUpTable[layer];
235 
236  if( !IsPcbLayer( pcb_layer_number ) )
237  continue;
238 
239  if( pcb_layer_number <= pcbCopperLayerMax ) // copper layer
240  continue;
241 
242  GERBER_DRAW_ITEM* gerb_item = gerber->GetItemsList();
243 
244  for( ; gerb_item; gerb_item = gerb_item->Next() )
245  export_non_copper_item( gerb_item, pcb_layer_number );
246  }
247 
248  // Copper layers
249  for( unsigned layer = 0; layer < images->ImagesMaxCount(); ++layer )
250  {
251  GERBER_FILE_IMAGE* gerber = images->GetGbrImage( layer );
252 
253  if( gerber == NULL ) // Graphic layer not yet used
254  continue;
255 
256  LAYER_NUM pcb_layer_number = aLayerLookUpTable[layer];
257 
258  if( pcb_layer_number < 0 || pcb_layer_number > pcbCopperLayerMax )
259  continue;
260 
261  GERBER_DRAW_ITEM* gerb_item = gerber->GetItemsList();
262 
263  for( ; gerb_item; gerb_item = gerb_item->Next() )
264  export_copper_item( gerb_item, pcb_layer_number );
265  }
266 
267  fprintf( m_fp, ")\n" );
268 
269  fclose( m_fp );
270  m_fp = NULL;
271  return true;
272 }
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:71
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 343 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().

345 {
346  fprintf( m_fp, "(segment (start %s %s) (end %s %s) (width %s) (layer %s) (net 0))\n",
347  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
348  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
349  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
350  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
351  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str(),
352  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ) );
353 }
#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:60
#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 441 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().

442 {
443  fprintf( m_fp, "(kicad_pcb (version 4) (host Gerbview \"%s\")\n\n",
444  TO_UTF8( GetBuildVersion() ) );
445 
446  // Write layers section
447  fprintf( m_fp, " (layers \n" );
448 
449  for( int ii = 0; ii < m_pcbCopperLayersCount; ii++ )
450  {
451  int id = ii;
452 
453  if( ii == m_pcbCopperLayersCount-1)
454  id = B_Cu;
455 
456  fprintf( m_fp, " (%d %s signal)\n", id, TO_UTF8( GetPCBDefaultLayerName( id ) ) );
457  }
458 
459  for( int ii = B_Adhes; ii < PCB_LAYER_ID_COUNT; ii++ )
460  {
461  fprintf( m_fp, " (%d %s user)\n", ii, TO_UTF8( GetPCBDefaultLayerName( ii ) ) );
462  }
463 
464  fprintf( m_fp, " )\n\n" );
465 }
#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 468 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().

470 {
471  if( aIsArc && ( aAngle == 360.0 || aAngle == 0 ) )
472  {
473  fprintf( m_fp, "(gr_circle (center %s %s) (end %s %s)(layer %s) (width %s))\n",
474  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
475  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
476  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
477  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
478  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ),
479  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str()
480  );
481  }
482  else if( aIsArc )
483  {
484  fprintf( m_fp, "(gr_arc (start %s %s) (end %s %s) (angle %s)(layer %s) (width %s))\n",
485  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
486  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
487  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
488  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
489  Double2Str( aAngle ).c_str(),
490  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ),
491  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str()
492  );
493  }
494  else
495  {
496  fprintf( m_fp, "(gr_line (start %s %s) (end %s %s)(layer %s) (width %s))\n",
497  Double2Str( TO_PCB_UNIT(aStart.x) ).c_str(),
498  Double2Str( TO_PCB_UNIT(aStart.y) ).c_str(),
499  Double2Str( TO_PCB_UNIT(aEnd.x) ).c_str(),
500  Double2Str( TO_PCB_UNIT(aEnd.y) ).c_str(),
501  TO_UTF8( GetPCBDefaultLayerName( aLayer ) ),
502  Double2Str( TO_PCB_UNIT( aWidth ) ).c_str()
503  );
504  }
505 }
#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:60
#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: