66 std::vector<LENGTH_DELAY_CALCULATION_ITEM> lengthItems;
69 for(
PCB_TRACK* track : m_board->Tracks() )
71 if( track->GetNetCode() != testNet->
GetNetCode() )
75 widths.insert( track->GetWidth() );
79 if( item.
Type() != LENGTH_DELAY_CALCULATION_ITEM::TYPE::UNKNOWN )
80 lengthItems.emplace_back( item );
83 BOOST_TEST_MESSAGE( wxString::Format(
"Found %zu different track widths on net /TEST1_P", widths.size() ) );
86 BOOST_REQUIRE_GE( widths.size(), 2 );
90 .OptimiseViaLayers =
true, .MergeTracks =
true, .OptimiseTracesInPads =
true, .InferViaInPad =
false
100 BOOST_CHECK_GT( lengthItems.size(), 0 );
Lightweight class which holds a pad, via, or a routed trace outline.
TYPE Type() const
Gets the routing item type.
Class which calculates lengths (and associated routing statistics) in a BOARD context.
LENGTH_DELAY_CALCULATION_ITEM GetLengthCalculationItem(const BOARD_CONNECTED_ITEM *aBoardItem) const
Return a LENGTH_CALCULATION_ITEM constructed from the given BOARD_CONNECTED_ITEM.
LENGTH_DELAY_STATS CalculateLengthDetails(std::vector< LENGTH_DELAY_CALCULATION_ITEM > &aItems, PATH_OPTIMISATIONS aOptimisations, const PAD *aStartPad=nullptr, const PAD *aEndPad=nullptr, LENGTH_DELAY_LAYER_OPT aLayerOpt=LENGTH_DELAY_LAYER_OPT::NO_LAYER_DETAIL, LENGTH_DELAY_DOMAIN_OPT aDomain=LENGTH_DELAY_DOMAIN_OPT::NO_DELAY_DETAIL) const
Calculates the electrical length of the given items.
Handle the data for a net.
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
Holds length measurement result details and statistics.
Struct to control which optimisations the length calculation code runs on the given path objects.
SETTINGS_MANAGER m_settingsManager
std::unique_ptr< BOARD > m_board
BOOST_FIXTURE_TEST_CASE(LengthCalculationIncludesAllWidths, TUNER_DRC_TEST_FIXTURE)
Verify that length calculation includes all segments regardless of track width.
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)