KiCad PCB EDA Suite
|
Export GenCAD 1.4 format. More...
#include <build_version.h>
#include <board.h>
#include <board_design_settings.h>
#include <convert_basic_shapes_to_polygon.h>
#include <fp_shape.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_track.h>
#include <confirm.h>
#include <core/arraydim.h>
#include <dialogs/dialog_gencad_export_options.h>
#include <locale_io.h>
#include <macros.h>
#include <hash_eda.h>
#include <pcb_edit_frame.h>
#include <pcbnew_settings.h>
#include <pgm_base.h>
#include <project/project_file.h>
#include <wx/app.h>
#include <wx/filedlg.h>
Go to the source code of this file.
Functions | |
static bool | CreateHeaderInfoData (FILE *aFile, PCB_EDIT_FRAME *frame) |
static void | CreateArtworksSection (FILE *aFile) |
static void | CreateTracksInfoData (FILE *aFile, BOARD *aPcb) |
static void | CreateBoardSection (FILE *aFile, BOARD *aPcb) |
static void | CreateComponentsSection (FILE *aFile, BOARD *aPcb) |
static void | CreateDevicesSection (FILE *aFile, BOARD *aPcb) |
static void | CreateRoutesSection (FILE *aFile, BOARD *aPcb) |
static void | CreateSignalsSection (FILE *aFile, BOARD *aPcb) |
static void | CreateShapesSection (FILE *aFile, BOARD *aPcb) |
static void | CreatePadsShapesSection (FILE *aFile, BOARD *aPcb) |
static void | FootprintWriteShape (FILE *File, FOOTPRINT *aFootprint, const wxString &aShapeName) |
static std::string | GenCADLayerName (int aCuCount, PCB_LAYER_ID aId) |
static std::string | GenCADLayerNameFlipped (int aCuCount, PCB_LAYER_ID aId) |
static wxString | escapeString (const wxString &aString) |
static std::string | fmt_mask (LSET aSet) |
static const wxString | getShapeName (FOOTPRINT *aFootprint) |
static double | MapXTo (int aX) |
static double | MapYTo (int aY) |
static bool | ViaSort (const PCB_VIA *aPadref, const PCB_VIA *aPadcmp) |
static size_t | hashFootprint (const FOOTPRINT *aFootprint) |
Compute hashes for footprints without taking into account their position, rotation or layer. More... | |
Variables | |
static const PCB_LAYER_ID | gc_seq [] |
static bool | flipBottomPads |
static bool | uniquePins |
static bool | individualShapes |
static bool | storeOriginCoords |
static int | GencadOffsetX |
static int | GencadOffsetY |
static std::map< FOOTPRINT *, int > | componentShapes |
static std::map< int, wxString > | shapeNames |
static const double | SCALE_FACTOR = 1000.0 * pcbIUScale.IU_PER_MILS |
Export GenCAD 1.4 format.
Definition in file export_gencad.cpp.
|
static |
Definition at line 357 of file export_gencad.cpp.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 1139 of file export_gencad.cpp.
References BOARD::Drawings(), Edge_Cuts, EDA_SHAPE::GetEnd(), BOARD_ITEM::GetLayer(), EDA_SHAPE::GetStart(), MapXTo(), MapYTo(), PCB_SHAPE_T, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 854 of file export_gencad.cpp.
References EDA_ANGLE::AsDegrees(), B_SilkS, escapeString(), F_SilkS, BOARD::Footprints(), GenCADLayerName(), BOARD::GetCopperLayerCount(), getShapeName(), EDA_ANGLE::Invert(), MapXTo(), MapYTo(), EDA_ANGLE::Normalize(), SCALE_FACTOR, and TO_UTF8.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 1107 of file export_gencad.cpp.
References componentShapes, escapeString(), LIB_ID::Format(), FOOTPRINT::GetFPID(), FOOTPRINT::GetValue(), shapeNames, and TO_UTF8.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 976 of file export_gencad.cpp.
References ExpandTextVars(), PCB_BASE_FRAME::GetBoard(), GetBuildVersion(), TITLE_BLOCK::GetDate(), BOARD::GetFileName(), BOARD::GetProject(), TITLE_BLOCK::GetRevision(), BOARD::GetTitleBlock(), MapXTo(), MapYTo(), Pgm(), storeOriginCoords, and TO_UTF8.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 367 of file export_gencad.cpp.
References arrayDim(), CHAMFERED_RECT, CIRCLE, PAD::Compare(), SHAPE_POLY_SET::COutline(), SHAPE_LINE_CHAIN::CPoint(), CUSTOM, ERROR_INSIDE, flipBottomPads, fmt_mask(), gc_seq, GenCADLayerName(), GenCADLayerNameFlipped(), BOARD::GetCopperLayerCount(), BOARD::GetDesignSettings(), BOARD_DESIGN_SETTINGS::GetEnabledLayers(), BOARD::GetPads(), KI_FALLTHROUGH, BOARD_DESIGN_SETTINGS::m_MaxError, next(), SHAPE_POLY_SET::OutlineCount(), OVAL, pad, SHAPE_LINE_CHAIN::PointCount(), RECT, ROUNDRECT, SCALE_FACTOR, LSET::Seq(), BOARD::Tracks(), TransformRoundChamferedRectToPolygon(), TRAPEZOID, UNIMPLEMENTED_FOR, via, ViaSort(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 1022 of file export_gencad.cpp.
References BOARD::GetCopperLayerCount(), BOARD::GetDesignSettings(), BOARD_DESIGN_SETTINGS::GetEnabledLayers(), BOARD_CONNECTED_ITEM::GetNetCode(), and BOARD::Tracks().
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 738 of file export_gencad.cpp.
References EDA_ANGLE::AsDegrees(), componentShapes, escapeString(), flipBottomPads, BOARD::Footprints(), FootprintWriteShape(), Format(), hashFootprint(), individualShapes, EDA_ANGLE::Normalize(), pad, SCALE_FACTOR, shapeNames, TO_UTF8, and uniquePins.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 926 of file export_gencad.cpp.
References escapeString(), BOARD::FindNet(), BOARD::Footprints(), NETINFO_ITEM::GetNetCode(), BOARD::GetNetCount(), NETINFO_ITEM::GetNetname(), pad, and TO_UTF8.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 1174 of file export_gencad.cpp.
References SCALE_FACTOR, and BOARD::Tracks().
Referenced by PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 169 of file export_gencad.cpp.
References copy.
Referenced by CreateComponentsSection(), CreateDevicesSection(), CreateShapesSection(), CreateSignalsSection(), and FootprintWriteShape().
|
static |
Definition at line 177 of file export_gencad.cpp.
References LSET::AllCuMask(), and StrPrintf().
Referenced by CreatePadsShapesSection().
|
static |
Definition at line 1198 of file export_gencad.cpp.
References ANGLE_0, ARC, B_SilkS, CIRCLE, escapeString(), F_SilkS, Format(), FP_THROUGH_HOLE, EDA_SHAPE::GetArcAngle(), FOOTPRINT::GetAttributes(), FP_SHAPE::GetCenter0(), FP_SHAPE::GetEnd0(), BOARD_ITEM::GetLayer(), GetLineLength(), EDA_SHAPE::GetShape(), FP_SHAPE::GetStart0(), FOOTPRINT::GraphicalItems(), KiROUND(), PCB_FP_SHAPE_T, PCB_FP_TEXT_T, PCB_FP_TEXTBOX_T, POLY, RECT, SCALE_FACTOR, SEGMENT, TO_UTF8, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by CreateShapesSection().
|
static |
Definition at line 68 of file export_gencad.cpp.
References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, IsCopperLayer(), Margin, and StrPrintf().
Referenced by CreateComponentsSection(), CreatePadsShapesSection(), and GenCADLayerNameFlipped().
|
static |
Definition at line 160 of file export_gencad.cpp.
References GenCADLayerName(), and StrPrintf().
Referenced by CreatePadsShapesSection().
|
static |
Definition at line 197 of file export_gencad.cpp.
References componentShapes, FOOTPRINT::GetReference(), individualShapes, and shapeNames.
Referenced by CreateComponentsSection().
|
static |
Compute hashes for footprints without taking into account their position, rotation or layer.
Definition at line 718 of file export_gencad.cpp.
References FOOTPRINT::GraphicalItems(), hash_fp_item(), HASH_LAYER, HASH_POS, HASH_ROT, FOOTPRINT::Pads(), and REL_COORD.
Referenced by CreateShapesSection().
|
static |
Definition at line 221 of file export_gencad.cpp.
References GencadOffsetX, and SCALE_FACTOR.
Referenced by CreateBoardSection(), CreateComponentsSection(), and CreateHeaderInfoData().
|
static |
Definition at line 227 of file export_gencad.cpp.
References GencadOffsetY, and SCALE_FACTOR.
Referenced by CreateBoardSection(), CreateComponentsSection(), and CreateHeaderInfoData().
Definition at line 341 of file export_gencad.cpp.
References LSET::FmtBin(), PCB_VIA::GetDrillValue(), PCB_VIA::GetLayerSet(), and PCB_TRACK::GetWidth().
Referenced by CreatePadsShapesSection().
|
static |
Definition at line 193 of file export_gencad.cpp.
Referenced by CreateDevicesSection(), CreateShapesSection(), PCB_EDIT_FRAME::ExportToGenCAD(), and getShapeName().
|
static |
Definition at line 184 of file export_gencad.cpp.
Referenced by CreatePadsShapesSection(), CreateShapesSection(), and PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 123 of file export_gencad.cpp.
Referenced by CreatePadsShapesSection().
|
static |
Definition at line 190 of file export_gencad.cpp.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD(), and MapXTo().
|
static |
Definition at line 190 of file export_gencad.cpp.
Referenced by PCB_EDIT_FRAME::ExportToGenCAD(), and MapYTo().
|
static |
Definition at line 186 of file export_gencad.cpp.
Referenced by CreateShapesSection(), PCB_EDIT_FRAME::ExportToGenCAD(), and getShapeName().
|
static |
Definition at line 215 of file export_gencad.cpp.
Referenced by CreateComponentsSection(), CreatePadsShapesSection(), CreateShapesSection(), CreateTracksInfoData(), FootprintWriteShape(), MapXTo(), and MapYTo().
|
static |
Definition at line 194 of file export_gencad.cpp.
Referenced by CreateDevicesSection(), CreateShapesSection(), DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), PCB_EDIT_FRAME::ExportToGenCAD(), and getShapeName().
|
static |
Definition at line 187 of file export_gencad.cpp.
Referenced by CreateHeaderInfoData(), and PCB_EDIT_FRAME::ExportToGenCAD().
|
static |
Definition at line 185 of file export_gencad.cpp.
Referenced by CreateShapesSection(), and PCB_EDIT_FRAME::ExportToGenCAD().