73 PAD* inlinePad = m_board->FindFootprintByReference(
"R1" )->FindPadByNumber(
"2" );
78 int64_t fullNetLength = 0;
86 fullNetLength += t->GetLength();
88 if( !startTrack && ( t->GetStart() == inlinePad->
GetPosition() || t->GetEnd() == inlinePad->
GetPosition() ) )
93 BOOST_REQUIRE_GT( fullNetLength, 0 );
117 BOOST_CHECK( terminals.count(
"TP1" ) );
118 BOOST_CHECK( terminals.count(
"R1" ) );
119 BOOST_CHECK( !terminals.count(
"TP2" ) );
122 int64_t pathLength = 0;
124 for(
int i = 0; i <
path.Size(); i++ )
127 pathLength +=
static_cast<const PNS::LINE*
>(
path[i] )->CLine().Length();
130 BOOST_TEST_MESSAGE( wxString::Format(
"tuned path = %lld nm, full net = %lld nm", pathLength, fullNetLength ) );
132 BOOST_CHECK_GT( pathLength, fullNetLength * 9 / 10 );
FOOTPRINT * GetParentFootprint() const
KICAD_T Type() const
Returns the type of object.
Handle the data for a net.
VECTOR2I GetPosition() const override
Base class for PNS router board items.
BOARD_ITEM * Parent() const
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
ITEM * FindItemByParent(const BOARD_ITEM *aParent)
void SetInterface(ROUTER_IFACE *aIface)
const ITEM_SET AssembleTuningPath(ROUTER_IFACE *aRouterIface, ITEM *aStart, SOLID **aStartPad=nullptr, SOLID **aEndPad=nullptr)
Like AssembleTrivialPath, but follows the track length algorithm, which discards segments that are fu...
void SetBoard(BOARD *aBoard)
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
std::unique_ptr< BOARD > m_board
SETTINGS_MANAGER m_settingsManager
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_TEST_MESSAGE("\n=== Real-World Polygon PIP Benchmark ===\n"<< formatTable(table))
static wxString refOfSolid(PNS::SOLID *aSolid)
BOOST_FIXTURE_TEST_CASE(TuningPathWalksThroughInlinePad, TUNING_PATH_FIXTURE)
@ PCB_PAD_T
class PAD, a pad in a footprint