68 wxString brd_name( wxT(
"soldermask_track_to_pad" ) );
71 std::vector<DRC_ITEM> violations;
86 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
87 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
90 violations.push_back( *aItem );
97 violations.size() ) );
100 BOOST_CHECK_GE( violations.size(), 1 );
103 bool foundTrackViolation =
false;
104 const auto& itemCache = m_board->GetItemByIdCache();
106 for(
const DRC_ITEM& item : violations )
108 KIID mainId = item.GetMainItemID();
109 KIID auxId = item.GetAuxItemID();
116 auto it = itemCache.find( mainId );
118 if( it != itemCache.end() )
119 mainItem = it->second;
124 auto it = itemCache.find( auxId );
126 if( it != itemCache.end() )
127 auxItem = it->second;
131 mainItem ? mainItem->
GetClass() : wxString(
"null" ),
132 auxItem ? auxItem->
GetClass() : wxString(
"null" ) ) );
137 foundTrackViolation =
true;
141 BOOST_CHECK_MESSAGE( foundTrackViolation,
"Expected to find a track-to-pad soldermask violation" );
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
std::shared_ptr< DRC_ENGINE > m_DRCEngine
int m_SolderMaskToCopperClearance
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
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).
KICAD_T Type() const
Returns the type of object.
virtual wxString GetClass() const =0
Return the class name.
@ DRCE_LIB_FOOTPRINT_ISSUES
@ DRCE_LIB_FOOTPRINT_MISMATCH
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
SETTINGS_MANAGER m_settingsManager
std::unique_ptr< BOARD > m_board
DRC_TRACK_TO_PAD_BRIDGE_FIXTURE()
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
BOOST_FIXTURE_TEST_CASE(DRCTrackToPadBridgeTest, DRC_TRACK_TO_PAD_BRIDGE_FIXTURE)
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
VECTOR2< int32_t > VECTOR2I