Fix length overestimation when first/last line segment enters a pad.

Fixes https://gitlab.com/kicad/code/kicad/issues/13322
This commit is contained in:
Alex 2022-12-30 16:27:59 +05:00
parent 3f34485013
commit 95f5d92fc6
1 changed files with 1 additions and 2 deletions

View File

@ -381,8 +381,7 @@ const ITEM_SET TOPOLOGY::AssembleTuningPath( ITEM* aStart, SOLID** aStartPad, SO
// Whole segment is inside: clip out this segment // Whole segment is inside: clip out this segment
clip = vertex; clip = vertex;
} }
else if( containsB && else if( containsB )
( aForward ? vertex < aLine.PointCount() - 1 : vertex > 0 ) )
{ {
// Only one point inside: Find the intersection // Only one point inside: Find the intersection
VECTOR2I loc; VECTOR2I loc;