|
KiCad PCB EDA Suite
|
#include "allegro_builder.h"#include <chrono>#include <cmath>#include <limits>#include <set>#include <tuple>#include <unordered_set>#include <convert/allegro_pcb_structs.h>#include <wx/log.h>#include <core/profile.h>#include <board_design_settings.h>#include <project/net_settings.h>#include <footprint.h>#include <netclass.h>#include <pad.h>#include <pcb_text.h>#include <pcb_shape.h>#include <pcb_track.h>#include <zone.h>#include <convert_basic_shapes_to_polygon.h>Go to the source code of this file.
Classes | |
| class | LL_WALKER |
| class | LL_WALKER::iterator |
| struct | std::hash< LAYER_INFO > |
| class | ALLEGRO::LAYER_MAPPER |
| Class to handle the mapping for Allegro CLASS/SUBCLASS idiom to KiCad layers. More... | |
| struct | ALLEGRO::LAYER_MAPPER::CUSTOM_LAYER |
| Represents the information found in a single entry of a layer list. More... | |
Macros | |
| #define | BLK_FIELD(BLK_T, FIELD) |
Functions | |
| static uint32_t | GetPrimaryNext (const BLOCK_BASE &aBlock) |
| Gets the next block in the linked list. | |
| static uint32_t | PadGetNextInFootprint (const BLOCK_BASE &aBlock) |
| "Get Next" function for the pad list in a footprint's 0x32 list. | |
| static wxString | layerInfoDisplayName (const LAYER_INFO &aLayerInfo) |
| Build a unique display name for a LAYER_INFO entry from the static maps above, suitable for presentation in the layer mapping dialog. | |
| static int | safeScale (double aValue) |
Variables | |
| static const wxChar *const | traceAllegroBuilder = wxT( "KICAD_ALLEGRO_BUILDER" ) |
| Flag to enable debug output of Allegro board construction. | |
| static const wxChar *const | traceAllegroPerf = wxT( "KICAD_ALLEGRO_PERF" ) |
| static const std::unordered_map< LAYER_INFO, PCB_LAYER_ID > | s_LayerKiMap |
| Map of the pre-set class:subclass pairs to standard layers. | |
| static const std::unordered_map< LAYER_INFO, wxString > | s_OptionalFixedMappings |
| Names for custom KiCad layers that correspond to pre-defined Allegro layers. | |
| #define BLK_FIELD | ( | BLK_T, | |
| FIELD ) |
Definition at line 66 of file allegro_builder.cpp.
Referenced by GetPrimaryNext(), and PadGetNextInFootprint().
|
static |
Gets the next block in the linked list.
Exactly which member does this depends on the block type.
It's not yet clear if any blocks can be in multiple linked lists at once - for now just follow the "main" one. This is done as dispatch like this to avoid forcing all the blocks into an inheritance hierarchy.
| aBlock | The block to get the next block from. |
Definition at line 79 of file allegro_builder.cpp.
References BLK_FIELD, and ALLEGRO::BLOCK_BASE::GetBlockType().
Referenced by LL_WALKER::LL_WALKER().
|
static |
Build a unique display name for a LAYER_INFO entry from the static maps above, suitable for presentation in the layer mapping dialog.
Refer to https://www.artwork.com/all2dxf/alleggeo.htm for layer orders.
Definition at line 302 of file allegro_builder.cpp.
References ALLEGRO::LAYER_INFO::ANALYSIS, ALLEGRO::LAYER_INFO::ANALYSIS_HIGH_ISOCONTOUR, ALLEGRO::LAYER_INFO::ANALYSIS_LOW_ISOCONTOUR, ALLEGRO::LAYER_INFO::ANALYSIS_MEDIUM1_ISOCONTOUR, ALLEGRO::LAYER_INFO::ANALYSIS_MEDIUM2_ISOCONTOUR, ALLEGRO::LAYER_INFO::ANALYSIS_MEDIUM3_ISOCONTOUR, ALLEGRO::LAYER_INFO::ANALYSIS_PCB_TEMPERATURE, ALLEGRO::LAYER_INFO::ANTI_ETCH, ALLEGRO::LAYER_INFO::ASSEMBLY_BOTTOM, ALLEGRO::LAYER_INFO::ASSEMBLY_TOP, ALLEGRO::LAYER_INFO::BGEOM_ASSEMBLY_DETAIL, ALLEGRO::LAYER_INFO::BGEOM_ASSEMBLY_NOTES, ALLEGRO::LAYER_INFO::BGEOM_BOTH_ROOMS, ALLEGRO::LAYER_INFO::BGEOM_BOTTOM_ROOM, ALLEGRO::LAYER_INFO::BGEOM_CONSTRAINT_AREA, ALLEGRO::LAYER_INFO::BGEOM_DIMENSION, ALLEGRO::LAYER_INFO::BGEOM_OFF_GRID_AREA, ALLEGRO::LAYER_INFO::BGEOM_OUTLINE, ALLEGRO::LAYER_INFO::BGEOM_PLACE_GRID_BOTTOM, ALLEGRO::LAYER_INFO::BGEOM_PLACE_GRID_TOP, ALLEGRO::LAYER_INFO::BGEOM_PLATING_BAR, ALLEGRO::LAYER_INFO::BGEOM_SILKSCREEN_BOTTOM, ALLEGRO::LAYER_INFO::BGEOM_SILKSCREEN_TOP, ALLEGRO::LAYER_INFO::BGEOM_SOLDERMASK_BOTTOM, ALLEGRO::LAYER_INFO::BGEOM_SOLDERMASK_TOP, ALLEGRO::LAYER_INFO::BGEOM_SWITCH_AREA_BOTTOM, ALLEGRO::LAYER_INFO::BGEOM_SWITCH_AREA_TOP, ALLEGRO::LAYER_INFO::BGEOM_TOOLING_CORNERS, ALLEGRO::LAYER_INFO::BGEOM_TOP_ROOM, ALLEGRO::LAYER_INFO::BOARD_GEOMETRY, ALLEGRO::LAYER_INFO::BOUNDARY, ALLEGRO::LAYER_INFO::COMPONENT_VALUE, ALLEGRO::LAYER_INFO::DEVICE_TYPE, ALLEGRO::LAYER_INFO::DFA_BOUND_BOTTOM, ALLEGRO::LAYER_INFO::DFA_BOUND_TOP, ALLEGRO::LAYER_INFO::DFMT_OUTLINE, ALLEGRO::LAYER_INFO::DFMT_REVISION_BLOCK, ALLEGRO::LAYER_INFO::DFMT_REVISION_DATA, ALLEGRO::LAYER_INFO::DFMT_TITLE_BLOCK, ALLEGRO::LAYER_INFO::DFMT_TITLE_DATA, ALLEGRO::LAYER_INFO::DISPLAY_BOTTOM, ALLEGRO::LAYER_INFO::DISPLAY_TOP, ALLEGRO::LAYER_INFO::DRAWING_FORMAT, ALLEGRO::LAYER_INFO::ETCH, ALLEGRO::LAYER_INFO::m_Class, ALLEGRO::LAYER_INFO::m_Subclass, ALLEGRO::LAYER_INFO::MANUFACTURING, ALLEGRO::LAYER_INFO::MFR_AUTOSILK_BOTTOM, ALLEGRO::LAYER_INFO::MFR_AUTOSILK_TOP, ALLEGRO::LAYER_INFO::MFR_NCDRILL_FIGURE, ALLEGRO::LAYER_INFO::MFR_NCDRILL_LEGEND, ALLEGRO::LAYER_INFO::MFR_NO_GLOSS_ALL, ALLEGRO::LAYER_INFO::MFR_NO_GLOSS_BOTTOM, ALLEGRO::LAYER_INFO::MFR_NO_GLOSS_INTERNAL, ALLEGRO::LAYER_INFO::MFR_NO_GLOSS_TOP, ALLEGRO::LAYER_INFO::MFR_NO_PROBE_BOTTOM, ALLEGRO::LAYER_INFO::MFR_NO_PROBE_TOP, ALLEGRO::LAYER_INFO::MFR_PHOTOPLOT_OUTLINE, ALLEGRO::LAYER_INFO::MFR_PROBE_BOTTOM, ALLEGRO::LAYER_INFO::MFR_PROBE_TOP, ALLEGRO::LAYER_INFO::PACKAGE_GEOMETRY, ALLEGRO::LAYER_INFO::PACKAGE_KEEPIN, ALLEGRO::LAYER_INFO::PACKAGE_KEEPOUT, ALLEGRO::LAYER_INFO::PGEOM_ASSEMBLY_BOTTOM, ALLEGRO::LAYER_INFO::PGEOM_ASSEMBLY_TOP, ALLEGRO::LAYER_INFO::PGEOM_BODY_CENTER, ALLEGRO::LAYER_INFO::PGEOM_DISPLAY_BOTTOM, ALLEGRO::LAYER_INFO::PGEOM_DISPLAY_TOP, ALLEGRO::LAYER_INFO::PGEOM_PAD_STACK_NAME, ALLEGRO::LAYER_INFO::PGEOM_PIN_NUMBER, ALLEGRO::LAYER_INFO::PGEOM_PLACE_BOUND_BOTTOM, ALLEGRO::LAYER_INFO::PGEOM_PLACE_BOUND_TOP, ALLEGRO::LAYER_INFO::PGEOM_SILKSCREEN_BOTTOM, ALLEGRO::LAYER_INFO::PGEOM_SILKSCREEN_TOP, ALLEGRO::LAYER_INFO::PGEOM_SOLDERMASK_BOTTOM, ALLEGRO::LAYER_INFO::PGEOM_SOLDERMASK_TOP, ALLEGRO::LAYER_INFO::PIN, ALLEGRO::LAYER_INFO::REF_DES, ALLEGRO::LAYER_INFO::ROUTE_KEEPIN, ALLEGRO::LAYER_INFO::ROUTE_KEEPOUT, ALLEGRO::LAYER_INFO::SILKSCREEN_BOTTOM, ALLEGRO::LAYER_INFO::SILKSCREEN_TOP, ALLEGRO::LAYER_INFO::TOLERANCE, ALLEGRO::LAYER_INFO::USER_PART_NUMBER, ALLEGRO::LAYER_INFO::VIA_CLASS, and ALLEGRO::LAYER_INFO::VIA_KEEPOUT.
Referenced by ALLEGRO::BOARD_BUILDER::buildFootprint(), and ALLEGRO::LAYER_MAPPER::FinalizeLayers().
|
static |
"Get Next" function for the pad list in a footprint's 0x32 list.
Definition at line 115 of file allegro_builder.cpp.
References BLK_FIELD, ALLEGRO::BLOCK_BASE::GetBlockType(), ALLEGRO::BLOCK_BASE::GetKey(), ALLEGRO::BLOCK_BASE::GetOffset(), and THROW_IO_ERROR.
Referenced by ALLEGRO::BOARD_BUILDER::buildFootprint().
|
static |
Definition at line 866 of file allegro_builder.cpp.
References result.
Referenced by ALLEGRO::BOARD_BUILDER::buildPcbText(), ALLEGRO::BOARD_BUILDER::buildShapes(), ALLEGRO::BOARD_BUILDER::createBoardOutline(), ALLEGRO::BOARD_BUILDER::scale(), ALLEGRO::BOARD_BUILDER::scale(), and ALLEGRO::BOARD_BUILDER::scaleSize().
|
static |
Map of the pre-set class:subclass pairs to standard layers.
Allegro doesn't really have a neat mapping onto KiCad layers. In theory, we could use the Films to map things that actually end up on the silkscreen layer (films can pick things out by class:subclass), but that would be quite fiddly and would fail if the films weren't configured right.
Definition at line 233 of file allegro_builder.cpp.
Referenced by ALLEGRO::LAYER_MAPPER::FinalizeLayers(), and ALLEGRO::LAYER_MAPPER::GetLayer().
|
static |
Names for custom KiCad layers that correspond to pre-defined Allegro layers.
Multiple class:subclasses can share a layer name, in which case, they will share a layer.
This is a balance between running out of layers and dumping too much unrelated stuff on the same layer.
Definition at line 264 of file allegro_builder.cpp.
Referenced by ALLEGRO::LAYER_MAPPER::GetLayer().
|
static |
Definition at line 63 of file allegro_builder.cpp.