|
KiCad PCB EDA Suite
|
Test suite for import of Altium PCB files. More...
#include <pcbnew_utils/board_test_utils.h>#include <pcbnew_utils/board_file_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew/pcb_io/altium/pcb_io_altium_designer.h>#include <pcbnew/pcb_io/altium/pcb_io_altium_circuit_studio.h>#include <pcbnew/pcb_io/altium/altium_pcb.h>#include <pcbnew/pcb_io/altium/altium_pcb_compound_file.h>#include <pcbnew/pcb_io/altium/altium_parser_pcb.h>#include <base_units.h>#include <compoundfilereader.h>#include <board.h>#include <board_design_settings.h>#include <footprint.h>#include <board_stackup_manager/board_stackup.h>#include <common.h>#include <core/utf8.h>#include <eda_text.h>#include <embedded_files.h>#include <ki_exception.h>#include <netinfo.h>#include <netclass.h>#include <pad.h>#include <pcb_track.h>#include <pcb_shape.h>#include <pcb_generator.h>#include <generators/pcb_tuning_pattern.h>#include <geometry/shape_line_chain.h>#include <project.h>#include <pcb_text.h>#include <project/net_settings.h>#include <settings/settings_manager.h>#include <zone.h>#include <algorithm>#include <cmath>#include <cstring>#include <map>#include <set>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | ALTIUM_PCB_IMPORT_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (NetCodeRejectsIdPastEnd) | |
| BOOST_AUTO_TEST_CASE (DimensionBoldPropertyParsing) | |
| BOOST_AUTO_TEST_CASE (FootprintMountingStyleDerivedFromPads) | |
| BOOST_AUTO_TEST_CASE (ArcMaskExpansionUsesArcMetadata) | |
| BOOST_AUTO_TEST_CASE (ConnectedFullCircleArcPreservesRingGeometry) | |
| BOOST_AUTO_TEST_CASE (BoardLoadNoAssertions) | |
| Test basic board loading - verifies that the Altium import doesn't trigger any assertions during the load process. | |
| BOOST_AUTO_TEST_CASE (CachedLibraryFootprintsAreOwnedCopies) | |
| BOOST_AUTO_TEST_CASE (UnusedInternalPlanesNotMapped) | |
| Altium emits metadata for all 16 legacy internal-plane slots even when most are absent from the physical stackup. | |
| BOOST_AUTO_TEST_CASE (KeepoutRestrictionsImpliedByLayer) | |
| Altium leaves the keepout restriction mask empty when the layer already says what a primitive does, so the mask has to be substituted from the layer. | |
| BOOST_AUTO_TEST_CASE (ExplicitKeepoutRestrictionMaskIsRead) | |
| A shape-based region stores its restriction mask under the property key KEEPOUTRESTRICTIONS. | |
| BOOST_AUTO_TEST_CASE (NetclassAssignment) | |
| Test that netclass pattern assignments result in direct netclass assignments on nets. | |
| BOOST_AUTO_TEST_CASE (UnnamedNetPlaceholderAvoidsCollisions) | |
| Altium nets can be nameless. | |
| BOOST_AUTO_TEST_CASE (RulesPopulateNetclasses) | |
| Altium keeps its preferred track width, via size and clearance in design rules rather than in the design settings. | |
| BOOST_AUTO_TEST_CASE (UnresolvedNetclassRulesAreReported) | |
| An Altium design can keep a rule for a netclass it no longer defines, and the constraint is then lost with nothing to show for it. | |
| BOOST_AUTO_TEST_CASE (NetclassRulePriority) | |
| Altium allows several rules of one kind to target the same netclass and resolves them by priority, where 1 is the most specific. | |
| static void | checkAllCopperFillZonesHaveClearance (PCB_IO_ALTIUM_DESIGNER &aPlugin, const std::string &aRelativePath) |
| Verify that copper zones in imported Altium boards have non-zero local clearance values derived from rules whose scope expressions match polygons. | |
| BOOST_AUTO_TEST_CASE (ZoneClearances_eDP) | |
| BOOST_AUTO_TEST_CASE (ZoneClearances_HiFive) | |
| BOOST_AUTO_TEST_CASE (ScopeExprMatchesPolygon) | |
| Test altiumScopeExprMatchesPolygon utility function. | |
| BOOST_AUTO_TEST_CASE (SelectAltiumPolygonRule_PriorityOrder) | |
| Verify selectAltiumPolygonRule honours Altium priority order (1 = highest). | |
| BOOST_AUTO_TEST_CASE (Via_HoleReferencedMaskTenting) | |
| Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24458. | |
| BOOST_AUTO_TEST_CASE (SlotDrillDimensionsSurviveUnsupportedRotation) | |
| BOOST_AUTO_TEST_CASE (StackupDielectricLossTangent) | |
| Verify that the dielectric loss tangent is imported from the modern Altium physical stackup (LAYER_V8_/V9_STACK_LAYER keys). | |
| BOOST_AUTO_TEST_CASE (ProjectParametersToTextVars) | |
| Test that Altium project parameters (special strings) are imported as KiCad project text variables so that board text such as ".PCB_Revision" resolves to its value. | |
| BOOST_AUTO_TEST_CASE (ProjectParametersPreserveExisting) | |
| Test that importing project parameters does not overwrite text variables that already exist on the project, and that names reserved for KiCad's contextual resolution are not imported. | |
| BOOST_AUTO_TEST_CASE (CopperAndMaskTextCoincide) | |
| Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24504. | |
| BOOST_AUTO_TEST_CASE (LengthTuningPatterns) | |
| Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24654. | |
| BOOST_AUTO_TEST_CASE (LengthTuningPatternsAreSelectable) | |
| Follow-up to https://gitlab.com/kicad/code/kicad/-/issues/24654. | |
| BOOST_AUTO_TEST_CASE (Issue24847_FootprintKeepoutPlacement) | |
| BOOST_AUTO_TEST_CASE (RegionSolderMaskExpansion) | |
| BOOST_AUTO_TEST_CASE (ComponentCopperRegionNets) | |
| BOOST_AUTO_TEST_CASE (ComponentCopperRegionOrientation) | |
| Component copper regions become custom pads whose primitives are built in board coordinates, but a PAD defaults to its footprint's angle and serializes the footprint-relative one, so the geometry is rotated twice unless the absolute orientation is forced to zero. | |
| static void | checkImportedOriginOffset (PCB_IO_ALTIUM_DESIGNER &aPlugin, const std::string &aRelativePath, double aExpectedXmm, double aExpectedYmm) |
| BOOST_AUTO_TEST_CASE (RelativeOriginNotSheetCorner) | |
| BOOST_AUTO_TEST_CASE (SharedComponentBodyModelEmbeddedOnce) | |
| BOOST_AUTO_TEST_CASE (PolygonVertexOutsideCoordinateRangeIsDiscarded) | |
| BOOST_AUTO_TEST_CASE (NetNamesTakeSchematicCase) | |
| Altium net names are not case sensitive, so board and schematic may spell the same net differently. | |
Test suite for import of Altium PCB files.
Definition in file test_altium_pcb_import.cpp.
| BOOST_AUTO_TEST_CASE | ( | ArcMaskExpansionUsesArcMetadata | ) |
Definition at line 205 of file test_altium_pcb_import.cpp.
References ARC, B_Paste, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOTTOM_LAYER, F_Paste, ALTIUM_COMPOUND_FILE::FindStream(), KI_TEST::GetPcbnewTestDataDir(), pcbIUScale, and TOP_LAYER.
| BOOST_AUTO_TEST_CASE | ( | BoardLoadNoAssertions | ) |
Test basic board loading - verifies that the Altium import doesn't trigger any assertions during the load process.
This catches regressions in layer mapping and other import issues.
Definition at line 308 of file test_altium_pcb_import.cpp.
References BOOST_REQUIRE(), and KI_TEST::GetPcbnewTestDataDir().
| BOOST_AUTO_TEST_CASE | ( | CachedLibraryFootprintsAreOwnedCopies | ) |
Definition at line 326 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and KI_TEST::GetPcbnewTestDataDir().
| BOOST_AUTO_TEST_CASE | ( | ComponentCopperRegionNets | ) |
Definition at line 1409 of file test_altium_pcb_import.cpp.
References B_Cu, CUSTOM, F_Cu, KI_TEST::GetPcbnewTestDataDir(), and pad.
| BOOST_AUTO_TEST_CASE | ( | ComponentCopperRegionOrientation | ) |
Component copper regions become custom pads whose primitives are built in board coordinates, but a PAD defaults to its footprint's angle and serializes the footprint-relative one, so the geometry is rotated twice unless the absolute orientation is forced to zero.
Definition at line 1448 of file test_altium_pcb_import.cpp.
References EDA_ANGLE::AsDegrees(), B_Cu, CUSTOM, F_Cu, KI_TEST::GetPcbnewTestDataDir(), EDA_ANGLE::IsZero(), EDA_ANGLE::Normalize(), and pad.
| BOOST_AUTO_TEST_CASE | ( | ConnectedFullCircleArcPreservesRingGeometry | ) |
Definition at line 236 of file test_altium_pcb_import.cpp.
References std::abs(), ALTIUM_COMPONENT_NONE, ALTIUM_POLYGON_NONE, ARC, BOOST_CHECK_EQUAL(), BOARD::Drawings(), F_Cu, PCB_ARC_T, pcbIUScale, TOP_LAYER, BOARD::Tracks(), and UNKNOWN.
| BOOST_AUTO_TEST_CASE | ( | CopperAndMaskTextCoincide | ) |
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24504.
The Fastino board places several labels as a coincident pair of free strings, one on a copper layer and one on the matching soldermask layer. Altium auto-sizes each string's bounding box from its own rasterizer and may store a different box width (and stroke width) for the two copies, so anchoring the imported KiCad text to that per-record box width pushed the copper and mask copies apart. Verify that every copper-layer free string that has a matching soldermask free string (same text, mirroring and rotation) is imported to the same position.
Definition at line 1076 of file test_altium_pcb_import.cpp.
References std::abs(), B_Mask, BOOST_REQUIRE(), delta, F_Mask, KI_TEST::GetPcbnewTestDataDir(), IsCopperLayer(), PCB_TEXT_T, and text.
| BOOST_AUTO_TEST_CASE | ( | DimensionBoldPropertyParsing | ) |
Definition at line 143 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::HasParsingError(), pcbIUScale, ADIMENSION6::textbold, and ADIMENSION6::textlinewidth.
| BOOST_AUTO_TEST_CASE | ( | ExplicitKeepoutRestrictionMaskIsRead | ) |
A shape-based region stores its restriction mask under the property key KEEPOUTRESTRICTIONS.
The importer used to read a truncated spelling which never matched, so every keepout region fell back to the all-restrictions default. Fastino's regions carry 17, which is vias plus through-hole pads; KiCad only has a combined pad restriction, so the through-hole bit alone cannot be represented and vias are the only restriction that survives.
Definition at line 442 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and KI_TEST::GetPcbnewTestDataDir().
| BOOST_AUTO_TEST_CASE | ( | FootprintMountingStyleDerivedFromPads | ) |
Definition at line 171 of file test_altium_pcb_import.cpp.
References actual, BOOST_REQUIRE(), expected, FP_SMD, FP_THROUGH_HOLE, and KI_TEST::GetPcbnewTestDataDir().
| BOOST_AUTO_TEST_CASE | ( | Issue24847_FootprintKeepoutPlacement | ) |
Definition at line 1308 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), KI_TEST::GetPcbnewTestDataDir(), pcbIUScale, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | KeepoutRestrictionsImpliedByLayer | ) |
Altium leaves the keepout restriction mask empty when the layer already says what a primitive does, so the mask has to be substituted from the layer.
An internal plane is negative and anything drawn on it takes copper away; the Keep-Out layer keeps everything out. eDP_adapter carries both kinds and no explicit mask, so importing the raw zero produced rule areas which restricted nothing.
Definition at line 400 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and KI_TEST::GetPcbnewTestDataDir().
| BOOST_AUTO_TEST_CASE | ( | LengthTuningPatterns | ) |
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24654.
Altium stores interactive length-tuning meanders as committed tracks and arcs plus a parametric definition in the SmartUnions stream, referenced from each primitive by a union index. The importer used to drop the SmartUnions stream, so a converted board kept the tuned copper but lost the editable length-tuning tool. Verify that the Coil sample rebuilds its eight tuning patterns (four single-track, four differential-pair) as PCB_TUNING_PATTERN generators wrapping the imported copper.
Definition at line 1153 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), DIFF_PAIR, PCB_GROUP::GetBoardItems(), PCB_TUNING_PATTERN::GetMaxAmplitude(), EDA_GROUP::GetName(), KI_TEST::GetPcbnewTestDataDir(), PCB_TUNING_PATTERN::GetSpacing(), PCB_TUNING_PATTERN::GetTuningMode(), PCB_ARC_T, PCB_TRACE_T, and SINGLE.
| BOOST_AUTO_TEST_CASE | ( | LengthTuningPatternsAreSelectable | ) |
Follow-up to https://gitlab.com/kicad/code/kicad/-/issues/24654.
A generator's members are never selectable in their own right, so the tuning pattern itself has to be hittable. Its outline – and with it the bounding box and the point hit test – is derived entirely from the baseline, which the importer left empty: the imported meanders became unselectable and un-editable. Altium keeps the un-meandered route in the SmartUnions LINE/ LINEOTHER properties, so verify every imported pattern carries it and can be picked on it.
Definition at line 1240 of file test_altium_pcb_import.cpp.
References SHAPE_LINE_CHAIN::BBox(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SHAPE_LINE_CHAIN::CLastPoint(), BOX2< Vec >::Contains(), SHAPE_LINE_CHAIN::CPoint(), DIFF_PAIR, PCB_TUNING_PATTERN::GetBaseLine(), PCB_TUNING_PATTERN::GetBaseLineCoupled(), PCB_GROUP::GetBoardItems(), PCB_TUNING_PATTERN::GetBoundingBox(), PCB_TUNING_PATTERN::GetDiffPairGap(), PCB_TUNING_PATTERN::GetEnd(), PCB_TUNING_PATTERN::GetLastNetName(), KI_TEST::GetPcbnewTestDataDir(), PCB_GENERATOR::GetPosition(), PCB_TUNING_PATTERN::GetTuningMode(), PCB_TUNING_PATTERN::HitTest(), and SHAPE_LINE_CHAIN::PointCount().
| BOOST_AUTO_TEST_CASE | ( | NetclassAssignment | ) |
Test that netclass pattern assignments result in direct netclass assignments on nets.
This is a regression test for https://gitlab.com/kicad/code/kicad/-/issues/15584
Validates that when an Altium board with netclasses is imported, the nets are directly assigned to their netclasses (not just through pattern resolution).
Definition at line 478 of file test_altium_pcb_import.cpp.
References BOOST_REQUIRE(), NETCLASS::Default, NETCLASS::GetName(), and KI_TEST::GetPcbnewTestDataDir().
| BOOST_AUTO_TEST_CASE | ( | NetclassRulePriority | ) |
Altium allows several rules of one kind to target the same netclass and resolves them by priority, where 1 is the most specific.
Disabled rules never apply, and a rule is only about one netclass when its second scope is unrestricted.
Definition at line 645 of file test_altium_pcb_import.cpp.
References ApplyAltiumNetclassRules(), BOOST_CHECK_EQUAL(), ARULE6::enabled, BOARD::GetDesignSettings(), ARULE6::kind, BOARD_DESIGN_SETTINGS::m_NetSettings, ARULE6::preferredWidth, ARULE6::priority, ARULE6::scope1expr, ARULE6::scope2expr, NET_SETTINGS::SetNetclass(), and WIDTH.
| BOOST_AUTO_TEST_CASE | ( | NetCodeRejectsIdPastEnd | ) |
Definition at line 128 of file test_altium_pcb_import.cpp.
References ALTIUM_NET_UNCONNECTED, BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), and NETINFO_LIST::UNCONNECTED.
| BOOST_AUTO_TEST_CASE | ( | NetNamesTakeSchematicCase | ) |
Altium net names are not case sensitive, so board and schematic may spell the same net differently.
A project import must take the schematic casing. A board imported alone must keep the names stored in the file.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/25374
Definition at line 1641 of file test_altium_pcb_import.cpp.
References KI_TEST::GetPcbnewTestDataDir(), and PCB_IO::LoadBoard().
| BOOST_AUTO_TEST_CASE | ( | PolygonVertexOutsideCoordinateRangeIsDiscarded | ) |
Definition at line 1589 of file test_altium_pcb_import.cpp.
References altium_parse_polygons(), BOOST_CHECK_EQUAL(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetWidth(), and BOX2< Vec >::Merge().
| BOOST_AUTO_TEST_CASE | ( | ProjectParametersPreserveExisting | ) |
Test that importing project parameters does not overwrite text variables that already exist on the project, and that names reserved for KiCad's contextual resolution are not imported.
Definition at line 1042 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), KI_TEST::GetPcbnewTestDataDir(), SETTINGS_MANAGER::LoadProject(), SETTINGS_MANAGER::Prj(), and project.
| BOOST_AUTO_TEST_CASE | ( | ProjectParametersToTextVars | ) |
Test that Altium project parameters (special strings) are imported as KiCad project text variables so that board text such as ".PCB_Revision" resolves to its value.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24455
Definition at line 983 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), ExpandTextVars(), KI_TEST::GetPcbnewTestDataDir(), INTERNAL, SETTINGS_MANAGER::LoadProject(), SETTINGS_MANAGER::Prj(), project, and text.
| BOOST_AUTO_TEST_CASE | ( | RegionSolderMaskExpansion | ) |
Definition at line 1354 of file test_altium_pcb_import.cpp.
References SHAPE_POLY_SET::BooleanSubtract(), BOOST_REQUIRE(), SHAPE_POLY_SET::CloneDropTriangulation(), F_Cu, F_Mask, PCB_SHAPE::GetLayer(), KI_TEST::GetPcbnewTestDataDir(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetShape(), SHAPE_POLY_SET::IsEmpty(), PCB_SHAPE_T, and POLY.
| BOOST_AUTO_TEST_CASE | ( | RelativeOriginNotSheetCorner | ) |
Definition at line 1529 of file test_altium_pcb_import.cpp.
References checkImportedOriginOffset().
| BOOST_AUTO_TEST_CASE | ( | RulesPopulateNetclasses | ) |
Altium keeps its preferred track width, via size and clearance in design rules rather than in the design settings.
Fastino_Ground_Isolator.PcbDoc carries an All/All Width rule of 11.811mil and RoutingVias of 23.622mil/11.811mil, plus a Width rule of 13.7795mil scoped to the '50R' netclass.
Definition at line 578 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), and pcbIUScale.
| BOOST_AUTO_TEST_CASE | ( | ScopeExprMatchesPolygon | ) |
Test altiumScopeExprMatchesPolygon utility function.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/18408
Validates that the scope expression matching correctly identifies polygon-related Altium rule scope expressions used for zone clearance rules.
Definition at line 749 of file test_altium_pcb_import.cpp.
References altiumScopeExprMatchesPolygon().
| BOOST_AUTO_TEST_CASE | ( | SelectAltiumPolygonRule_PriorityOrder | ) |
Verify selectAltiumPolygonRule honours Altium priority order (1 = highest).
Regression guard for selecting a less-specific polygon rule when multiple polygon-scoped rules exist alongside default (All/All) rules.
Definition at line 781 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), ARULE6::clearanceGap, ARULE6::priority, ARULE6::scope1expr, ARULE6::scope2expr, and selectAltiumPolygonRule().
| BOOST_AUTO_TEST_CASE | ( | SharedComponentBodyModelEmbeddedOnce | ) |
Definition at line 1545 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), EMBEDDED_FILES::EmbeddedFileMap(), FOOTPRINT::GetEmbeddedFiles(), KI_TEST::GetPcbnewTestDataDir(), EMBEDDED_FILES::EMBEDDED_FILE::MODEL, model, and FOOTPRINT::Models().
| BOOST_AUTO_TEST_CASE | ( | SlotDrillDimensionsSurviveUnsupportedRotation | ) |
Definition at line 901 of file test_altium_pcb_import.cpp.
References altiumSlotDrillSize(), and BOOST_CHECK_EQUAL().
| BOOST_AUTO_TEST_CASE | ( | StackupDielectricLossTangent | ) |
Verify that the dielectric loss tangent is imported from the modern Altium physical stackup (LAYER_V8_/V9_STACK_LAYER keys).
The legacy LAYER<n> records used to build the stackup do not carry the loss tangent, so it must be backfilled from the modern keys.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24456
Definition at line 923 of file test_altium_pcb_import.cpp.
References BOOST_REQUIRE(), BS_ITEM_TYPE_DIELECTRIC, BOARD_STACKUP::GetList(), KI_TEST::GetPcbnewTestDataDir(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), and BOARD_DESIGN_SETTINGS::m_HasStackup.
| BOOST_AUTO_TEST_CASE | ( | UnnamedNetPlaceholderAvoidsCollisions | ) |
Altium nets can be nameless.
NETINFO_LIST keys nets by name and the unconnected net owns the empty string, so the importer substitutes a placeholder. That placeholder must not land on a name the board already uses, or the two nets are merged.
Definition at line 550 of file test_altium_pcb_import.cpp.
References AltiumUnnamedNetName(), APPEND, and BOOST_CHECK_EQUAL().
| BOOST_AUTO_TEST_CASE | ( | UnresolvedNetclassRulesAreReported | ) |
An Altium design can keep a rule for a netclass it no longer defines, and the constraint is then lost with nothing to show for it.
HiFive1.B01.PcbDoc carries a Width rule scoped to InNetClass('PWR') but declares no such netclass, while Fastino_Ground_Isolator.PcbDoc resolves every netclass its rules name and so must stay quiet.
Definition at line 607 of file test_altium_pcb_import.cpp.
References BOOST_CHECK_EQUAL(), KI_TEST::GetPcbnewTestDataDir(), and reporter.
| BOOST_AUTO_TEST_CASE | ( | UnusedInternalPlanesNotMapped | ) |
Altium emits metadata for all 16 legacy internal-plane slots even when most are absent from the physical stackup.
Only active planes should be offered to the layer mapper; otherwise every unused slot produces a misleading warning during command-line imports.
Definition at line 362 of file test_altium_pcb_import.cpp.
References BOOST_REQUIRE(), PCB_IO_ALTIUM_DESIGNER::DefaultLayerMappingCallback(), KI_TEST::GetPcbnewTestDataDir(), and name.
| BOOST_AUTO_TEST_CASE | ( | Via_HoleReferencedMaskTenting | ) |
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24458.
The Fastino board references every via's solder mask expansion from the hole edge. KiCad vias cannot represent a hole-referenced opening, so when the resulting opening does not clear the via land the importer must tent the side instead of leaving the copper exposed. Before the fix these vias were imported untented, so verify the imported board tents both sides of every via.
This is the same board used by the issue 24456 stackup test.
Definition at line 841 of file test_altium_pcb_import.cpp.
References altiumViaSideIsTented(), BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), PCB_VIA_T, TENTED, and via.
| BOOST_AUTO_TEST_CASE | ( | ZoneClearances_eDP | ) |
Definition at line 728 of file test_altium_pcb_import.cpp.
References checkAllCopperFillZonesHaveClearance().
| BOOST_AUTO_TEST_CASE | ( | ZoneClearances_HiFive | ) |
Definition at line 735 of file test_altium_pcb_import.cpp.
References checkAllCopperFillZonesHaveClearance().
|
static |
Verify that copper zones in imported Altium boards have non-zero local clearance values derived from rules whose scope expressions match polygons.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/18408
Definition at line 696 of file test_altium_pcb_import.cpp.
References BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), and PCB_IO::LoadBoard().
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 1490 of file test_altium_pcb_import.cpp.
References std::abs(), BOOST_REQUIRE(), BOX2< Vec >::GetArea(), BOARD_DESIGN_SETTINGS::GetAuxOrigin(), BOARD_DESIGN_SETTINGS::GetGridOrigin(), BOX2< Vec >::GetLeft(), KI_TEST::GetPcbnewTestDataDir(), BOX2< Vec >::GetTop(), PCB_IO::LoadBoard(), pcbIUScale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE().