KiCad PCB EDA Suite
Loading...
Searching...
No Matches
export_gencad_writer.cpp File Reference
#include "export_gencad_writer.h"
#include <build_version.h>
#include <board.h>
#include <board_design_settings.h>
#include <convert_basic_shapes_to_polygon.h>
#include <pcb_shape.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_track.h>
#include <richio.h>
#include <string_utils.h>
#include <locale_io.h>
#include <macros.h>
#include <hash_eda.h>
#include <fmt.h>

Go to the source code of this file.

Functions

static std::string genCADLayerName (int aCuCount, PCB_LAYER_ID aId)
 Layer names for GenCAD export.
 
static std::string genCADLayerNameFlipped (int aCuCount, PCB_LAYER_ID aId)
 The flipped layer name for GenCAD export (to make CAM350 imports correct).
 
static wxString escapeString (const wxString &aString)
 
static std::string fmt_mask (const LSET &aSet)
 
static bool viaSort (const PCB_VIA *aPadref, const PCB_VIA *aPadcmp)
 Sort vias for uniqueness.
 
static size_t hashFootprint (const FOOTPRINT *aFootprint)
 Compute hashes for footprints without taking into account their position, rotation or layer.
 

Variables

static std::map< FOOTPRINT *, int > componentShapes
 Association between shape names (using shapeName index) and components.
 
static std::map< int, wxString > shapeNames
 
static const double SCALE_FACTOR = 1000.0 * pcbIUScale.IU_PER_MILS
 

Function Documentation

◆ escapeString()

◆ fmt_mask()

static std::string fmt_mask ( const LSET & aSet)
static

Definition at line 111 of file export_gencad_writer.cpp.

References LSET::AllCuMask().

Referenced by GENCAD_EXPORTER::createPadsShapesSection().

◆ genCADLayerName()

static std::string genCADLayerName ( int aCuCount,
PCB_LAYER_ID aId )
static

◆ genCADLayerNameFlipped()

static std::string genCADLayerNameFlipped ( int aCuCount,
PCB_LAYER_ID aId )
static

The flipped layer name for GenCAD export (to make CAM350 imports correct).

Definition at line 94 of file export_gencad_writer.cpp.

References genCADLayerName(), and StrPrintf().

Referenced by GENCAD_EXPORTER::createPadsShapesSection().

◆ hashFootprint()

static size_t hashFootprint ( const FOOTPRINT * aFootprint)
static

Compute hashes for footprints without taking into account their position, rotation or layer.

Definition at line 628 of file export_gencad_writer.cpp.

References FOOTPRINT::GraphicalItems(), hash_fp_item(), HASH_LAYER, HASH_POS, HASH_ROT, FOOTPRINT::Pads(), and REL_COORD.

Referenced by GENCAD_EXPORTER::createShapesSection().

◆ viaSort()

static bool viaSort ( const PCB_VIA * aPadref,
const PCB_VIA * aPadcmp )
static

Variable Documentation

◆ componentShapes

std::map<FOOTPRINT*, int> componentShapes
static

Association between shape names (using shapeName index) and components.

Definition at line 120 of file export_gencad_writer.cpp.

Referenced by GENCAD_EXPORTER::createDevicesSection(), GENCAD_EXPORTER::createShapesSection(), GENCAD_EXPORTER::getShapeName(), and GENCAD_EXPORTER::WriteFile().

◆ SCALE_FACTOR

const double SCALE_FACTOR = 1000.0 * pcbIUScale.IU_PER_MILS
static

Definition at line 142 of file export_gencad_writer.cpp.

◆ shapeNames