KiCad PCB EDA Suite
export_to_pcbnew.cpp File Reference

Export the layers to Pcbnew. More...

#include <vector>
#include <fctsys.h>
#include <common.h>
#include <confirm.h>
#include <macros.h>
#include <trigo.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include <class_gerber_file_image.h>
#include <class_gerber_file_image_list.h>
#include <select_layers_to_pcb.h>
#include <build_version.h>
#include <wildcards_and_files_ext.h>

Go to the source code of this file.

Classes

class  GBR_TO_PCB_EXPORTER
 

Macros

#define TO_PCB_UNIT(x)   ( x / IU_PER_MM)
 
#define SEG_COUNT_CIRCLE   16
 
#define DELTA_ANGLE   2 * M_PI / SEG_COUNT_CIRCLE
 

Functions

const wxString GetPCBDefaultLayerName (LAYER_NUM aLayerNumber)
 

Detailed Description

Export the layers to Pcbnew.

Definition in file export_to_pcbnew.cpp.

Macro Definition Documentation

#define DELTA_ANGLE   2 * M_PI / SEG_COUNT_CIRCLE
#define SEG_COUNT_CIRCLE   16
#define TO_PCB_UNIT (   x)    ( x / IU_PER_MM)

Function Documentation

const wxString GetPCBDefaultLayerName ( LAYER_NUM  aLayerNumber)

Definition at line 207 of file dialog_select_one_pcb_layer.cpp.

Referenced by GBR_TO_PCB_EXPORTER::export_flashed_copper_item(), GBR_TO_PCB_EXPORTER::writeCopperLineItem(), GBR_TO_PCB_EXPORTER::writePcbHeader(), and GBR_TO_PCB_EXPORTER::writePcbLineItem().

208 {
209  const wxChar* txt;
210 
211  // using a switch to explicitly show the mapping more clearly
212  switch( aLayerId )
213  {
214  case F_Cu: txt = wxT( "F.Cu" ); break;
215  case In1_Cu: txt = wxT( "In1.Cu" ); break;
216  case In2_Cu: txt = wxT( "In2.Cu" ); break;
217  case In3_Cu: txt = wxT( "In3.Cu" ); break;
218  case In4_Cu: txt = wxT( "In4.Cu" ); break;
219  case In5_Cu: txt = wxT( "In5.Cu" ); break;
220  case In6_Cu: txt = wxT( "In6.Cu" ); break;
221  case In7_Cu: txt = wxT( "In7.Cu" ); break;
222  case In8_Cu: txt = wxT( "In8.Cu" ); break;
223  case In9_Cu: txt = wxT( "In9.Cu" ); break;
224  case In10_Cu: txt = wxT( "In10.Cu" ); break;
225  case In11_Cu: txt = wxT( "In11.Cu" ); break;
226  case In12_Cu: txt = wxT( "In12.Cu" ); break;
227  case In13_Cu: txt = wxT( "In13.Cu" ); break;
228  case In14_Cu: txt = wxT( "In14.Cu" ); break;
229  case In15_Cu: txt = wxT( "In15.Cu" ); break;
230  case In16_Cu: txt = wxT( "In16.Cu" ); break;
231  case In17_Cu: txt = wxT( "In17.Cu" ); break;
232  case In18_Cu: txt = wxT( "In18.Cu" ); break;
233  case In19_Cu: txt = wxT( "In19.Cu" ); break;
234  case In20_Cu: txt = wxT( "In20.Cu" ); break;
235  case In21_Cu: txt = wxT( "In21.Cu" ); break;
236  case In22_Cu: txt = wxT( "In22.Cu" ); break;
237  case In23_Cu: txt = wxT( "In23.Cu" ); break;
238  case In24_Cu: txt = wxT( "In24.Cu" ); break;
239  case In25_Cu: txt = wxT( "In25.Cu" ); break;
240  case In26_Cu: txt = wxT( "In26.Cu" ); break;
241  case In27_Cu: txt = wxT( "In27.Cu" ); break;
242  case In28_Cu: txt = wxT( "In28.Cu" ); break;
243  case In29_Cu: txt = wxT( "In29.Cu" ); break;
244  case In30_Cu: txt = wxT( "In30.Cu" ); break;
245  case B_Cu: txt = wxT( "B.Cu" ); break;
246 
247  // Technicals
248  case B_Adhes: txt = wxT( "B.Adhes" ); break;
249  case F_Adhes: txt = wxT( "F.Adhes" ); break;
250  case B_Paste: txt = wxT( "B.Paste" ); break;
251  case F_Paste: txt = wxT( "F.Paste" ); break;
252  case B_SilkS: txt = wxT( "B.SilkS" ); break;
253  case F_SilkS: txt = wxT( "F.SilkS" ); break;
254  case B_Mask: txt = wxT( "B.Mask" ); break;
255  case F_Mask: txt = wxT( "F.Mask" ); break;
256 
257  // Users
258  case Dwgs_User: txt = wxT( "Dwgs.User" ); break;
259  case Cmts_User: txt = wxT( "Cmts.User" ); break;
260  case Eco1_User: txt = wxT( "Eco1.User" ); break;
261  case Eco2_User: txt = wxT( "Eco2.User" ); break;
262  case Edge_Cuts: txt = wxT( "Edge.Cuts" ); break;
263  case Margin: txt = wxT( "Margin" ); break;
264 
265  // Footprint
266  case F_CrtYd: txt = wxT( "F.CrtYd" ); break;
267  case B_CrtYd: txt = wxT( "B.CrtYd" ); break;
268  case F_Fab: txt = wxT( "F.Fab" ); break;
269  case B_Fab: txt = wxT( "B.Fab" ); break;
270 
271  default:
272  wxASSERT_MSG( 0, wxT( "aLayerId out of range" ) );
273  txt = wxT( "BAD INDEX!" ); break;
274  }
275 
276  return wxString( txt );
277 }