|
KiCad PCB EDA Suite
|
#include "altium_pcb.h"#include "altium_parser_pcb.h"#include <altium_pcb_compound_file.h>#include <io/altium/altium_ascii_parser.h>#include <io/altium/altium_binary_parser.h>#include <io/altium/altium_parser_utils.h>#include <io/altium/altium_props_utils.h>#include <io/io_utils.h>#include <io/altium/altium_project_variants.h>#include <board.h>#include <board_design_settings.h>#include <project/net_settings.h>#include <footprint.h>#include <layer_range.h>#include <pcb_dimension.h>#include <pad.h>#include <pcb_shape.h>#include <pcb_text.h>#include <pcb_textbox.h>#include <pcb_track.h>#include <pcb_barcode.h>#include <pcb_generator.h>#include <generators_mgr.h>#include <generators/pcb_tuning_pattern.h>#include <router/pns_meander.h>#include <geometry/shape_line_chain.h>#include <core/profile.h>#include <string_utils.h>#include <tools/pad_tool.h>#include <zone.h>#include <board_stackup_manager/stackup_predefined_prms.h>#include <cmath>#include <set>#include <advanced_config.h>#include <compoundfilereader.h>#include <convert_basic_shapes_to_polygon.h>#include <font/outline_font.h>#include <project.h>#include <reporter.h>#include <trigo.h>#include <utf.h>#include <wx/docview.h>#include <wx/log.h>#include <wx/mstream.h>#include <wx/wfstream.h>#include <wx/zstream.h>#include <progress_reporter.h>#include <magic_enum.hpp>#include <thread_pool.h>Go to the source code of this file.
Functions | |
| bool | IsAltiumLayerCopper (ALTIUM_LAYER aLayer) |
| bool | IsAltiumLayerAPlane (ALTIUM_LAYER aLayer) |
| wxString | AltiumUnnamedNetName (const BOARD &aBoard, int &aCounter) |
| Invent a placeholder name for an Altium net that has none. | |
| static bool | IsAltiumScopeAll (const wxString &aExpr) |
| static bool | GetAltiumNetclassScopeName (const ARULE6 &aRule, wxString *aNetclassName) |
| void | ApplyAltiumNetclassRules (const std::map< ALTIUM_RULE_KIND, std::vector< ARULE6 > > &aRulesByKind, NET_SETTINGS &aNetSettings, std::vector< const ARULE6 * > *aUnresolved) |
| Copy the values of Altium rules scoped to a single netclass onto that netclass. | |
| void | HelperShapeLineChainFromAltiumVertices (SHAPE_LINE_CHAIN &aLine, const std::vector< ALTIUM_VERTICE > &aVertices) |
| static bool | IsLayerNameCourtyard (const wxString &aName) |
| static bool | IsLayerNameAssembly (const wxString &aName) |
| static bool | IsLayerNameTopSide (const wxString &aName) |
| double | normalizeAngleDegrees (double Angle, double aMin, double aMax) |
| Normalize angle to be aMin < angle <= aMax angle is in degrees. | |
| static void | altiumCollectSchematicNetNames (const wxString &aFileName, std::map< wxString, wxString > &aNames, std::set< wxString > &aAmbiguous) |
Variables | |
| constexpr double | BOLD_FACTOR = 1.75 |
| constexpr int | ALTIUM_TOP_PADSTACK_IDX = 0 |
| constexpr int | ALTIUM_MID1_PADSTACK_IDX = 1 |
| constexpr int | ALTIUM_MID2_PADSTACK_IDX = 2 |
| constexpr int | ALTIUM_BOTTOM_PADSTACK_IDX = 31 |
| constexpr int | ALTIUM_PADSTACK_IDX_COUNT = 32 |
|
static |
Definition at line 2530 of file altium_pcb.cpp.
References ALTIUM_ASCII_PARSER::CanRead(), IO_UTILS::COMPOUND_FILE_HEADER, IO_UTILS::fileHasBinaryHeader(), ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), name, ALTIUM_PROPS_UTILS::ReadInt(), ALTIUM_ASCII_PARSER::ReadProperties(), ALTIUM_BINARY_PARSER::ReadProperties(), and ALTIUM_PROPS_UTILS::ReadString().
Referenced by ALTIUM_PCB::MapSchematicNetNames().
| wxString AltiumUnnamedNetName | ( | const BOARD & | aBoard, |
| int & | aCounter ) |
Invent a placeholder name for an Altium net that has none.
NETINFO_LIST keys nets by name and the unconnected net owns the empty string, so a nameless net has to be given one or it is merged into another net. aCounter is advanced past every candidate that is already taken on aBoard.
Definition at line 99 of file altium_pcb.cpp.
References BOARD::FindNet(), and name.
Referenced by BOOST_AUTO_TEST_CASE(), and ALTIUM_PCB::ParseNets6Data().
| void ApplyAltiumNetclassRules | ( | const std::map< ALTIUM_RULE_KIND, std::vector< ARULE6 > > & | aRulesByKind, |
| NET_SETTINGS & | aNetSettings, | ||
| std::vector< const ARULE6 * > * | aUnresolved = nullptr ) |
Copy the values of Altium rules scoped to a single netclass onto that netclass.
Only rules of the form InNetClass('<name>') against All are considered, and only for the clearance, width and routing-via kinds. Each vector in aRulesByKind must be sorted by ARULE6::priority ascending; the first enabled match for a netclass wins, because Altium priority 1 is the most specific. Disabled rules are skipped.
aUnresolved, when given, collects the rules that name a netclass the board does not define. Those constraints are lost, and the pointers alias aRulesByKind.
Definition at line 136 of file altium_pcb.cpp.
References CLEARANCE, GetAltiumNetclassScopeName(), NET_SETTINGS::GetNetclasses(), ROUTING_VIAS, and WIDTH.
Referenced by BOOST_AUTO_TEST_CASE(), and ALTIUM_PCB::ParseRules6Data().
|
static |
Definition at line 119 of file altium_pcb.cpp.
References IsAltiumScopeAll(), ARULE6::scope1expr, and ARULE6::scope2expr.
Referenced by ApplyAltiumNetclassRules(), and ALTIUM_PCB::ParseRules6Data().
| void HelperShapeLineChainFromAltiumVertices | ( | SHAPE_LINE_CHAIN & | aLine, |
| const std::vector< ALTIUM_VERTICE > & | aVertices ) |
Definition at line 259 of file altium_pcb.cpp.
References SHAPE_LINE_CHAIN::Append(), EDA_ANGLE::AsDegrees(), DEG2RAD(), DEGREES_T, VECTOR2< T >::Distance(), KiROUND(), EDA_ANGLE::Normalize(), pcbIUScale, and SHAPE_LINE_CHAIN::SetClosed().
Referenced by ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItem(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItem(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), ALTIUM_PCB::HelperCreateBoardOutline(), and ALTIUM_PCB::ParsePolygons6Data().
| bool IsAltiumLayerAPlane | ( | ALTIUM_LAYER | aLayer | ) |
Definition at line 93 of file altium_pcb.cpp.
References INTERNAL_PLANE_1, and INTERNAL_PLANE_16.
Referenced by ALTIUM_PCB::ConvertArcs6ToBoardItem(), ALTIUM_PCB::ConvertArcs6ToFootprintItem(), ALTIUM_PCB::ConvertPads6ToBoardItem(), ALTIUM_PCB::ConvertPads6ToFootprintItem(), ALTIUM_PCB::ConvertTracks6ToBoardItem(), ALTIUM_PCB::ConvertTracks6ToFootprintItem(), ALTIUM_PCB::HelperGetKeepoutRestrictions(), ALTIUM_PCB::ParseBoard6Data(), ALTIUM_PCB::ParsePolygons6Data(), and ALTIUM_PCB::remapUnsureLayers().
| bool IsAltiumLayerCopper | ( | ALTIUM_LAYER | aLayer | ) |
Definition at line 86 of file altium_pcb.cpp.
References BOTTOM_LAYER, MULTI_LAYER, and TOP_LAYER.
Referenced by ALTIUM_PCB::ConvertFills6ToFootprintItem(), ALTIUM_PCB::ConvertPads6ToBoardItem(), and ALTIUM_PCB::ConvertPads6ToFootprintItem().
|
static |
Definition at line 113 of file altium_pcb.cpp.
Referenced by GetAltiumNetclassScopeName(), and ALTIUM_PCB::GetRuleDefault().
|
static |
Definition at line 1361 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::remapUnsureLayers().
|
static |
Definition at line 1352 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::remapUnsureLayers().
|
static |
Definition at line 1369 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::remapUnsureLayers().
| double normalizeAngleDegrees | ( | double | Angle, |
| double | aMin, | ||
| double | aMax ) |
Normalize angle to be aMin < angle <= aMax angle is in degrees.
Definition at line 1806 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), and ALTIUM_PCB::ParseComponentsBodies6Data().
|
constexpr |
Definition at line 82 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), ALTIUM_PCB::ConvertVias6ToFootprintItem(), and ALTIUM_PCB::ParseVias6Data().
|
constexpr |
Definition at line 80 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), ALTIUM_PCB::ConvertVias6ToFootprintItem(), and ALTIUM_PCB::ParseVias6Data().
|
constexpr |
Definition at line 81 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper().
|
constexpr |
Definition at line 83 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper().
|
constexpr |
Definition at line 79 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::ConvertPads6ToFootprintItemOnCopper(), ALTIUM_PCB::ConvertVias6ToFootprintItem(), and ALTIUM_PCB::ParseVias6Data().
|
constexpr |
Definition at line 76 of file altium_pcb.cpp.
Referenced by ALTIUM_PCB::HelperParseDimensions6Linear(), and ALTIUM_PCB::HelperParseDimensions6Radial().