|
KiCad PCB EDA Suite
|
Regression test for issue #24286: creepage DRC calculates incorrect path between two THT pads when an NPTH oval slot lies between them. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew_utils/board_test_utils.h>#include <board.h>#include <board_design_settings.h>#include <layer_ids.h>#include <drc/drc_item.h>#include <drc/drc_engine.h>#include <footprint.h>#include <pad.h>#include <pcb_marker.h>#include <settings/settings_manager.h>#include <widgets/report_severity.h>Go to the source code of this file.
Classes | |
| struct | DRC_CREEPAGE_NPTH_PADS_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (CreepageNPTHBetweenPadsIssue24286, DRC_CREEPAGE_NPTH_PADS_FIXTURE) | |
Regression test for issue #24286: creepage DRC calculates incorrect path between two THT pads when an NPTH oval slot lies between them.
The repro board has a polarized capacitor footprint C4 with two THT pads straddling an NPTH oval slot. Both pads are on the 'Sitove' netclass with a 5 mm creepage rule. The expected behaviour is that the creepage path between the pads must travel around the NPTH slot boundary, not straight through the slot interior. Before the fix the candidate-path midpoint test used a board outline polygon that did not have NPTH holes subtracted, so the direct (interior) path was accepted as valid and the reported violation distance was understated.
Definition in file test_drc_creepage_issue24286.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | CreepageNPTHBetweenPadsIssue24286 | , |
| DRC_CREEPAGE_NPTH_PADS_FIXTURE | ) |
Definition at line 76 of file test_drc_creepage_issue24286.cpp.
References ARC, BOOST_CHECK_MESSAGE(), BOOST_TEST_MESSAGE(), DRC_ENGINE::ClearViolationHandler(), SEG::Distance(), DRCE_CREEPAGE, DRCE_FIRST, DRCE_LAST, F_Cu, EDA_SHAPE::GetArcMid(), PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetLength(), PCB_MARKER::GetPath(), PAD::GetPosition(), BOARD_DESIGN_SETTINGS::GetSeverity(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), KI_TEST::LoadBoard(), BOARD_DESIGN_SETTINGS::m_DRCEngine, BOARD_DESIGN_SETTINGS::m_DRCSeverities, EDA_ITEM::m_Uuid, MM, NO_FILL, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, DRC_ENGINE::RunTests(), SEGMENT, EDA_SHAPE::SetArcGeometry(), DRC_ENGINE::SetViolationHandler(), VECTOR2< T >::x, and VECTOR2< T >::y.