|
KiCad PCB EDA Suite
|
#include <pcbnew_utils/board_test_utils.h>#include <pcbnew_utils/board_file_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcb_io/pads/pcb_io_pads.h>#include <pcb_io/pads/pads_parser.h>#include <layer_ids.h>#include <padstack.h>#include <board.h>#include <pcb_text.h>#include <pcb_shape.h>#include <pcb_field.h>#include <pad.h>#include <pcb_track.h>#include <footprint.h>#include <zone.h>#include <board_design_settings.h>#include <pcb_dimension.h>#include <project/net_settings.h>#include <board_stackup_manager/board_stackup.h>#include <map>#include <set>Go to the source code of this file.
Classes | |
| struct | PADS_BOARD_INFO |
Functions | |
| static wxString | GetBoardPath (const PADS_BOARD_INFO &aBoard) |
| static std::unique_ptr< BOARD > | LoadAndVerify (const PADS_BOARD_INFO &aBoard) |
| Verify that the PADS file is recognized and loads without crashing. | |
| static void | RunStructuralChecks (const PADS_BOARD_INFO &aBoard) |
| Run structural integrity checks on a successfully loaded board. | |
| BOOST_AUTO_TEST_CASE (ImportClaySight_MK1) | |
| BOOST_AUTO_TEST_CASE (ClaySight_MK1_ElementCounts) | |
| Verify element counts for ClaySight_MK1 (V10.0 BASIC units). | |
| BOOST_AUTO_TEST_CASE (ImportTMS1mmX19) | |
| BOOST_AUTO_TEST_CASE (ImportMC4_PLUS_CSHAPE) | |
| BOOST_AUTO_TEST_CASE (ImportMC2_PLUS_REV1) | |
| BOOST_AUTO_TEST_CASE (ImportEms4_Rev2) | |
| BOOST_AUTO_TEST_CASE (ImportLCORE_4) | |
| BOOST_AUTO_TEST_CASE (ImportLCORE_2) | |
| BOOST_AUTO_TEST_CASE (ImportDexter_MotorCtrl) | |
| BOOST_AUTO_TEST_CASE (ImportMAIS_FC) | |
| BOOST_AUTO_TEST_CASE (ImportNonCopperTrackSkipped) | |
| BOOST_AUTO_TEST_CASE (ImportTextOnUnmappedLayer) | |
| BOOST_AUTO_TEST_CASE (ImportClaySight_MK2) | |
| BOOST_AUTO_TEST_CASE (ClaySight_MK2_ElementCounts) | |
| Verify element counts for ClaySight_MK2 (V10.0 BASIC units, EasyEDA export). | |
| BOOST_AUTO_TEST_CASE (MAIS_FC_Stackup) | |
| Verify stackup is built from LAYER DATA for MAIS_FC (V5.0 BASIC, 2-layer). | |
| BOOST_AUTO_TEST_CASE (ImportDegeneratePourSkipped) | |
| Verify that degenerate pour definitions (PADTHERM/VIATHERM with < 3 points) are skipped without crashing. | |
| BOOST_AUTO_TEST_CASE (ImportFilledCopperSingleOutline) | |
| Verify that filled copper shapes produce zones with exactly one valid outline. | |
| BOOST_AUTO_TEST_CASE (Importer_SpecificFixes) | |
| Verify Importer.asc (V10.0 BASIC, 6-layer) imports correctly. | |
| BOOST_AUTO_TEST_CASE (Peka_ViaImport) | |
| Verify peka.asc (V9.0 BASIC, 4-layer) via import. | |
| BOOST_AUTO_TEST_CASE (Importer_OvalDrillHits) | |
| Verify that U1 pads 1-5 in Importer.asc have oval drill hits. | |
| BOOST_AUTO_TEST_CASE (Peka_AlternateDecalDrill) | |
| Verify M4 pad 1 in peka.asc uses the alternate MTHOLEAAAB decal. | |
| BOOST_AUTO_TEST_CASE (Peka_ZoneFillNoSelfIntersection) | |
| Verify zone fills imported from peka.asc are not self-intersecting. | |
| BOOST_AUTO_TEST_CASE (ImportMaskPasteLayers) | |
| Verify that SMD pads with explicit solder mask and paste mask stack entries are imported with F.Mask and F.Paste layers enabled (issue 23254). | |
| BOOST_AUTO_TEST_CASE (ImportMaskPasteLayersIssue23254) | |
| Smoke test: the reporter's original reproduction file loads and has SMD pads with F.Mask and F.Paste set (issue 23254). | |
| BOOST_AUTO_TEST_CASE (ImportIssue23352) | |
| Verify that the issue23352 demo board imports square pads, per-pad thermal connections, and netclass rules correctly. | |
| BOOST_AUTO_TEST_CASE (Issue23393_NetClassImport) | |
| Verify that net classes inside RULES_SECTION PARENT in the MISC section are parsed and applied correctly. | |
| BOOST_AUTO_TEST_CASE (Issue23612_RouteArcSpansNeighbours) | |
| Verify that a PADS route arc (CW/CCW) is imported as one arc spanning the two neighbouring corners, with no straight remnant. | |
| BOOST_AUTO_TEST_CASE (ImportFingerPadOffsetIssue23425) | |
| Verify RF finger pad offsets are not double-rotated on import (issue #23425). | |
| BOOST_AUTO_TEST_CASE (ImportIssue23391) | |
| Verify padstack import for issue #23391. | |
| BOOST_AUTO_TEST_CASE (InCircuitTestPointImport) | |
| Verify in-circuit test point import (issue 23637). | |
| BOOST_AUTO_TEST_CASE (Issue23856_TextAndPadOrientation) | |
| Issue #23856: PADS PCB import got text and pad details wrong. | |
| BOOST_AUTO_TEST_CASE (Issue23392_ThermalReliefGap) | |
| Verify that RT/ST thermal relief pad-stack entries map the PADS thermal-relief geometry onto KiCad pad overrides (issue #23392): a THERMAL zone connection, a spoke-width override, and, when the relief outer diameter exceeds the pad size, a thermal-gap override derived as (outer - pad_size) / 2. | |
| BOOST_AUTO_TEST_CASE (Issue23241_V5Parts) | |
| Issue 23241: PADS V5.0 part import drops every other part. | |
| BOOST_AUTO_TEST_CASE (Issue23241_V5DecalTerminals) | |
| Issue 23241: verify the V5.0 parser reads decal terminals correctly. | |
| BOOST_AUTO_TEST_CASE (Issue23297_RfPadCornerRadius) | |
| Verify RF (rectangular finger) pads carrying a PADS corner radius import as roundrect rather than plain rectangle (issue 23297). | |
Variables | |
| static const PADS_BOARD_INFO | PADS_BOARDS [] |
| BOOST_AUTO_TEST_CASE | ( | ClaySight_MK1_ElementCounts | ) |
Verify element counts for ClaySight_MK1 (V10.0 BASIC units).
This board is a 2-layer design with 36 components, routed traces on F.Cu and B.Cu, no vias, no copper pours, and a rectangular board outline. Counts are derived from the ASC source file sections.
Definition at line 218 of file test_pads_import.cpp.
References B_Cu, BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), Edge_Cuts, F_Cu, NETINFO_ITEM::GetNetname(), LoadAndVerify(), PADS_BOARDS, PCB_ARC_T, PCB_TRACE_T, and PCB_VIA_T.
| BOOST_AUTO_TEST_CASE | ( | ClaySight_MK2_ElementCounts | ) |
Verify element counts for ClaySight_MK2 (V10.0 BASIC units, EasyEDA export).
EasyEDA exports footprint silkscreen outlines as COPPER type entries on the silkscreen layer in the LINES section. These are imported as silkscreen graphics rather than copper tracks. Route tracks come from SIGNAL sections.
Definition at line 431 of file test_pads_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), Edge_Cuts, F_SilkS, NET_SETTINGS::GetDefaultNetclass(), NETINFO_ITEM::GetNetname(), IsCopperLayer(), LoadAndVerify(), BOARD_DESIGN_SETTINGS::m_CopperEdgeClearance, BOARD_DESIGN_SETTINGS::m_NetSettings, BOARD_DESIGN_SETTINGS::m_ViasDimensionsList, PADS_BOARDS, PCB_ARC_T, PCB_TEXT_T, PCB_TRACE_T, PCB_VIA_T, RECTANGLE, and text.
| BOOST_AUTO_TEST_CASE | ( | ImportClaySight_MK1 | ) |
Definition at line 205 of file test_pads_import.cpp.
References BOOST_AUTO_TEST_CASE(), PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportClaySight_MK2 | ) |
Definition at line 418 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportDegeneratePourSkipped | ) |
Verify that degenerate pour definitions (PADTHERM/VIATHERM with < 3 points) are skipped without crashing.
Before the fix, these created zones with empty SHAPE_LINE_CHAIN outlines which caused a SIGABRT in the renderer's DrawPolyline() when accessing CPoint(0) on a zero-length vector.
Definition at line 607 of file test_pads_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SHAPE_POLY_SET::COutline(), KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), ZONE::Outline(), SHAPE_POLY_SET::OutlineCount(), and SHAPE_LINE_CHAIN::PointCount().
| BOOST_AUTO_TEST_CASE | ( | ImportDexter_MotorCtrl | ) |
Definition at line 342 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportEms4_Rev2 | ) |
Definition at line 324 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | Importer_OvalDrillHits | ) |
Verify that U1 pads 1-5 in Importer.asc have oval drill hits.
The DIOB_D100JHT160V decal's PAD 0 definition includes slotted drill parameters (2250000 x 9000000 BASIC units at 0 degrees). The converter must set PAD_DRILL_SHAPE::OBLONG with the correct major/minor dimensions rather than treating the drill as round.
Definition at line 886 of file test_pads_import.cpp.
References std::abs(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), OBLONG, pad, FOOTPRINT::Pads(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | Importer_SpecificFixes | ) |
Verify Importer.asc (V10.0 BASIC, 6-layer) imports correctly.
This board exercises four specific import scenarios:
Definition at line 668 of file test_pads_import.cpp.
References PADSTACK::ALL_LAYERS, BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), Dwgs_User, end, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), OVAL, pad, FOOTPRINT::Pads(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | ImportFilledCopperSingleOutline | ) |
Verify that filled copper shapes produce zones with exactly one valid outline.
Before the fix, loadCopperShapes() called NewOutline() then Append(SHAPE_LINE_CHAIN), which created two outlines per zone: an empty polygon from NewOutline() and the real one from the implicit SHAPE_LINE_CHAIN->SHAPE_POLY_SET conversion. The empty outline (0 points, but closed) crashed the renderer via CPoint(0) on an empty vector.
Definition at line 641 of file test_pads_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SHAPE_POLY_SET::COutline(), KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), ZONE::Outline(), SHAPE_POLY_SET::OutlineCount(), and SHAPE_LINE_CHAIN::PointCount().
| BOOST_AUTO_TEST_CASE | ( | ImportFingerPadOffsetIssue23425 | ) |
Verify RF finger pad offsets are not double-rotated on import (issue #23425).
The reporter's board ({TXN004} controlCARD docking station) has a 180-pin HSEC8 edge connector (J3) whose finger pads are defined with FINORI 90 and a non-zero FINOFFSET. In PADS, finger_offset runs along the finger's long axis and is stored in the pad-local coordinate system (before rotation). PAD::ShapePos() applies the full pad orientation when computing the shape center, so the importer must NOT pre-rotate the offset vector by layer_def.rotation. Doing so rotated the offset twice, shifting every finger pad sideways and visibly misaligning the connector.
After the fix the stored offset is purely along pad-local X (offset.y == 0); a double rotation by 90 degrees would instead leave offset.x == 0 and put the magnitude on offset.y, which these checks reject.
Definition at line 1499 of file test_pads_import.cpp.
References std::abs(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), F_Cu, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), pad, FOOTPRINT::Pads(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | ImportIssue23352 | ) |
Verify that the issue23352 demo board imports square pads, per-pad thermal connections, and netclass rules correctly.
Definition at line 1245 of file test_pads_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), F_Cu, FULL, NET_SETTINGS::GetNetclasses(), NET_SETTINGS::GetNetclassPatternAssignments(), KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), BOARD_DESIGN_SETTINGS::m_NetSettings, pad, RECTANGLE, and THERMAL.
| BOOST_AUTO_TEST_CASE | ( | ImportIssue23391 | ) |
Verify padstack import for issue #23391.
A padstack whose layer -2 and layer -1 entries share the same shape but have different sizes must use NORMAL mode (not FRONT_INNER_BACK). The primary (layer -2, component-side) size must be preserved, and top-placed and bottom-placed instances of the same footprint must produce identical pad sizes.
A padstack with different shapes on layer -2 and -1 (square pin-1) must still use FRONT_INNER_BACK so the shape difference is preserved.
Definition at line 1569 of file test_pads_import.cpp.
References B_Cu, BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), CIRCLE, F_Cu, PADSTACK::FRONT_INNER_BACK, KI_TEST::GetPcbnewTestDataDir(), PAD::GetShape(), PAD::GetSize(), PCB_IO_PADS::LoadBoard(), PADSTACK::Mode(), PADSTACK::NORMAL, pad, PAD::Padstack(), RECTANGLE, and VECTOR2< T >::x.
| BOOST_AUTO_TEST_CASE | ( | ImportLCORE_2 | ) |
Definition at line 336 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportLCORE_4 | ) |
Definition at line 330 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportMAIS_FC | ) |
Definition at line 348 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportMaskPasteLayers | ) |
Verify that SMD pads with explicit solder mask and paste mask stack entries are imported with F.Mask and F.Paste layers enabled (issue 23254).
synthetic_mask_paste.asc defines four footprints: U1 SMD_WITH_MASK_PASTE - pad stack has explicit layers 21 (F.Mask) and 23 (F.Paste) U2 SMD_WITH_MASK_ONLY - pad stack has explicit layer 21 (F.Mask) only U3 SMD_NO_MASK - pad stack has only copper entries (-2, -1, 0) U4 PTH_WITH_MASK - PTH pad with explicit mask layers
Before the fix, all mask/paste PADS layer entries mapped to UNDEFINED_LAYER via the copper-only mapPadsLayer lambda and were silently dropped, leaving SMD pads with only F.Cu in their layer set.
Definition at line 1112 of file test_pads_import.cpp.
References B_Cu, B_Mask, BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), F_Cu, F_Mask, F_Paste, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), pad, and FOOTPRINT::Pads().
| BOOST_AUTO_TEST_CASE | ( | ImportMaskPasteLayersIssue23254 | ) |
Smoke test: the reporter's original reproduction file loads and has SMD pads with F.Mask and F.Paste set (issue 23254).
Definition at line 1207 of file test_pads_import.cpp.
References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), F_Mask, F_Paste, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), pad, and SMD.
| BOOST_AUTO_TEST_CASE | ( | ImportMC2_PLUS_REV1 | ) |
Definition at line 318 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportMC4_PLUS_CSHAPE | ) |
Definition at line 312 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | ImportNonCopperTrackSkipped | ) |
Definition at line 354 of file test_pads_import.cpp.
References BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), IsCopperLayer(), PCB_IO_PADS::LoadBoard(), PCB_ARC_T, and PCB_TRACE_T.
| BOOST_AUTO_TEST_CASE | ( | ImportTextOnUnmappedLayer | ) |
Definition at line 380 of file test_pads_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Cmts_User, F_Cu, F_SilkS, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), text, and UNDEFINED_LAYER.
| BOOST_AUTO_TEST_CASE | ( | ImportTMS1mmX19 | ) |
Definition at line 306 of file test_pads_import.cpp.
References PADS_BOARDS, and RunStructuralChecks().
| BOOST_AUTO_TEST_CASE | ( | InCircuitTestPointImport | ) |
Verify in-circuit test point import (issue 23637).
In-circuit test points are zero-drill vias placed on a route layer and tagged in the TESTPOINT section. Two bugs existed before the fix:
synthetic_testpoint.asc defines two test point via types: TP_BOTTOM_SMD drill=0, routing-layer pad (layer 0) + soldermask bottom (28) -> SMD footprint on B.Cu, pad ~0.8mm TP_TOP_SMD drill=0, top copper pad (layer -2) + soldermask top (25) -> SMD footprint on F.Cu, pad ~0.8mm
Definition at line 1674 of file test_pads_import.cpp.
References PADSTACK::ALL_LAYERS, B_Cu, BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), F_Cu, KI_TEST::GetPcbnewTestDataDir(), FOOTPRINT::GetPosition(), PCB_IO_PADS::LoadBoard(), pad, FOOTPRINT::Pads(), and via.
| BOOST_AUTO_TEST_CASE | ( | Issue23241_V5DecalTerminals | ) |
Issue 23241: verify the V5.0 parser reads decal terminals correctly.
V5.0 terminal lines have no pin number (4 tokens), while V9+ has a pin number (5 tokens). Both formats must produce valid terminals.
Definition at line 1979 of file test_pads_import.cpp.
References BOOST_CHECK_EQUAL(), PADS_IO::PARSER::GetPartDecals(), KI_TEST::GetPcbnewTestDataDir(), and PADS_IO::PARSER::Parse().
| BOOST_AUTO_TEST_CASE | ( | Issue23241_V5Parts | ) |
Issue 23241: PADS V5.0 part import drops every other part.
V5.0 text/label entries use 2 lines (value + name) while V9+ uses 3 lines (value + font + name). Reading 3 lines per label in V5.0 format consumes the next part's header line, causing alternating parts to be dropped.
Definition at line 1943 of file test_pads_import.cpp.
References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), and PCB_IO_PADS::LoadBoard().
| BOOST_AUTO_TEST_CASE | ( | Issue23297_RfPadCornerRadius | ) |
Verify RF (rectangular finger) pads carrying a PADS corner radius import as roundrect rather than plain rectangle (issue 23297).
R1 (RESC1005X40N) uses "RF 0.000 900000 0 105000": 900000-unit finger, so the roundrect ratio is 105000 / 900000 = 0.1167. D1 (SOT95P280X100-6N) uses "RF 0.000 1650000 0 225000" over an 825000 height, so the ratio is the radius over the shorter side, 225000 / 825000 = 0.2727. Scaling is linear so the ratios are unit-independent.
Definition at line 2018 of file test_pads_import.cpp.
References std::abs(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), expected, F_Cu, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), pad, and ROUNDRECT.
| BOOST_AUTO_TEST_CASE | ( | Issue23392_ThermalReliefGap | ) |
Verify that RT/ST thermal relief pad-stack entries map the PADS thermal-relief geometry onto KiCad pad overrides (issue #23392): a THERMAL zone connection, a spoke-width override, and, when the relief outer diameter exceeds the pad size, a thermal-gap override derived as (outer - pad_size) / 2.
Reliefs whose outer diameter equals the pad size carry no gap and must leave the gap override unset.
Definition at line 1867 of file test_pads_import.cpp.
References std::abs(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), pad, FOOTPRINT::Pads(), and THERMAL.
| BOOST_AUTO_TEST_CASE | ( | Issue23393_NetClassImport | ) |
Verify that net classes inside RULES_SECTION PARENT in the MISC section are parsed and applied correctly.
Issue #23393: NET_CLASS DATA blocks nested inside RULES_SECTION PARENT were not parsed because the brace depth checks were hardcoded instead of relative to the block entry depth.
Definition at line 1368 of file test_pads_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), NET_SETTINGS::GetNetclasses(), NET_SETTINGS::GetNetclassPatternAssignments(), KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), and BOARD_DESIGN_SETTINGS::m_NetSettings.
| BOOST_AUTO_TEST_CASE | ( | Issue23612_RouteArcSpansNeighbours | ) |
Verify that a PADS route arc (CW/CCW) is imported as one arc spanning the two neighbouring corners, with no straight remnant.
Issues #23540 / #23612: a route arc is stored as three corners where the middle corner is the arc center. The arc begins on the preceding corner and ends on the following one. Treating the center corner as an ordinary vertex produced a half-length arc to the center plus a straight track from the center to the pad, so the curved track rendered as two straight lines to the pad.
Definition at line 1423 of file test_pads_import.cpp.
References std::abs(), EDA_ANGLE::AsDegrees(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), end, PCB_ARC::GetAngle(), PCB_TRACK::GetEnd(), PCB_ARC::GetMid(), BOARD_CONNECTED_ITEM::GetNetCode(), KI_TEST::GetPcbnewTestDataDir(), PCB_TRACK::GetStart(), PCB_IO_PADS::LoadBoard(), PCB_ARC_T, PCB_TRACE_T, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | Issue23856_TextAndPadOrientation | ) |
Issue #23856: PADS PCB import got text and pad details wrong.
Definition at line 1773 of file test_pads_import.cpp.
References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), DEGREES_T, F_Cu, F_SilkS, BOARD_ITEM::GetLayer(), KI_TEST::GetPcbnewTestDataDir(), EDA_TEXT::GetText(), IsBackLayer(), EDA_TEXT::IsMirrored(), PCB_IO_PADS::LoadBoard(), OVAL, pad, and RECTANGLE.
| BOOST_AUTO_TEST_CASE | ( | MAIS_FC_Stackup | ) |
Verify stackup is built from LAYER DATA for MAIS_FC (V5.0 BASIC, 2-layer).
MAIS_FC has meaningful stackup data for its 2 copper layers: LAYER_THICKNESS 304800, COPPER_THICKNESS 38100, DIELECTRIC 3.8.
Definition at line 565 of file test_pads_import.cpp.
References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), BS_ITEM_TYPE_COPPER, BS_ITEM_TYPE_DIELECTRIC, BOARD_DESIGN_SETTINGS::GetBoardThickness(), BOARD_STACKUP::GetList(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), LoadAndVerify(), BOARD_DESIGN_SETTINGS::m_HasStackup, and PADS_BOARDS.
| BOOST_AUTO_TEST_CASE | ( | Peka_AlternateDecalDrill | ) |
Verify M4 pad 1 in peka.asc uses the alternate MTHOLEAAAB decal.
The MTHOLE part type has alternate decals separated by colons. M4 has ALT=1 which selects MTHOLEAAAB (250 mil pad, 125 mil circular drill). The converter must resolve through the PARTTYPE section to pick the correct alternate rather than defaulting to the base MTHOLE decal.
Definition at line 958 of file test_pads_import.cpp.
References std::abs(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), CIRCLE, F_Cu, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), pad, FOOTPRINT::Pads(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | Peka_ViaImport | ) |
Verify peka.asc (V9.0 BASIC, 4-layer) via import.
STANDARDVIA spans all 4 copper layers (-2=top, -1=bottom) plus non-copper entries (layer 0=inner pad, layer 25=soldermask). Three specific issues:
Definition at line 785 of file test_pads_import.cpp.
References BLIND, BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), F_Cu, KI_TEST::GetPcbnewTestDataDir(), PCB_IO_PADS::LoadBoard(), TENTED, THROUGH, via, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | Peka_ZoneFillNoSelfIntersection | ) |
Verify zone fills imported from peka.asc are not self-intersecting.
The HATOUT records define complex outlines with arcs that get converted to polyline approximations. Errors in arc conversion (wrong winding, bad radius, or incorrect center) can produce outlines that cross themselves. Every filled polygon on every layer must be clean.
Definition at line 1019 of file test_pads_import.cpp.
References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), SHAPE_POLY_SET::CIterateSegmentsWithHoles(), KI_TEST::GetPcbnewTestDataDir(), and PCB_IO_PADS::LoadBoard().
|
static |
Definition at line 65 of file test_pads_import.cpp.
References PADS_BOARD_INFO::dir, PADS_BOARD_INFO::file, and KI_TEST::GetPcbnewTestDataDir().
Referenced by LoadAndVerify().
|
static |
Verify that the PADS file is recognized and loads without crashing.
Definition at line 74 of file test_pads_import.cpp.
References BOOST_CHECK_MESSAGE(), PCB_IO_PADS::CanReadBoard(), PADS_BOARD_INFO::dir, GetBoardPath(), and PCB_IO_PADS::LoadBoard().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and RunStructuralChecks().
|
static |
Run structural integrity checks on a successfully loaded board.
Uses BOOST_WARN for checks that expose known parser limitations so they report issues without failing the test suite. Invariant checks (no duplicate vias, tracks on copper) use BOOST_CHECK since they must always hold.
Definition at line 111 of file test_pads_import.cpp.
References PADSTACK::ALL_LAYERS, BOOST_CHECK_MESSAGE(), SHAPE_POLY_SET::COutline(), PADS_BOARD_INFO::dir, BOX2< Vec >::Intersects(), IsCopperLayer(), LoadAndVerify(), BOX2< Vec >::Merge(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pad, PCB_ARC_T, PCB_TRACE_T, SHAPE_LINE_CHAIN::PointCount(), BOX2< Vec >::SetMaximum(), THROUGH, and via.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 51 of file test_pads_import.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().