54#define INITIAL_HOVER_HITTEST_THRESHOLD_PIXELS 5
55#define DETAILS_HOVER_HITTEST_THRESHOLD_PIXELS 20
116 settings->
m_PnsSettings = std::make_unique<PNS::ROUTING_SETTINGS>( settings,
"tools.pns" );
160 if( evt->IsCancelInteractive() || evt->IsActivate() )
180 if( evt->IsMotion() )
252 m_frame->GetCanvas()->Refresh();
279 double min_dist_sq = std::numeric_limits<double>::max();
281 for(
EDA_ITEM* candidate : collector )
286 candidatePos =
static_cast<PCB_TRACK*
>( candidate )->GetCenter();
287 else if( candidate->Type() ==
PCB_ARC_T )
288 candidatePos =
static_cast<PCB_ARC*
>( candidate )->GetMid();
290 const double dist_sq = (
m_cursorPos - candidatePos ).SquaredEuclideanNorm();
292 if( dist_sq < min_dist_sq )
299 min_dist_sq = dist_sq;
302 const bool isDiffPairItem =
318 int fakeNCP, fakeNCN;
321 const bool isDiffPairItem =
m_drcEngine->IsNetADiffPair(
m_board, candidateNet, fakeNCP, fakeNCN );
324 const NETINFO_ITEM* existingNet = existingBci->GetNet();
326 if( !isDiffPairItem && candidateNet != existingNet )
328 min_dist_sq = dist_sq;
343 std::vector<LENGTH_DELAY_CALCULATION_ITEM>& aItems,
346 if( aPath.
Size() == 0 )
351 wxASSERT( aItems.size() ==
static_cast<size_t>( aPath.
Size() ) );
358 .OptimiseVias =
false, .MergeTracks =
false, .OptimiseTracesInPads =
false, .InferViaInPad =
true
364 m_board->GetLengthCalculation()->CalculateLengthDetails(
390 wxString selectedTuningProfileName =
m_selectedNetinfo->GetNetClass()->GetTuningProfile();
391 wxString coupledTuningProfileName =
m_coupledNetinfo->GetNetClass()->GetTuningProfile();
393 std::shared_ptr<TUNING_PROFILES> tuningParams =
m_frame->Prj().GetProjectFile().TuningProfileParameters();
394 const TUNING_PROFILE& selectedTuningProfile = tuningParams->GetTuningProfile( selectedTuningProfileName );
395 const TUNING_PROFILE& coupledTuningProfile = tuningParams->GetTuningProfile( coupledTuningProfileName );
409 const std::vector<CUMULATIVE_ENTRY> selectedCumulative =
412 const std::vector<CUMULATIVE_ENTRY> coupledCumulative =
417 const std::vector<PARALLEL_RUN> parallelRuns =
findParallelRuns( selectedCumulative, coupledCumulative );
432 const std::vector<PARALLEL_RUN>& aKnownRuns,
const bool isCoupledTrack )
const
434 std::vector<KNOWN_RELATIVE_POINT> pts;
435 pts.reserve( aKnownRuns.size() * 2 );
437 for(
const auto& r : aKnownRuns )
439 const std::size_t segIdx = isCoupledTrack ? r.segB : r.segA;
440 const double segStart = segIdx == 0 ? 0.0 :
static_cast<double>( aSegments[segIdx - 1].m_Length );
441 const double segLen =
static_cast<double>( aSourceItemDetails.
LengthsAndDelays[segIdx].first );
448 s0 = segStart + r.tb0 * segLen;
449 s1 = segStart + r.tb1 * segLen;
453 s0 = segStart + r.ta0 * segLen;
454 s1 = segStart + r.ta1 * segLen;
457 const double startPadsLengthDiff =
460 const double startPadsDelayDiff =
464 double startLen = isCoupledTrack ? r.startLenB - r.startLenA : r.startLenA - r.startLenB;
465 startLen += startPadsLengthDiff;
467 double endLen = isCoupledTrack ? r.endLenB - r.endLenA : r.endLenA - r.endLenB;
468 endLen += startPadsLengthDiff;
470 double startDelay = isCoupledTrack ? r.startDelayB - r.startDelayA : r.startDelayA - r.startDelayB;
471 startDelay += startPadsDelayDiff;
473 double endDelay = isCoupledTrack ? r.endDelayB - r.endDelayA : r.endDelayA - r.endDelayB;
474 endDelay += startPadsDelayDiff;
476 pts.push_back( { s0, startLen, startDelay } );
477 pts.push_back( { s1, endLen, endDelay } );
480 std::ranges::sort( pts,
481 [](
const auto& a,
const auto& b )
483 return a.LinearDistance < b.LinearDistance;
491 const double aTargetSubsegmentSize )
493 if( aSegments.empty() )
496 std::vector<double> splits;
499 if( aSegments[0].m_SourceType == LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE )
500 splits.push_back( 0.0 );
502 double currentDistance = 0;
506 const double segStart = currentDistance;
507 const double segEnd = seg.m_Length;
508 currentDistance = segEnd;
511 if( seg.m_SourceType != LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE )
515 for(
double s = segStart; s < segEnd; s += aTargetSubsegmentSize )
517 splits.push_back( s );
520 splits.push_back( segEnd );
524 std::ranges::sort( splits );
526 splits.erase( std::ranges::unique( splits,
527 [](
const double a,
const double b )
538std::pair<VECTOR2D, std::size_t>
540 const std::vector<LENGTH_DELAY_CALCULATION_ITEM>& aSourceItemDetails,
543 for( std::size_t i = 0; i < aSegments.size(); ++i )
545 const double segStart = i == 0 ? 0.0 :
static_cast<double>( aSegments[i - 1].m_Length );
546 const double segEnd =
static_cast<double>( aSegments[i].m_Length );
548 if( aDist <= segEnd +
EPS )
550 const double segLen = segEnd - segStart;
555 t = ( aDist - segStart ) / segLen;
557 t = std::clamp( t, 0.0, 1.0 );
559 if( aSourceItemDetails[i].Type() == LENGTH_DELAY_CALCULATION_ITEM::TYPE::VIA )
563 wxASSERT( aSourceItemDetails[i - 1].Type() == LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE );
564 wxASSERT( aSourceItemDetails[i - 1].
GetLine().CPoints().size() == 2 );
565 return { aSourceItemDetails[i - 1].GetLine().CPoints()[1], i - 1 };
568 wxASSERT( aSourceItemDetails[i].Type() == LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE );
569 wxASSERT( aSourceItemDetails[i].
GetLine().CPoints().size() == 2 );
572 lerp( aSourceItemDetails[i].
GetLine().CPoints()[0], aSourceItemDetails[i].
GetLine().CPoints()[1], t ), i
579 return { { 0.0, 0.0 }, 0 };
584 const bool aUseLogScale )
const
586 auto lerp = [](
const double d1,
const double d2,
const double s )
588 return d1 + s * ( d2 - d1 );
595 const double r = std::clamp(
lerp( aColour1.
r, aColour2.
r, aS ), 0.0, 1.0 );
596 const double g = std::clamp(
lerp( aColour1.
g, aColour2.
g, aS ), 0.0, 1.0 );
597 const double b = std::clamp(
lerp( aColour1.
b, aColour2.
b, aS ), 0.0, 1.0 );
598 const double a = std::clamp(
lerp( aColour1.
a, aColour2.
a, aS ), 0.0, 1.0 );
606 const std::vector<PARALLEL_RUN>& aKnownRuns,
const double aTargetSubsegmentSize,
const bool isCoupledTrack )
608 std::vector<OUTPUT_SEGMENT>
result;
610 if( aSegments.empty() )
617 const std::vector<KNOWN_RELATIVE_POINT> knownPoints =
623 double minDelay = 0.0;
624 double maxDelay = 0.0;
626 for(
const auto& [
_, relLen, relDelay] : knownPoints )
628 minLen = std::min( minLen, relLen );
629 maxLen = std::max( maxLen, relLen );
630 minDelay = std::min( minDelay, relDelay );
631 maxDelay = std::max( maxDelay, relDelay );
637 m_maxSkew = std::max(
static_cast<int>( std::round( maxDelay / 10 ) * 10 ), maxSkew );
639 m_maxSkew = std::max(
static_cast<int>( std::round( maxLen / 10 ) * 10 ), maxSkew );
647 for( std::size_t i = 0; i + 1 < splits.size(); ++i )
649 const double s0 = splits[i];
650 const double s1 = splits[i + 1];
658 const std::vector<LENGTH_DELAY_CALCULATION_ITEM>& items =
663 out.
Start = startPoint;
667 const double sMid = ( s0 + s1 ) / 2.0;
669 const std::optional<std::pair<double, double>> knownInterp = interp.
ValueAt( sMid );
677 out.
RelativeValueAtMid = knownInterp.value_or( std::pair<double, double>{ 0.0, 0.0 } ).second;
683 out.
RelativeValueAtMid = knownInterp.value_or( std::pair<double, double>{ 0.0, 0.0 } ).first;
726 const bool drawHighlight = selIdx < std::numeric_limits<std::size_t>::max();
735 if( drawHighlight && isSelected && i == selIdx )
747 if( drawHighlight && !isSelected && i == selIdx )
755 std::vector<MSG_PANEL_ITEM> items;
756 wxString description, value;
764 std::vector<MSG_PANEL_ITEM> items;
774 wxString description = wxString::Format(
_(
"Net A Name" ) );
776 items.emplace_back( description, netName );
780 description = wxString::Format(
_(
"Net B Name" ) );
782 items.emplace_back( description, netName );
787 wxString description = wxString::Format(
_(
"Net P Name" ) );
788 wxString netName =
m_board->GetNetInfo().GetNetItem(
m_netcodeP )->GetDisplayNetname();
789 items.emplace_back( description, netName );
791 description = wxString::Format(
_(
"Net N Name" ) );
793 items.emplace_back( description, netName );
798 wxString description = wxString::Format(
_(
"Max Skew" ) );
806 items.emplace_back( description, value );
811 const bool drawHighlight = selIdx < std::numeric_limits<std::size_t>::max();
817 normalisedValue = ( normalisedValue == 0.0 ) ? 0.0 : normalisedValue;
819 wxString description =
_(
"Local Skew" );
820 wxString value =
_(
"Unknown" );
824 value =
m_frame->MessageTextFromValue( normalisedValue,
true,
829 items.emplace_back( description, value );
832 frame()->SetMsgPanel( items );
847 return std::numeric_limits<int>::max();
852 return std::max( val.
Max(), val.
Opt() );
858 return std::numeric_limits<int>::max();
869 const std::vector<CUMULATIVE_ENTRY>& aCoupledCumulative,
870 std::pair<std::size_t, std::size_t> aRangeA,
871 std::pair<std::size_t, std::size_t> aRangeB,
double aMaxSpacing,
872 std::vector<PARALLEL_RUN>& aRuns )
const
874 for(
size_t ia = aRangeA.first; ia < aRangeA.second; ++ia )
878 if( selectedItem.
Type() != LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE )
892 for(
size_t ib = aRangeB.first; ib < aRangeB.second; ++ib )
896 if( coupledItem.
Type() != LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE )
911 const double dp = nA.Dot( nB );
921 const double perpDistance = std::fabs( nA.Cross( midB -
A0 ) );
923 const double maxItemGap =
926 if( perpDistance > maxItemGap )
930 double a0 =
A0.Dot( nA );
931 double a1 =
A1.Dot( nA );
932 double b0 = B0.
Dot( nA );
933 double b1 = B1.
Dot( nA );
935 bool aReversed =
false;
936 bool bReversed =
false;
951 double overlap0 = std::max( a0, b0 );
952 double overlap1 = std::min( a1, b1 );
955 if( overlap1 <= overlap0 )
959 double tA0 = ( overlap0 - a0 ) / ( a1 - a0 );
960 double tA1 = ( overlap1 - a0 ) / ( a1 - a0 );
961 double tB0 = ( overlap0 - b0 ) / ( b1 - b0 );
962 double tB1 = ( overlap1 - b0 ) / ( b1 - b0 );
979 std::swap( tA0, tA1 );
982 std::swap( tB0, tB1 );
985 tA0 = std::clamp( tA0, 0.0, 1.0 );
986 tA1 = std::clamp( tA1, 0.0, 1.0 );
988 tB0 = std::clamp( tB0, 0.0, 1.0 );
989 tB1 = std::clamp( tB1, 0.0, 1.0 );
1029 aRuns.push_back( run );
1035std::vector<PARALLEL_RUN>
1037 const std::vector<CUMULATIVE_ENTRY>& aCoupledCumulative )
const
1039 std::vector<PARALLEL_RUN> runs;
1043 findParallelRunsImpl( aSelectedCumulative, aCoupledCumulative, { 0, aSelectedCumulative.size() },
1044 { 0, aCoupledCumulative.size() }, maxGap, runs );
1050 const auto [minSelected, maxSelected] = std::ranges::minmax( runs, {},
1056 const auto [minCoupled, maxCoupled] = std::ranges::minmax( runs, {},
1063 const std::size_t firstSegA = minSelected.segA;
1064 const std::size_t lastSegA = maxSelected.segA;
1065 const std::size_t firstSegB = minCoupled.segA;
1066 const std::size_t lastSegB = maxCoupled.segA;
1070 if( firstSegA > 0 || firstSegB > 0 )
1074 const VECTOR2D distVec = selPadLocn - coupledPadLocn;
1077 findParallelRunsImpl( aSelectedCumulative, aCoupledCumulative, { 0, firstSegA }, { 0, firstSegB },
1078 padSeparation, runs );
1083 if( lastSegA < aSelectedCumulative.size() || lastSegB > aCoupledCumulative.size() )
1087 const VECTOR2D distVec = selPadLocn - coupledPadLocn;
1090 findParallelRunsImpl( aSelectedCumulative, aCoupledCumulative, { lastSegA, aSelectedCumulative.size() },
1091 { lastSegB, aCoupledCumulative.size() }, padSeparation, runs );
1094 std::ranges::sort( runs,
1111 const std::vector<CUMULATIVE_ENTRY>& aCumulative,
const std::size_t aSegIdx,
const double aT )
1113 const double segLength =
static_cast<double>( aLengthDelayDetails.
LengthsAndDelays[aSegIdx].first );
1114 const double segDelay =
static_cast<double>( aLengthDelayDetails.
LengthsAndDelays[aSegIdx].second );
1119 const double partLen = segLength * ( 1.0 - aT );
1120 const double partDelay = segDelay * ( 1.0 - aT );
1121 return { aCumulative[aSegIdx].m_Length -
static_cast<int64_t
>( partLen ) + aPadDetails.
StartPadLength,
1122 aCumulative[aSegIdx].m_Delay -
static_cast<int64_t
>( partDelay ) + aPadDetails.
StartPadDelay };
1135 std::vector<CUMULATIVE_ENTRY> cumulative;
1144 int64_t totalLength = 0;
1145 int64_t totalDelay = 0;
1149 for( std::size_t i = 0; i < aItems.size(); ++i )
1154 totalLength += itemLen;
1155 totalDelay += itemDly;
1156 cumulative.emplace_back( totalLength, totalDelay, item.
Type() );
1165 std::vector<LENGTH_DELAY_CALCULATION_ITEM> splitItems;
1175 newItem.
SetWidth( aSourceItem.GetWidth() );
1176 newItem.
SetLayers( aSourceItem.GetStartLayer() );
1178 splitItems.emplace_back( std::move( newItem ) );
1181 for(
const auto& sourceItem : aItems )
1184 if( sourceItem.Type() != LENGTH_DELAY_CALCULATION_ITEM::TYPE::LINE )
1186 splitItems.emplace_back( sourceItem );
1192 for(
int segIdx = 0; segIdx < line.
SegmentCount(); ++segIdx )
1195 makeLengthDelayItem( seg, sourceItem );
1199 aItems = std::move( splitItems );
1208 switch( aDirection )
1211 message = wxString::Format(
_(
"Net %s has multiple simulation electrical source pads" ),
1215 message = wxString::Format(
_(
"Net %s has multiple simulation electrical source pads" ),
1219 message = wxString::Format(
_(
"Differential pair %s / %s is missing start and / or end pads" ),
1223 message = wxString::Format(
_(
"Net %s is missing electrical simulation source pad" ),
1227 message = wxString::Format(
_(
"Net %s is missing electrical simulation source pad" ),
1230 default: error =
false;
break;
1234 m_frame->ShowInfoBarError( message,
true );
1264 m_frame->ShowInfoBarError(
_(
"Phase skew initial selection failed" ),
true );
1279 m_frame->ShowInfoBarError(
_(
"Differential pair identification failed" ),
true );
1308 wxCHECK( trackFirst, );
1312 wxCHECK( trackSecond, );
1322 VECTOR2I startSnapPointFirst, startSnapPointSecond;
1331 m_frame->ShowInfoBarError(
_(
"Phase skew initial selection failed" ),
true );
1361 for(
int i = 0; i < aPath.
Size(); ++i )
1374 wxASSERT( numPoints >= 2 );
1376 if( line.
GetPoint( numPoints - 1 ) == pathSearchLoc )
1379 pathSearchLoc = line.
GetPoint( numPoints - 1 );
1384 wxASSERT( viaItem->
Pos() == pathSearchLoc );
1401 if( !selectedStartPad || !selectedEndPad || !coupledStartPad || !coupledEndPad )
1409 std::swap( selectedStartPad, selectedEndPad );
1416 std::swap( coupledStartPad, coupledEndPad );
1445 for(
auto itr = aPath.
rbegin(); itr != aPath.
rend(); ++itr )
1450 wxASSERT( l !=
nullptr );
1456 reversed.
Add( *itr );
1459 aPath = std::move( reversed );
1462 std::swap( *aStartPad, *aEndPad );
1468 constexpr std::size_t maxIdx = std::numeric_limits<std::size_t>::max();
1472 if( selectedIdx < maxIdx )
1474 if( isSelectedTrack )
1489 const double aHitTestDistance )
const
1491 auto getNearestSegment = [&aCursorPos, aHitTestDistance](
const std::vector<OUTPUT_SEGMENT>& segments )
1493 const double maxDistSq = aHitTestDistance * aHitTestDistance;
1495 std::size_t bestIndex = std::numeric_limits<std::size_t>::max();
1496 double bestDistSq = maxDistSq;
1498 for(
size_t i = 0; i < segments.size(); ++i )
1500 const auto& seg = segments[i];
1502 VECTOR2D mid = ( seg.Start + seg.End ) / 2.0;
1503 const double distSq = ( aCursorPos - mid ).SquaredEuclideanNorm();
1505 if( distSq <= bestDistSq )
1507 bestDistSq = distSq;
1512 return std::pair<std::size_t, double>( bestIndex, bestDistSq );
1515 const auto [selectedIdx, selectedDist] = getNearestSegment(
m_selectedDiffs );
1516 const auto [coupledIdx, coupledDist] = getNearestSegment(
m_coupledDiffs );
1518 constexpr std::size_t maxIdx = std::numeric_limits<std::size_t>::max();
1520 if( selectedIdx != maxIdx && coupledIdx != maxIdx )
1522 if( selectedDist <= coupledDist )
1523 return { selectedIdx,
true };
1525 return { coupledIdx,
false };
1528 if( selectedIdx != maxIdx )
1529 return { selectedIdx,
true };
1531 if( coupledIdx != maxIdx )
1532 return { coupledIdx,
false };
1534 return { maxIdx,
true };
1554 m_frame->GetCanvas()->GetView()->UpdateAllLayersColor();
1557 m_frame->GetCanvas()->Refresh();
@ NORMAL
Inactive layers are shown normally (no high-contrast mode)
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
int GetCount() const
Return the number of objects in the list.
SEVERITY GetSeverity() const
const MINOPTMAX< int > & GetValue() const
A base class for most all the KiCad significant classes used in schematics and boards.
A general implementation of a COLLECTORS_GUIDE.
void SetPreferredLayer(PCB_LAYER_ID aLayer)
void SetIncludeSecondary(bool include)
Used when the right click button is pressed, or when the select tool is in effect.
void Collect(BOARD_ITEM *aItem, const std::vector< KICAD_T > &aScanList, const VECTOR2I &aRefPos, const COLLECTORS_GUIDE &aGuide)
Scan a BOARD_ITEM using this class's Inspector method, which does the collection.
A color representation with 4 components: red, green, blue, alpha.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
An interface for classes handling user events controlling the view behavior such as zooming,...
Interpolates known relative points along a track using linear distance.
std::optional< std::pair< double, double > > ValueAt(const double s)
Lightweight class which holds a pad, via, or a routed trace outline.
void SetLine(const SHAPE_LINE_CHAIN &aLine)
Sets the source SHAPE_LINE_CHAIN of this item.
TYPE Type() const
Gets the routing item type.
const int GetWidth() const
Gets the line width.
void SetWidth(const int aWidth)
Sets the line width.
SHAPE_LINE_CHAIN & GetLine() const
Gets the SHAPE_LINE_CHAIN associated with this item.
void SetEffectiveNetClass(const NETCLASS *aNetClass)
Sets the effective net class for the item.
void SetLayers(const PCB_LAYER_ID aStart, const PCB_LAYER_ID aEnd=PCB_LAYER_ID::UNDEFINED_LAYER)
Sets the first and last layers associated with this item.
Handle the data for a net.
PAD_SIM_ELECTRICAL_TYPE GetSimElectricalType() const
DIFF_PHASE_SKEW_SETTINGS m_DiffPhaseSkewSettings
std::unique_ptr< PNS::ROUTING_SETTINGS > m_PnsSettings
static TOOL_ACTION properties
Activation of the edit tool.
static TOOL_ACTION showDiffPhaseSkew
Display of phase skew between differential pair tracks.
Basic class for a differential pair.
std::vector< ITEM * >::reverse_iterator rbegin()
void Add(const LINE &aLine)
std::vector< ITEM * >::reverse_iterator rend()
Base class for PNS router board items.
PnsKind Kind() const
Return the type (kind) of the item.
bool OfKind(int aKindMask) const
virtual BOARD_ITEM * BoardItem() const
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
SHAPE_LINE_CHAIN & Line()
void Reverse()
Clip the line to the nearest obstacle, traversing from the line's start vertex (0).
LINKED_ITEM * GetLink(int aIndex) const
Erase the linking information. Used to detach the line from the owning node.
Keep the router "world" - i.e.
int GetPadToDieDelay() const
const VECTOR2I & Pos() const
const DIFF_PAIR AssembleDiffPair(SEGMENT *aStart)
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...
const VECTOR2I & Pos() const
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
const SHAPE_LINE_CHAIN Reverse() const
Reverse point order in the line chain.
virtual const VECTOR2I GetPoint(int aIndex) const override
SEG Segment(int aIndex) const
Return a copy of the aIndex-th segment in the line chain.
virtual size_t GetPointCount() const override
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
virtual const SEG GetSegment(int aIndex) const override
int SegmentCount() const
Return the number of segments in this line chain.
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
constexpr extended_type Dot(const VECTOR2< T > &aVector) const
Compute dot product of self with aVector.
@ DIFF_PAIR_GAP_CONSTRAINT
double m_DiffSkewColourInterpolationLogStrength
The logarithmic weighting factor to apply to colour interpolation in the diff phase overlay tool.
double m_DiffSkewTrackGapInflation
The multiplier of constraint diff pair gap to allow identification of coupled track segments in the d...
double m_DiffSkewTargetDiffSegmentSize
The target size (in PCB IU) of diff phase skew gradient overlay segments.
double m_DiffSkewCosThetaParallelTestValue
The value of cos(theta) between two tracks used to test for parallelism in the diff phase skew overla...
double m_DiffSkewOverlayTrackInflation
The multiplier of underlying track size applied to the diff phase skew overlay.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
char * GetLine(FILE *File, char *Line, int *LineNum, int SizeLine)
Read one line line from aFile.
Builds the length / delay calculation items from a given path.
Used to represent the results of a call to CalculateLengthDetails, including inferred via-in-pad deta...
int64_t InferredEndViaLength
The length of an inferred end via-in-pad.
int64_t InferredStartViaLength
The length of an inferred start via-in-pad.
int64_t InferredEndViaDelay
The delay of an inferred end via-in-pad.
std::vector< std::pair< int64_t, int64_t > > LengthsAndDelays
Per-item lengths and delays.
int64_t InferredStartViaDelay
The delay of an inferred start via-in-pad.
Struct to represent one segment where tracks run parallel, including information about absolute and r...
VECTOR2I endA
The ending coordinate of the run on track A.
double endDelayA
Cumulative delay of track A at the start of the parallel run.
double startLenA
Cumulative length of track A at the start of the parallel run.
size_t segB
The index of the parallel segment on track B.
VECTOR2I startA
The starting coordinate of the run on track A.
VECTOR2I startB
The starting coordinate of the run on track B.
double ta0
Normalised values of the start (0) and end (1) coordinates on track A and B These are normalised to t...
double startDelayA
Cumulative delay of track A at the start of the parallel run.
double startLenB
Cumulative length of track B at the start of the parallel run.
double endLenA
Cumulative length of track A at the end of the parallel run.
double endDelayB
Cumulative delay of track A at the start of the parallel run.
double startDelayB
Cumulative delay of track A at the start of the parallel run.
double endLenB
Cumulative length of track B at the end of the parallel run.
size_t segA
The index of the parallel segment on track A.
VECTOR2I endB
The ending coordinate of the run on track B.
Struct to control which optimisations the length calculation code runs on the given path objects.
KIGFX::COLOR4D m_UnknownSkewColor
KIGFX::COLOR4D m_NegativeSkewColor
KIGFX::COLOR4D m_ZeroSkewColor
KIGFX::COLOR4D m_PositiveSkewColor
static VECTOR2I SnapToNearestTrack(const VECTOR2I &aP, BOARD *aBoard, NETINFO_ITEM *aNet, PCB_TRACK **aNearestTrack)
static LINKED_ITEM * PickSegment(ROUTER *aRouter, const VECTOR2I &aWhere, int aLayer, VECTOR2I &aPointOut, const SHAPE_LINE_CHAIN &aBaseline=SHAPE_LINE_CHAIN())
Represents a single line in the tuning profile configuration grid.
bool m_EnableTimeDomainTuning
wxString result
Test unit parsing edge cases and error handling.
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D