70 wxString brd_name( wxT(
"soldermask_track_to_pad" ) );
73 std::vector<DRC_ITEM> violations;
88 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
89 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
92 violations.push_back( *aItem );
99 violations.size() ) );
102 BOOST_CHECK_GE( violations.size(), 1 );
105 bool foundTrackViolation =
false;
106 const auto& itemCache = m_board->GetItemByIdCache();
108 for(
const DRC_ITEM& item : violations )
110 KIID mainId = item.GetMainItemID();
111 KIID auxId = item.GetAuxItemID();
118 auto it = itemCache.find( mainId );
120 if( it != itemCache.end() )
121 mainItem = it->second;
126 auto it = itemCache.find( auxId );
128 if( it != itemCache.end() )
129 auxItem = it->second;
133 mainItem ? mainItem->
GetClass() : wxString(
"null" ),
134 auxItem ? auxItem->
GetClass() : wxString(
"null" ) ) );
139 foundTrackViolation =
true;
143 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