|
KiCad PCB EDA Suite
|
#include "export_gencad_writer.h"#include <build_version.h>#include <common.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 <string_utils.h>#include <macros.h>#include <hash_eda.h>#include <set>#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 std::string | padShapeName (const std::string &aStem, const PADSTACK &aPadstack, PCB_LAYER_ID aPadLayer) |
| A uniform padstack keeps the bare name, so it still reads as one shape and not as a stack. | |
| static std::string | viaShapeStem (const PCB_VIA *aVia, PCB_LAYER_ID aViaLayer, const LSET &aMask) |
| static std::string | viaStackName (const PCB_VIA *aVia, const LSET &aMask) |
| The name carries every distinct diameter, or two vias that differ on one inner layer collide. | |
| static int | viaNominalWidth (const PCB_VIA *aVia) |
| The padstack describes the copper, so the one width a route entry holds is the widest. | |
| 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 |
|
static |
Definition at line 102 of file export_gencad_writer.cpp.
References copy.
Referenced by GENCAD_EXPORTER::createComponentsSection(), GENCAD_EXPORTER::createDevicesSection(), GENCAD_EXPORTER::createShapesSection(), GENCAD_EXPORTER::createSignalsSection(), and GENCAD_EXPORTER::footprintWriteShape().
|
static |
Definition at line 110 of file export_gencad_writer.cpp.
References LSET::AllCuMask().
Referenced by viaShapeStem(), and viaStackName().
|
static |
Layer names for GenCAD export.
Definition at line 38 of file export_gencad_writer.cpp.
References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, CopperLayerToOrdinal(), Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, IsCopperLayer(), and Margin.
Referenced by GENCAD_EXPORTER::createComponentsSection(), GENCAD_EXPORTER::createPadsShapesSection(), and genCADLayerNameFlipped().
|
static |
The flipped layer name for GenCAD export (to make CAM350 imports correct).
Flipping reverses the stackup, so INNER1 becomes INNER4 on a six layer board.
Definition at line 93 of file export_gencad_writer.cpp.
References CopperLayerToOrdinal(), genCADLayerName(), and IsInnerCopperLayer().
Referenced by GENCAD_EXPORTER::createPadsShapesSection().
|
static |
Compute hashes for footprints without taking into account their position, rotation or layer.
Definition at line 712 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().
|
static |
A uniform padstack keeps the bare name, so it still reads as one shape and not as a stack.
Definition at line 265 of file export_gencad_writer.cpp.
References PADSTACK::Mode(), LSET::Name(), PADSTACK::NORMAL, and TO_UTF8.
Referenced by PCAD2KICAD::PCAD_PAD::AddToFootprint(), and GENCAD_EXPORTER::createPadsShapesSection().
|
static |
The padstack describes the copper, so the one width a route entry holds is the widest.
Definition at line 298 of file export_gencad_writer.cpp.
References PADSTACK::ForEachUniqueLayer(), PCB_VIA::GetWidth(), and PCB_VIA::Padstack().
|
static |
Definition at line 275 of file export_gencad_writer.cpp.
References fmt_mask(), PCB_VIA::GetDrillValue(), and PCB_VIA::GetWidth().
Referenced by GENCAD_EXPORTER::createPadsShapesSection().
Sort vias for uniqueness.
Definition at line 239 of file export_gencad_writer.cpp.
References BASE_SET::FmtBin(), PCB_VIA::GetDrillValue(), PCB_VIA::GetLayerSet(), PCB_VIA::GetWidth(), PCB_VIA::Padstack(), and PADSTACK::UniqueLayers().
Referenced by GENCAD_EXPORTER::createPadsShapesSection().
The name carries every distinct diameter, or two vias that differ on one inner layer collide.
Definition at line 283 of file export_gencad_writer.cpp.
References fmt_mask(), PADSTACK::ForEachUniqueLayer(), PCB_VIA::GetDrillValue(), PCB_VIA::GetWidth(), name, and PCB_VIA::Padstack().
Referenced by GENCAD_EXPORTER::createPadsShapesSection().
|
static |
Association between shape names (using shapeName index) and components.
Definition at line 119 of file export_gencad_writer.cpp.
Referenced by GENCAD_EXPORTER::createDevicesSection(), GENCAD_EXPORTER::createShapesSection(), GENCAD_EXPORTER::getShapeName(), DIPTRACE::SCH_PARSER::populateLibSymbolUnit(), and GENCAD_EXPORTER::WriteFile().
|
static |
Definition at line 141 of file export_gencad_writer.cpp.
|
static |
Definition at line 120 of file export_gencad_writer.cpp.
Referenced by GENCAD_EXPORTER::createDevicesSection(), GENCAD_EXPORTER::createShapesSection(), DIALOG_FP_EDIT_PAD_TABLE::DIALOG_FP_EDIT_PAD_TABLE(), DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), GENCAD_EXPORTER::getShapeName(), DIALOG_FP_EDIT_PAD_TABLE::TransferDataToWindow(), and GENCAD_EXPORTER::WriteFile().