56 m_board->GetDesignSettings().m_DRCEngine->ClearViolationHandler();
76 PAD* slotPad =
nullptr;
77 PAD* roundPad =
nullptr;
79 for(
FOOTPRINT* footprint : m_board->Footprints() )
81 for(
PAD*
pad : footprint->Pads() )
86 if(
pad->GetDrillSize().x !=
pad->GetDrillSize().y )
100 const std::shared_ptr<SHAPE_POLY_SET>& fill = m_board->Zones().front()->GetFilledPolysList(
F_Cu );
104 const int searchDist =
pcbIUScale.mmToIU( 2.0 );
108 for(
PAD*
pad : { roundPad, slotPad } )
113 "No fill within 2 mm of the hole, standoff is far too large" );
116 pad->GetDrillSize().x ==
pad->GetDrillSize().y ? wxString(
"round" )
117 : wxString(
"oblong" ),
121 BOOST_CHECK_GE(
actual, minGap );
122 BOOST_CHECK_LE(
actual, maxGap );
135 int edgeClearanceCount = 0;
136 int holeClearanceCount = 0;
139 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& ,
int ,
143 ++edgeClearanceCount;
145 ++holeClearanceCount;
152 BOOST_TEST_MESSAGE( wxString::Format(
"Edge clearance violations: %d, hole clearance: %d", edgeClearanceCount,
153 holeClearanceCount ) );
constexpr EDA_IU_SCALE pcbIUScale
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
std::shared_ptr< DRC_ENGINE > m_DRCEngine
void RunTests(EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints, BOARD_COMMIT *aCommit=nullptr)
Run the DRC tests.
void SetViolationHandler(DRC_VIOLATION_HANDLER aHandler)
Set an optional DRC violation handler (receives DRC_ITEMs and positions).
void ClearViolationHandler()
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
void FillZones(BOARD *m_board)
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
NPTH_SLOT_CLEARANCE_FIXTURE()=default
~NPTH_SLOT_CLEARANCE_FIXTURE()
std::unique_ptr< BOARD > m_board
SETTINGS_MANAGER m_settingsManager
BOOST_REQUIRE_EQUAL(rows.size(), 1)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_REQUIRE_MESSAGE(dc.CacheTableInfo(table, { "part_id", "val" }), dc.GetLastError())
BOOST_REQUIRE(res.columns()==1)
BOOST_FIXTURE_TEST_CASE(NpthSlotClearanceIssue24799, NPTH_SLOT_CLEARANCE_FIXTURE)
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
VECTOR2< int32_t > VECTOR2I