KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALTIUM_PCB Class Reference

#include <altium_pcb.h>

Public Member Functions

 ALTIUM_PCB (BOARD *aBoard, PROGRESS_REPORTER *aProgressReporter, LAYER_MAPPING_HANDLER &aLayerMappingHandler, REPORTER *aReporter=nullptr, const wxString &aLibrary=wxEmptyString, const wxString &aFootprintName=wxEmptyString)
 
 ~ALTIUM_PCB ()
 
void Parse (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const std::map< ALTIUM_PCB_DIR, std::string > &aFileMapping, const std::map< std::string, UTF8 > *aProperties=nullptr)
 
std::unique_ptr< FOOTPRINTParseFootprint (ALTIUM_PCB_COMPOUND_FILE &altiumLibFile, const wxString &aFootprintName)
 

Private Member Functions

void checkpoint ()
 
PCB_LAYER_ID GetKicadLayer (ALTIUM_LAYER aAltiumLayer) const
 
std::vector< PCB_LAYER_IDGetKicadLayersToIterate (ALTIUM_LAYER aAltiumLayer) const
 
int GetNetCode (uint16_t aId) const
 
const ARULE6GetRule (ALTIUM_RULE_KIND aKind, const wxString &aName) const
 
const ARULE6GetRuleDefault (ALTIUM_RULE_KIND aKind) const
 
const ARULE6GetRuleForPolygon (ALTIUM_RULE_KIND aKind) const
 
void ParseFileHeader (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseBoard6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseClasses6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseComponents6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseDimensions6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseModelsData (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry, const std::vector< std::string > &aRootDir)
 
void ParseNets6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParsePolygons6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseRules6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseArcs6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertArcs6ToPcbShape (const AARC6 &aElem, PCB_SHAPE *aShape)
 
void ConvertArcs6ToBoardItem (const AARC6 &aElem, const int aPrimitiveIndex)
 
void ConvertArcs6ToFootprintItem (FOOTPRINT *aFootprint, const AARC6 &aElem, const int aPrimitiveIndex, const bool aIsBoardImport)
 
void ConvertArcs6ToBoardItemOnLayer (const AARC6 &aElem, PCB_LAYER_ID aLayer)
 
void ConvertArcs6ToFootprintItemOnLayer (FOOTPRINT *aFootprint, const AARC6 &aElem, PCB_LAYER_ID aLayer)
 
void ParseComponentsBodies6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertComponentBody6ToFootprintItem (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, FOOTPRINT *aFootprint, const ACOMPONENTBODY6 &aElem)
 
void ParsePads6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertPads6ToBoardItem (const APAD6 &aElem)
 
void ConvertPads6ToFootprintItem (FOOTPRINT *aFootprint, const APAD6 &aElem)
 
void ConvertPads6ToBoardItemOnNonCopper (const APAD6 &aElem)
 
void ConvertPads6ToFootprintItemOnCopper (FOOTPRINT *aFootprint, const APAD6 &aElem)
 
void ConvertPads6ToFootprintItemOnNonCopper (FOOTPRINT *aFootprint, const APAD6 &aElem)
 
void ParseVias6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertVias6ToFootprintItem (FOOTPRINT *aFootprint, const AVIA6 &aElem)
 
void ParseTracks6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertTracks6ToBoardItem (const ATRACK6 &aElem, const int aPrimitiveIndex)
 
void ConvertTracks6ToFootprintItem (FOOTPRINT *aFootprint, const ATRACK6 &aElem, const int aPrimitiveIndex, const bool aIsBoardImport)
 
void ConvertTracks6ToBoardItemOnLayer (const ATRACK6 &aElem, PCB_LAYER_ID aLayer)
 
void ConvertTracks6ToFootprintItemOnLayer (FOOTPRINT *aFootprint, const ATRACK6 &aElem, PCB_LAYER_ID aLayer)
 
void ParseSmartUnions6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseUnionNamesData (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void HelperCreateTuningPatterns ()
 
void HelperSetFootprintMountingStyles ()
 
void HelperAssignNetclassesToNets ()
 Rebuild the composite netclasses and point every net at its effective netclass.
 
void MapSchematicNetNames (const std::map< std::string, UTF8 > &aProperties)
 
wxString SchematicCasedNetName (const wxString &aNetName) const
 
void ParseTexts6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertTexts6ToBoardItem (const ATEXT6 &aElem)
 
void ConvertTexts6ToFootprintItem (FOOTPRINT *aFootprint, const ATEXT6 &aElem)
 
void ConvertTexts6ToBoardItemOnLayer (const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
 
void ConvertTexts6ToFootprintItemOnLayer (FOOTPRINT *aFootprint, const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
 
void ConvertBarcodes6ToBoardItemOnLayer (const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
 
void ConvertBarcodes6ToFootprintItemOnLayer (FOOTPRINT *aFootprint, const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
 
void ConvertTexts6ToEdaTextSettings (const ATEXT6 &aElem, EDA_TEXT &aEdaText)
 
void ParseFills6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertFills6ToBoardItem (const AFILL6 &aElem)
 
void ConvertFills6ToFootprintItem (FOOTPRINT *aFootprint, const AFILL6 &aElem, const bool aIsBoardImport)
 
void ConvertFills6ToBoardItemOnLayer (const AFILL6 &aElem, PCB_LAYER_ID aLayer)
 
void ConvertFills6ToFootprintItemOnLayer (FOOTPRINT *aFootprint, const AFILL6 &aElem, PCB_LAYER_ID aLayer)
 
void ParseBoardRegionsData (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseShapeBasedRegions6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ConvertShapeBasedRegions6ToBoardItem (const AREGION6 &aElem, const int aPrimitiveIndex)
 
void ConvertShapeBasedRegions6ToFootprintItem (FOOTPRINT *aFootprint, const AREGION6 &aElem, const int aPrimitiveIndex)
 
void ConvertShapeBasedRegions6ToBoardItemOnLayer (const AREGION6 &aElem, PCB_LAYER_ID aLayer, const int aPrimitiveIndex)
 
void ConvertShapeBasedRegions6ToFootprintItemOnLayer (FOOTPRINT *aFootprint, const AREGION6 &aElem, PCB_LAYER_ID aLayer, const int aPrimitiveIndex)
 
void ParseExtendedPrimitiveInformationData (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseRegions6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void ParseWideStrings6Data (const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
 
void HelperParseDimensions6Linear (const ADIMENSION6 &aElem)
 
void HelperParseDimensions6Radial (const ADIMENSION6 &aElem)
 
void HelperParseDimensions6Leader (const ADIMENSION6 &aElem)
 
void HelperParseDimensions6Datum (const ADIMENSION6 &aElem)
 
void HelperParseDimensions6Center (const ADIMENSION6 &aElem)
 
void HelperParsePad6NonCopper (const APAD6 &aElem, PCB_LAYER_ID aLayer, PCB_SHAPE *aShape)
 
void HelperFillMechanicalLayerAssignments (const std::vector< ABOARD6_LAYER_STACKUP > &aStackup)
 
void HelperCreateBoardOutline (const std::vector< ALTIUM_VERTICE > &aVertices)
 
void HelperSetZoneLayers (ZONE &aZone, const ALTIUM_LAYER aAltiumLayer)
 
void HelperSetZoneKeepoutRestrictions (ZONE &aZone, const uint8_t aKeepoutRestrictions)
 
uint8_t HelperGetKeepoutRestrictions (const uint8_t aKeepoutRestrictions, const ALTIUM_LAYER aAltiumLayer)
 Resolve an Altium keepout restriction mask, substituting the restrictions implied by the layer when the mask is empty.
 
void HelperFootprintZoneToLibFrame (ZONE &aZone, const FOOTPRINT &aFootprint)
 
void HelperPcpShapeAsBoardKeepoutRegion (const PCB_SHAPE &aShape, const ALTIUM_LAYER aAltiumLayer, const uint8_t aKeepoutRestrictions)
 
void HelperPcpShapeAsFootprintKeepoutRegion (FOOTPRINT *aFootprint, const PCB_SHAPE &aShape, const ALTIUM_LAYER aAltiumLayer, const uint8_t aKeepoutRestrictions)
 
void HelperSetTextboxAlignmentAndPos (const ATEXT6 &aElem, PCB_TEXTBOX *aPcbTextbox)
 
void HelperSetTextAlignmentAndPos (const ATEXT6 &aElem, EDA_TEXT *aEdaText)
 
std::vector< std::pair< PCB_LAYER_ID, int > > HelperGetSolderAndPasteMaskExpansions (const ALTIUM_RECORD aType, const int aPrimitiveIndex, const ALTIUM_LAYER aAltiumLayer)
 
FOOTPRINTHelperGetFootprint (uint16_t aComponent) const
 
void HelperBuildPadstackLayerIndex ()
 
int HelperGetPadstackLayerIndex (PCB_LAYER_ID aLayer) const
 Return the slot aLayer occupies in an Altium padstack's per-layer arrays.
 
std::shared_ptr< EMBEDDED_FILES::EMBEDDED_FILEHelperEmbedModel (FOOTPRINT *aFootprint, const wxString &aModelName, const std::vector< char > &aCompressedData, bool &aIsNew)
 Return the 3D model aModelName embedded in aFootprint, inflating and embedding aCompressedData first if it is not there yet.
 
void remapUnsureLayers (std::vector< ABOARD6_LAYER_STACKUP > &aStackup)
 

Private Attributes

BOARDm_board
 
std::vector< FOOTPRINT * > m_components
 
std::vector< ZONE * > m_polygons
 
std::vector< PCB_DIM_RADIAL * > m_radialDimensions
 
std::map< uint32_t, wxString > m_unicodeStrings
 
std::vector< int > m_altiumToKicadNetcodes
 
std::map< wxString, wxString > m_schematicNetNames
 
std::map< ALTIUM_LAYER, PCB_LAYER_IDm_layermap
 
std::map< ALTIUM_LAYER, wxString > m_layerNames
 
std::map< PCB_LAYER_ID, int > m_padstackLayerIndex
 
std::map< wxString, ALTIUM_EMBEDDED_MODEL_DATAm_EmbeddedModels
 
std::map< ALTIUM_RULE_KIND, std::vector< ARULE6 > > m_rules
 
std::map< ALTIUM_RECORD, std::multimap< int, const AEXTENDED_PRIMITIVE_INFORMATION > > m_extendedPrimitiveInformationMaps
 
std::vector< ASMARTUNION6m_tuningUnions
 
std::map< uint32_t, wxString > m_unionNames
 
std::map< int, std::vector< BOARD_ITEM * > > m_unionToBoardItems
 
std::map< ALTIUM_LAYER, ZONE * > m_outer_plane
 
LAYER_MAPPING_HANDLER m_layerMappingHandler
 
PROGRESS_REPORTERm_progressReporter
 optional; may be nullptr
 
REPORTERm_reporter
 optional; may be nullptr
 
unsigned m_doneCount
 
unsigned m_lastProgressCount
 
unsigned m_totalCount
 for progress reporting
 
wxString m_library
 for footprint library loading error reporting
 
wxString m_footprintName
 for footprint library loading error reporting
 
int m_highest_pour_index
 Altium stores pour order across all layers.
 

Friends

struct ALTIUM_PCB_IMPORT_FIXTURE
 

Detailed Description

Definition at line 151 of file altium_pcb.h.

Constructor & Destructor Documentation

◆ ALTIUM_PCB()

ALTIUM_PCB::ALTIUM_PCB ( BOARD * aBoard,
PROGRESS_REPORTER * aProgressReporter,
LAYER_MAPPING_HANDLER & aLayerMappingHandler,
REPORTER * aReporter = nullptr,
const wxString & aLibrary = wxEmptyString,
const wxString & aFootprintName = wxEmptyString )
explicit

◆ ~ALTIUM_PCB()

ALTIUM_PCB::~ALTIUM_PCB ( )

Definition at line 479 of file altium_pcb.cpp.

Member Function Documentation

◆ checkpoint()

◆ ConvertArcs6ToBoardItem()

◆ ConvertArcs6ToBoardItemOnLayer()

◆ ConvertArcs6ToFootprintItem()

◆ ConvertArcs6ToFootprintItemOnLayer()

void ALTIUM_PCB::ConvertArcs6ToFootprintItemOnLayer ( FOOTPRINT * aFootprint,
const AARC6 & aElem,
PCB_LAYER_ID aLayer )
private

◆ ConvertArcs6ToPcbShape()

◆ ConvertBarcodes6ToBoardItemOnLayer()

void ALTIUM_PCB::ConvertBarcodes6ToBoardItemOnLayer ( const ATEXT6 & aElem,
PCB_LAYER_ID aLayer )
private

◆ ConvertBarcodes6ToFootprintItemOnLayer()

void ALTIUM_PCB::ConvertBarcodes6ToFootprintItemOnLayer ( FOOTPRINT * aFootprint,
const ATEXT6 & aElem,
PCB_LAYER_ID aLayer )
private

◆ ConvertComponentBody6ToFootprintItem()

◆ ConvertFills6ToBoardItem()

◆ ConvertFills6ToBoardItemOnLayer()

void ALTIUM_PCB::ConvertFills6ToBoardItemOnLayer ( const AFILL6 & aElem,
PCB_LAYER_ID aLayer )
private

◆ ConvertFills6ToFootprintItem()

◆ ConvertFills6ToFootprintItemOnLayer()

◆ ConvertPads6ToBoardItem()

◆ ConvertPads6ToBoardItemOnNonCopper()

void ALTIUM_PCB::ConvertPads6ToBoardItemOnNonCopper ( const APAD6 & aElem)
private

◆ ConvertPads6ToFootprintItem()

void ALTIUM_PCB::ConvertPads6ToFootprintItem ( FOOTPRINT * aFootprint,
const APAD6 & aElem )
private

◆ ConvertPads6ToFootprintItemOnCopper()

void ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper ( FOOTPRINT * aFootprint,
const APAD6 & aElem )
private

Definition at line 3954 of file altium_pcb.cpp.

References _, FOOTPRINT::Add(), PADSTACK::ALL_LAYERS, APAD6_SIZE_AND_SHAPE::alt_shape, ALTIUM_BOTTOM_PADSTACK_IDX, ALTIUM_MID1_PADSTACK_IDX, ALTIUM_MID2_PADSTACK_IDX, ALTIUM_PADSTACK_IDX_COUNT, ALTIUM_TOP_PADSTACK_IDX, altiumSlotDrillSize(), ANGLE_90, APPEND, EDA_ANGLE::AsDegrees(), B_Cu, B_Mask, BOARD_ITEM::BoardLayerSet(), APAD6::botshape, APAD6::botsize, BOTTOM_LAYER, CHAMFERED_RECT, CIRCLE, APAD6_SIZE_AND_SHAPE::cornerradius, PADSTACK::CUSTOM, DEGREES_T, APAD6::direction, F_Cu, F_Mask, PADSTACK::FRONT_INNER_BACK, FULL_STACK, GetKicadLayer(), GetNetCode(), FOOTPRINT::GetReference(), HelperGetPadstackLayerIndex(), APAD6_SIZE_AND_SHAPE::holeoffset, APAD6_SIZE_AND_SHAPE::holeshape, APAD6::holesize, PADSTACK::INNER_LAYERS, APAD6_SIZE_AND_SHAPE::inner_shape, APAD6_SIZE_AND_SHAPE::inner_size, LSET::InternalCuMask(), APAD6::is_tent_bottom, APAD6::is_tent_top, KiROUND(), APAD6::layer, m_footprintName, m_library, m_reporter, MANUAL, APAD6::midshape, APAD6::midsize, MULTI_LAYER, APAD6::name, APAD6::net, PADSTACK::NORMAL, EDA_ANGLE::Normalize(), NPTH, OBLONG, OCTAGONAL, OVAL, pad, APAD6::pad_to_die_delay, APAD6::pad_to_die_length, APAD6::padmode, APAD6::pastemaskexpansionmanual, APAD6::pastemaskexpansionmode, APAD6::plated, APAD6::position, PTH, PAD::PTHMask(), RECT, RECT_CHAMFER_ALL, RECTANGLE, ROUND, ROUNDRECT, RPT_SEVERITY_DEBUG, RPT_SEVERITY_ERROR, PADSTACK::SetChamferPositions(), PADSTACK::SetChamferRatio(), PADSTACK::SetMode(), PADSTACK::SetOffset(), PADSTACK::SetRoundRectRadiusRatio(), PADSTACK::SetShape(), PADSTACK::SetSize(), SIMPLE, APAD6::sizeAndShape, SLOT, APAD6_SIZE_AND_SHAPE::slotrotation, APAD6_SIZE_AND_SHAPE::slotsize, SMD, PAD::SMDMask(), APAD6::soldermaskexpansionmanual, APAD6::soldermaskexpansionmode, SQUARE, TOP_LAYER, TOP_MIDDLE_BOTTOM, APAD6::topshape, APAD6::topsize, UNKNOWN, and PAD::UnplatedHoleMask().

Referenced by ConvertPads6ToBoardItem(), and ConvertPads6ToFootprintItem().

◆ ConvertPads6ToFootprintItemOnNonCopper()

void ALTIUM_PCB::ConvertPads6ToFootprintItemOnNonCopper ( FOOTPRINT * aFootprint,
const APAD6 & aElem )
private

◆ ConvertShapeBasedRegions6ToBoardItem()

◆ ConvertShapeBasedRegions6ToBoardItemOnLayer()

◆ ConvertShapeBasedRegions6ToFootprintItem()

◆ ConvertShapeBasedRegions6ToFootprintItemOnLayer()

◆ ConvertTexts6ToBoardItem()

void ALTIUM_PCB::ConvertTexts6ToBoardItem ( const ATEXT6 & aElem)
private

◆ ConvertTexts6ToBoardItemOnLayer()

◆ ConvertTexts6ToEdaTextSettings()

◆ ConvertTexts6ToFootprintItem()

void ALTIUM_PCB::ConvertTexts6ToFootprintItem ( FOOTPRINT * aFootprint,
const ATEXT6 & aElem )
private

◆ ConvertTexts6ToFootprintItemOnLayer()

◆ ConvertTracks6ToBoardItem()

◆ ConvertTracks6ToBoardItemOnLayer()

void ALTIUM_PCB::ConvertTracks6ToBoardItemOnLayer ( const ATRACK6 & aElem,
PCB_LAYER_ID aLayer )
private

◆ ConvertTracks6ToFootprintItem()

◆ ConvertTracks6ToFootprintItemOnLayer()

void ALTIUM_PCB::ConvertTracks6ToFootprintItemOnLayer ( FOOTPRINT * aFootprint,
const ATRACK6 & aElem,
PCB_LAYER_ID aLayer )
private

◆ ConvertVias6ToFootprintItem()

◆ GetKicadLayer()

PCB_LAYER_ID ALTIUM_PCB::GetKicadLayer ( ALTIUM_LAYER aAltiumLayer) const
private

Definition at line 319 of file altium_pcb.cpp.

References B_Cu, B_Mask, B_Paste, B_SilkS, BACKGROUND, BOTTOM_LAYER, BOTTOM_OVERLAY, BOTTOM_PASTE, BOTTOM_SOLDER, CONNECTIONS, DRC_ERROR_MARKERS, DRILL_DRAWING, DRILL_GUIDE, Dwgs_User, F_Cu, F_Mask, F_Paste, F_SilkS, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu, In19_Cu, In1_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu, In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In2_Cu, In30_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, In9_Cu, INTERNAL_PLANE_1, INTERNAL_PLANE_10, INTERNAL_PLANE_11, INTERNAL_PLANE_12, INTERNAL_PLANE_13, INTERNAL_PLANE_14, INTERNAL_PLANE_15, INTERNAL_PLANE_16, INTERNAL_PLANE_2, INTERNAL_PLANE_3, INTERNAL_PLANE_4, INTERNAL_PLANE_5, INTERNAL_PLANE_6, INTERNAL_PLANE_7, INTERNAL_PLANE_8, INTERNAL_PLANE_9, KEEP_OUT_LAYER, m_layermap, Margin, MAX_USER_DEFINED_LAYERS, MECHANICAL_1, MECHANICAL_10, MECHANICAL_11, MECHANICAL_12, MECHANICAL_13, MECHANICAL_14, MECHANICAL_15, MECHANICAL_16, MECHANICAL_2, MECHANICAL_3, MECHANICAL_4, MECHANICAL_5, MECHANICAL_6, MECHANICAL_7, MECHANICAL_8, MECHANICAL_9, MID_LAYER_1, MID_LAYER_10, MID_LAYER_11, MID_LAYER_12, MID_LAYER_13, MID_LAYER_14, MID_LAYER_15, MID_LAYER_16, MID_LAYER_17, MID_LAYER_18, MID_LAYER_19, MID_LAYER_2, MID_LAYER_20, MID_LAYER_21, MID_LAYER_22, MID_LAYER_23, MID_LAYER_24, MID_LAYER_25, MID_LAYER_26, MID_LAYER_27, MID_LAYER_28, MID_LAYER_29, MID_LAYER_3, MID_LAYER_30, MID_LAYER_4, MID_LAYER_5, MID_LAYER_6, MID_LAYER_7, MID_LAYER_8, MID_LAYER_9, MULTI_LAYER, PAD_HOLES, SELECTIONS, TOP_LAYER, TOP_OVERLAY, TOP_PASTE, TOP_SOLDER, UNDEFINED_LAYER, UNKNOWN, User_1, User_10, User_11, User_12, User_13, User_14, User_15, User_16, User_2, User_3, User_4, User_5, User_6, User_7, User_8, User_9, V7_MECHANICAL_1, V7_MECHANICAL_17, V7_MECHANICAL_LAST, VIA_HOLES, VISIBLE_GRID_1, and VISIBLE_GRID_2.

Referenced by ConvertArcs6ToBoardItem(), ConvertPads6ToBoardItemOnNonCopper(), ConvertPads6ToFootprintItemOnCopper(), ConvertPads6ToFootprintItemOnNonCopper(), ConvertShapeBasedRegions6ToBoardItem(), ConvertShapeBasedRegions6ToFootprintItem(), ConvertTracks6ToBoardItem(), GetKicadLayersToIterate(), HelperParseDimensions6Center(), HelperParseDimensions6Datum(), HelperParseDimensions6Leader(), HelperParseDimensions6Linear(), HelperParseDimensions6Radial(), ParseBoard6Data(), ParsePolygons6Data(), ParseRegions6Data(), ParseVias6Data(), and remapUnsureLayers().

◆ GetKicadLayersToIterate()

◆ GetNetCode()

◆ GetRule()

const ARULE6 * ALTIUM_PCB::GetRule ( ALTIUM_RULE_KIND aKind,
const wxString & aName ) const
private

Definition at line 1081 of file altium_pcb.cpp.

References ARULE6::enabled, m_rules, and ARULE6::name.

◆ GetRuleDefault()

const ARULE6 * ALTIUM_PCB::GetRuleDefault ( ALTIUM_RULE_KIND aKind) const
private

◆ GetRuleForPolygon()

const ARULE6 * ALTIUM_PCB::GetRuleForPolygon ( ALTIUM_RULE_KIND aKind) const
private

Definition at line 1114 of file altium_pcb.cpp.

References GetRuleDefault(), m_rules, and selectAltiumPolygonRule().

Referenced by ParsePolygons6Data().

◆ HelperAssignNetclassesToNets()

void ALTIUM_PCB::HelperAssignNetclassesToNets ( )
private

Rebuild the composite netclasses and point every net at its effective netclass.

Definition at line 1716 of file altium_pcb.cpp.

References m_board.

Referenced by ParseClasses6Data(), and ParseRules6Data().

◆ HelperBuildPadstackLayerIndex()

void ALTIUM_PCB::HelperBuildPadstackLayerIndex ( )
private

Definition at line 1317 of file altium_pcb.cpp.

References BOTTOM_LAYER, IsCopperLayer(), m_layermap, m_padstackLayerIndex, and TOP_LAYER.

Referenced by ParseBoard6Data().

◆ HelperCreateBoardOutline()

◆ HelperCreateTuningPatterns()

◆ HelperEmbedModel()

std::shared_ptr< EMBEDDED_FILES::EMBEDDED_FILE > ALTIUM_PCB::HelperEmbedModel ( FOOTPRINT * aFootprint,
const wxString & aModelName,
const std::vector< char > & aCompressedData,
bool & aIsNew )
private

Return the 3D model aModelName embedded in aFootprint, inflating and embedding aCompressedData first if it is not there yet.

Parameters
aIsNewis set when the model was embedded by this call and so still owes a CompressAndEncode(), which the caller may run inline or on the pool.

Definition at line 205 of file altium_pcb.cpp.

References EMBEDDED_FILES::AddFile(), EMBEDDED_FILES::EmbeddedFileMap(), FOOTPRINT::GetEmbeddedFiles(), and EMBEDDED_FILES::EMBEDDED_FILE::MODEL.

Referenced by ConvertComponentBody6ToFootprintItem(), and ParseComponentsBodies6Data().

◆ HelperFillMechanicalLayerAssignments()

◆ HelperFootprintZoneToLibFrame()

void ALTIUM_PCB::HelperFootprintZoneToLibFrame ( ZONE & aZone,
const FOOTPRINT & aFootprint )
private

◆ HelperGetFootprint()

FOOTPRINT * ALTIUM_PCB::HelperGetFootprint ( uint16_t aComponent) const
private

◆ HelperGetKeepoutRestrictions()

uint8_t ALTIUM_PCB::HelperGetKeepoutRestrictions ( const uint8_t aKeepoutRestrictions,
const ALTIUM_LAYER aAltiumLayer )
private

Resolve an Altium keepout restriction mask, substituting the restrictions implied by the layer when the mask is empty.

Returns
the mask to apply, or zero if the keepout restricts nothing and should be dropped.

Definition at line 5808 of file altium_pcb.cpp.

References _, ALTIUM_KEEPOUT_ALL, ALTIUM_KEEPOUT_COPPER, IsAltiumLayerAPlane(), KEEP_OUT_LAYER, m_reporter, and RPT_SEVERITY_INFO.

Referenced by ConvertShapeBasedRegions6ToBoardItem(), ConvertShapeBasedRegions6ToFootprintItem(), HelperPcpShapeAsBoardKeepoutRegion(), and HelperPcpShapeAsFootprintKeepoutRegion().

◆ HelperGetPadstackLayerIndex()

int ALTIUM_PCB::HelperGetPadstackLayerIndex ( PCB_LAYER_ID aLayer) const
private

Return the slot aLayer occupies in an Altium padstack's per-layer arrays.

Those arrays are indexed by Altium layer id (top, mid 1 through 30, bottom), which only lines up with the KiCad stack position when the board stacks its mid layers in order.

Returns
the slot, or -1 when the layer has none, as internal planes do.

Definition at line 1335 of file altium_pcb.cpp.

References CopperLayerToOrdinal(), and m_padstackLayerIndex.

Referenced by ConvertPads6ToFootprintItemOnCopper(), ConvertVias6ToFootprintItem(), and ParseVias6Data().

◆ HelperGetSolderAndPasteMaskExpansions()

◆ HelperParseDimensions6Center()

void ALTIUM_PCB::HelperParseDimensions6Center ( const ADIMENSION6 & aElem)
private

◆ HelperParseDimensions6Datum()

void ALTIUM_PCB::HelperParseDimensions6Datum ( const ADIMENSION6 & aElem)
private

◆ HelperParseDimensions6Leader()

◆ HelperParseDimensions6Linear()

void ALTIUM_PCB::HelperParseDimensions6Linear ( const ADIMENSION6 & aElem)
private

Basically REFERENCE0POINT and REFERENCE1POINT are the two end points of the dimension. XY1 is the position of the arrow above REFERENCE0POINT. those three points are not necessarily in 90degree angle, but KiCad requires this to show the correct measurements.

Therefore, we take the vector of REFERENCE0POINT -> XY1, calculate the normal, and intersect it with REFERENCE1POINT pointing the same direction as REFERENCE0POINT -> XY1. This should give us a valid measurement point where we can place the drawsegment.

Definition at line 2007 of file altium_pcb.cpp.

References _, APPEND, BARE_SUFFIX, BOLD_FACTOR, CM, VECTOR2< T >::Cross(), Eco1_User, VECTOR2< T >::EuclideanNorm(), GetKicadLayer(), INCH, SEG::Intersect(), INWARD, ADIMENSION6::layer, ADIMENSION6::linewidth, m_board, m_reporter, MILS, MM, NO_SUFFIX, PCB_DIM_ALIGNED_T, VECTOR2< T >::Perpendicular(), ADIMENSION6::referencePoint, RPT_SEVERITY_INFO, ADIMENSION6::textbold, ADIMENSION6::textheight, ADIMENSION6::textitalic, ADIMENSION6::textlinewidth, ADIMENSION6::textprecision, ADIMENSION6::textprefix, ADIMENSION6::textsuffix, ADIMENSION6::textunit, THROW_IO_ERROR, UNDEFINED_LAYER, and ADIMENSION6::xy1.

Referenced by ParseDimensions6Data().

◆ HelperParseDimensions6Radial()

◆ HelperParsePad6NonCopper()

◆ HelperPcpShapeAsBoardKeepoutRegion()

void ALTIUM_PCB::HelperPcpShapeAsBoardKeepoutRegion ( const PCB_SHAPE & aShape,
const ALTIUM_LAYER aAltiumLayer,
const uint8_t aKeepoutRestrictions )
private

◆ HelperPcpShapeAsFootprintKeepoutRegion()

void ALTIUM_PCB::HelperPcpShapeAsFootprintKeepoutRegion ( FOOTPRINT * aFootprint,
const PCB_SHAPE & aShape,
const ALTIUM_LAYER aAltiumLayer,
const uint8_t aKeepoutRestrictions )
private

◆ HelperSetFootprintMountingStyles()

void ALTIUM_PCB::HelperSetFootprintMountingStyles ( )
private

Definition at line 5085 of file altium_pcb.cpp.

References FP_SMD, FP_THROUGH_HOLE, and m_components.

Referenced by Parse().

◆ HelperSetTextAlignmentAndPos()

◆ HelperSetTextboxAlignmentAndPos()

◆ HelperSetZoneKeepoutRestrictions()

◆ HelperSetZoneLayers()

◆ MapSchematicNetNames()

void ALTIUM_PCB::MapSchematicNetNames ( const std::map< std::string, UTF8 > & aProperties)
private

Definition at line 2588 of file altium_pcb.cpp.

References altiumCollectSchematicNetNames(), and m_schematicNetNames.

Referenced by Parse().

◆ Parse()

void ALTIUM_PCB::Parse ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const std::map< ALTIUM_PCB_DIR, std::string > & aFileMapping,
const std::map< std::string, UTF8 > * aProperties = nullptr )

Definition at line 501 of file altium_pcb.cpp.

References _, ARC, ARCS6, BOARD6, BOARDREGIONS, CIRCLE, CLASSES6, COMPONENTBODIES6, COMPONENTS6, DIMENSIONS6, directory, VECTOR2< T >::EuclideanNorm(), EXTENDPRIMITIVEINFORMATION, FILE_HEADER, FILLS6, ALTIUM_COMPOUND_FILE::FindStream(), FormatPath(), BOARD_DESIGN_SETTINGS::GetAuxOrigin(), PCB_ARC::GetCenter(), BOARD_DESIGN_SETTINGS::GetGridOrigin(), BOX2< Vec >::GetHeight(), PCB_SHAPE::GetPosition(), EDA_SHAPE::GetRadius(), PCB_ARC::GetRadius(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), EDA_SHAPE::GetShape(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), BOX2< Vec >::GetY(), ALTIUM_BINARY_PARSER::HasParsingError(), HelperCreateTuningPatterns(), HelperSetFootprintMountingStyles(), m_board, m_highest_pour_index, m_outer_plane, m_polygons, m_progressReporter, m_radialDimensions, m_reporter, m_totalCount, MapSchematicNetNames(), MODELS, NETS6, PADS6, ParseArcs6Data(), ParseBoard6Data(), ParseBoardRegionsData(), ParseClasses6Data(), ParseComponents6Data(), ParseComponentsBodies6Data(), ParseDimensions6Data(), ParseExtendedPrimitiveInformationData(), ParseFileHeader(), ParseFills6Data(), ParseModelsData(), ParseNets6Data(), ParsePads6Data(), ParsePolygons6Data(), ParseRegions6Data(), ParseRules6Data(), ParseShapeBasedRegions6Data(), ParseSmartUnions6Data(), ParseTexts6Data(), ParseTracks6Data(), ParseUnionNamesData(), ParseVias6Data(), ParseWideStrings6Data(), PCB_ARC_T, PCB_SHAPE_T, pcbIUScale, POLYGONS6, radius, ALTIUM_BINARY_PARSER::Read(), REGIONS6, VECTOR2< T >::Resize(), RPT_SEVERITY_ERROR, RULES6, BOARD_DESIGN_SETTINGS::SetAuxOrigin(), BOARD_DESIGN_SETTINGS::SetGridOrigin(), SHAPEBASEDREGIONS6, SMARTUNIONS, TEXTS6, THROW_IO_ERROR, TRACKS6, UNIONNAMES, VIAS6, and WIDESTRINGS6.

Referenced by PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), and PCB_IO_SOLIDWORKS::loadBoard().

◆ ParseArcs6Data()

void ALTIUM_PCB::ParseArcs6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseBoard6Data()

◆ ParseBoardRegionsData()

void ALTIUM_PCB::ParseBoardRegionsData ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseClasses6Data()

void ALTIUM_PCB::ParseClasses6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseComponents6Data()

◆ ParseComponentsBodies6Data()

◆ ParseDimensions6Data()

◆ ParseExtendedPrimitiveInformationData()

◆ ParseFileHeader()

void ALTIUM_PCB::ParseFileHeader ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseFills6Data()

void ALTIUM_PCB::ParseFills6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseFootprint()

◆ ParseModelsData()

void ALTIUM_PCB::ParseModelsData ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry,
const std::vector< std::string > & aRootDir )
private

◆ ParseNets6Data()

void ALTIUM_PCB::ParseNets6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParsePads6Data()

void ALTIUM_PCB::ParsePads6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParsePolygons6Data()

◆ ParseRegions6Data()

◆ ParseRules6Data()

◆ ParseShapeBasedRegions6Data()

void ALTIUM_PCB::ParseShapeBasedRegions6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseSmartUnions6Data()

void ALTIUM_PCB::ParseSmartUnions6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseTexts6Data()

void ALTIUM_PCB::ParseTexts6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseTracks6Data()

void ALTIUM_PCB::ParseTracks6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseUnionNamesData()

void ALTIUM_PCB::ParseUnionNamesData ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ ParseVias6Data()

◆ ParseWideStrings6Data()

void ALTIUM_PCB::ParseWideStrings6Data ( const ALTIUM_PCB_COMPOUND_FILE & aAltiumPcbFile,
const CFB::COMPOUND_FILE_ENTRY * aEntry )
private

◆ remapUnsureLayers()

◆ SchematicCasedNetName()

wxString ALTIUM_PCB::SchematicCasedNetName ( const wxString & aNetName) const
private

Definition at line 2614 of file altium_pcb.cpp.

References m_schematicNetNames.

Referenced by ParseClasses6Data(), and ParseNets6Data().

Friends And Related Symbol Documentation

◆ ALTIUM_PCB_IMPORT_FIXTURE

friend struct ALTIUM_PCB_IMPORT_FIXTURE
friend

Definition at line 153 of file altium_pcb.h.

References ALTIUM_PCB_IMPORT_FIXTURE.

Referenced by ALTIUM_PCB_IMPORT_FIXTURE.

Member Data Documentation

◆ m_altiumToKicadNetcodes

std::vector<int> ALTIUM_PCB::m_altiumToKicadNetcodes
private

◆ m_board

◆ m_components

std::vector<FOOTPRINT*> ALTIUM_PCB::m_components
private

◆ m_doneCount

unsigned ALTIUM_PCB::m_doneCount
private

Definition at line 378 of file altium_pcb.h.

Referenced by ALTIUM_PCB(), and checkpoint().

◆ m_EmbeddedModels

std::map<wxString, ALTIUM_EMBEDDED_MODEL_DATA> ALTIUM_PCB::m_EmbeddedModels
private

Definition at line 363 of file altium_pcb.h.

Referenced by ParseComponentsBodies6Data(), and ParseModelsData().

◆ m_extendedPrimitiveInformationMaps

std::map<ALTIUM_RECORD, std::multimap<int, const AEXTENDED_PRIMITIVE_INFORMATION> > ALTIUM_PCB::m_extendedPrimitiveInformationMaps
private

◆ m_footprintName

wxString ALTIUM_PCB::m_footprintName
private

for footprint library loading error reporting

Definition at line 383 of file altium_pcb.h.

Referenced by ALTIUM_PCB(), ConvertPads6ToFootprintItemOnCopper(), ConvertPads6ToFootprintItemOnNonCopper(), and ConvertShapeBasedRegions6ToFootprintItem().

◆ m_highest_pour_index

int ALTIUM_PCB::m_highest_pour_index
private

Altium stores pour order across all layers.

Definition at line 386 of file altium_pcb.h.

Referenced by ALTIUM_PCB(), Parse(), and ParsePolygons6Data().

◆ m_lastProgressCount

unsigned ALTIUM_PCB::m_lastProgressCount
private

Definition at line 379 of file altium_pcb.h.

Referenced by ALTIUM_PCB(), and checkpoint().

◆ m_layermap

◆ m_layerMappingHandler

LAYER_MAPPING_HANDLER ALTIUM_PCB::m_layerMappingHandler
private

Definition at line 374 of file altium_pcb.h.

Referenced by ALTIUM_PCB(), and remapUnsureLayers().

◆ m_layerNames

std::map<ALTIUM_LAYER, wxString> ALTIUM_PCB::m_layerNames
private

Definition at line 360 of file altium_pcb.h.

Referenced by remapUnsureLayers().

◆ m_library

wxString ALTIUM_PCB::m_library
private

for footprint library loading error reporting

Definition at line 382 of file altium_pcb.h.

Referenced by ALTIUM_PCB(), ConvertPads6ToFootprintItemOnCopper(), ConvertPads6ToFootprintItemOnNonCopper(), and ConvertShapeBasedRegions6ToFootprintItem().

◆ m_outer_plane

std::map<ALTIUM_LAYER, ZONE*> ALTIUM_PCB::m_outer_plane
private

Definition at line 372 of file altium_pcb.h.

Referenced by Parse(), and ParsePolygons6Data().

◆ m_padstackLayerIndex

std::map<PCB_LAYER_ID, int> ALTIUM_PCB::m_padstackLayerIndex
private

Definition at line 361 of file altium_pcb.h.

Referenced by HelperBuildPadstackLayerIndex(), and HelperGetPadstackLayerIndex().

◆ m_polygons

std::vector<ZONE*> ALTIUM_PCB::m_polygons
private

◆ m_progressReporter

◆ m_radialDimensions

std::vector<PCB_DIM_RADIAL*> ALTIUM_PCB::m_radialDimensions
private

Definition at line 355 of file altium_pcb.h.

Referenced by HelperParseDimensions6Radial(), and Parse().

◆ m_reporter

◆ m_rules

std::map<ALTIUM_RULE_KIND, std::vector<ARULE6> > ALTIUM_PCB::m_rules
private

Definition at line 364 of file altium_pcb.h.

Referenced by GetRule(), GetRuleDefault(), GetRuleForPolygon(), and ParseRules6Data().

◆ m_schematicNetNames

std::map<wxString, wxString> ALTIUM_PCB::m_schematicNetNames
private

Definition at line 358 of file altium_pcb.h.

Referenced by MapSchematicNetNames(), and SchematicCasedNetName().

◆ m_totalCount

unsigned ALTIUM_PCB::m_totalCount
private

for progress reporting

Definition at line 380 of file altium_pcb.h.

Referenced by ALTIUM_PCB(), checkpoint(), and Parse().

◆ m_tuningUnions

std::vector<ASMARTUNION6> ALTIUM_PCB::m_tuningUnions
private

Definition at line 368 of file altium_pcb.h.

Referenced by HelperCreateTuningPatterns(), and ParseSmartUnions6Data().

◆ m_unicodeStrings

std::map<uint32_t, wxString> ALTIUM_PCB::m_unicodeStrings
private

Definition at line 356 of file altium_pcb.h.

Referenced by ParseFootprint(), ParseTexts6Data(), and ParseWideStrings6Data().

◆ m_unionNames

std::map<uint32_t, wxString> ALTIUM_PCB::m_unionNames
private

Definition at line 369 of file altium_pcb.h.

Referenced by HelperCreateTuningPatterns(), and ParseUnionNamesData().

◆ m_unionToBoardItems

std::map<int, std::vector<BOARD_ITEM*> > ALTIUM_PCB::m_unionToBoardItems
private

The documentation for this class was generated from the following files: