|
KiCad PCB EDA Suite
|
Regression test for issue #24544: the creepage DRC path around a partially rounded-rectangle slot on Edge.Cuts (a gr_rect with a corner radius) that separates the two C4 pads of a footprint rotated to a non-orthogonal angle. 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_shape.h>#include <pcb_marker.h>#include <settings/settings_manager.h>#include <widgets/report_severity.h>#include <geometry/shape_poly_set.h>#include <geometry/shape_line_chain.h>#include <geometry/shape_segment.h>#include <geometry/shape_arc.h>Go to the source code of this file.
Classes | |
| struct | DRC_CREEPAGE_ROUNDED_SLOT_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (CreepageRoundedSlotIssue24544, DRC_CREEPAGE_ROUNDED_SLOT_FIXTURE) | |
Regression test for issue #24544: the creepage DRC path around a partially rounded-rectangle slot on Edge.Cuts (a gr_rect with a corner radius) that separates the two C4 pads of a footprint rotated to a non-orthogonal angle.
#24544 was reported as #24543 "plus one extra problem": the path both started at the pad hole and did not respect the slot's curved ends. The root cause of BOTH symptoms is the same dropped rotated-pad copper outline fixed in #24543 (CREEPAGE_GRAPH::Addshape() had no SH_SIMPLE case). With the pad copper anchor restored, the shortest creepage path correctly wraps a rounded end of the slot, hugging the arc rather than cutting across the slot interior; the slot's own rounded-rectangle modelling (commit "Model rounded-rect Edge.Cuts slots in creepage") was already correct. There is no separate curve-handling defect.
This test locks in the corrected behaviour: the reported creepage path between the two pads must (1) never pass through the slot interior and (2) run flush against a rounded end of the slot. It fails without the #24543 fix (the pad pair reports no usable path) and passes with it.
Definition in file test_drc_creepage_issue24544.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | CreepageRoundedSlotIssue24544 | , |
| DRC_CREEPAGE_ROUNDED_SLOT_FIXTURE | ) |
Definition at line 84 of file test_drc_creepage_issue24544.cpp.
References SHAPE_POLY_SET::Append(), ARC, BOOST_CHECK_MESSAGE(), BOOST_TEST_MESSAGE(), chain, DRC_ENGINE::ClearViolationHandler(), SHAPE_POLY_SET::Contains(), SHAPE_ARC::ConvertToPolyline(), SHAPE_POLY_SET::COutline(), DEGREES_T, DRCE_CREEPAGE, DRCE_FIRST, DRCE_LAST, Edge_Cuts, ERR, F_Cu, EDA_SHAPE::GetArcMid(), EDA_SHAPE::GetCornerRadius(), EDA_SHAPE::GetEnd(), PCB_MARKER::GetPath(), BOARD_DESIGN_SETTINGS::GetSeverity(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), PCB_SHAPE::IsOnLayer(), KiROUND(), KI_TEST::LoadBoard(), BOARD_DESIGN_SETTINGS::m_DRCEngine, BOARD_DESIGN_SETTINGS::m_DRCSeverities, EDA_ITEM::m_Uuid, MM, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), RECTANGLE, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, DRC_ENGINE::RunTests(), SHAPE_LINE_CHAIN::SetClosed(), DRC_ENGINE::SetViolationHandler(), SHAPE_LINE_CHAIN_BASE::SquaredDistance(), VECTOR2< T >::x, and VECTOR2< T >::y.