Skip to content

Commit

Permalink
Check track segment length also for start, end columns
Browse files Browse the repository at this point in the history
  • Loading branch information
acroucher committed Apr 3, 2024
1 parent b5110dd commit 9566046
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions mulgrids.py
Original file line number Diff line number Diff line change
Expand Up @@ -2028,15 +2028,10 @@ def track_dist(p):
if len(pts) > 0:
if col == start_col:
pts = [line[0], pts[-1]]
din = 0
add_col = True
elif col == end_col:
pts = [pts[0], line[-1]]
din = track_dist(pts[0])
add_col = True
else:
din, dout = track_dist(pts[0]), track_dist(pts[-1])
add_col = abs(dout - din) > tol
din, dout = track_dist(pts[0]), track_dist(pts[-1])
add_col = abs(dout - din) > tol
if add_col:
track.append((col, pts[0], pts[-1]))
dist.append(din)
Expand Down

0 comments on commit 9566046

Please sign in to comment.