Fix calculation of arc lengths; include them in net inspector
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8140
This commit is contained in:
parent
64c8befa01
commit
29c45743b7
|
@ -1703,6 +1703,13 @@ std::tuple<int, double, double> BOARD::GetTrackLength( const TRACK& aTrack ) con
|
|||
length += stackup.GetLayerDistance( via->TopLayer(), via->BottomLayer() );
|
||||
continue;
|
||||
}
|
||||
else if( track->Type() == PCB_ARC_T )
|
||||
{
|
||||
// Note: we don't apply the clip-to-pad optimization if an arc ends in a pad
|
||||
// Room for future improvement.
|
||||
length += track->GetLength();
|
||||
continue;
|
||||
}
|
||||
|
||||
bool inPad = false;
|
||||
SEG trackSeg( track->GetStart(), track->GetEnd() );
|
||||
|
|
|
@ -1038,6 +1038,7 @@ std::vector<CN_ITEM*> DIALOG_NET_INSPECTOR::relevantConnectivityItems() const
|
|||
|
||||
const auto type_bits = std::bitset<MAX_STRUCT_TYPE_ID>()
|
||||
.set( PCB_TRACE_T )
|
||||
.set( PCB_ARC_T )
|
||||
.set( PCB_VIA_T )
|
||||
.set( PCB_PAD_T );
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ public:
|
|||
double radius = GetRadius();
|
||||
double includedAngle = std::abs( GetAngle() );
|
||||
|
||||
return radius * M_PI * includedAngle / 180.0;
|
||||
return radius * M_PI * includedAngle / 1800.0;
|
||||
}
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
|
Loading…
Reference in New Issue