Skip to content

Commit

Permalink
Try to fix missing line in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
k034b363 committed Oct 31, 2024
1 parent dd81f3f commit fa17334
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plantcv/geospatial/napari_polygon_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def _lineintersect(array1, array2):
determinant = (a1*b2) - (a2*b1)

if determinant == 0:
fatal_error("Lines are parallel, no intersection exists.")
return None

x = (b2*c1 - b1*c2)/determinant
Expand Down Expand Up @@ -64,6 +63,8 @@ def napari_polygon_grid(viewer, numdivs):
point4 = _lineintersect(linelist1[i], linelist2[j+1])
points = [point1, point2, point3, point4, point1]
polygonlist.append(np.array(points))
if None in points:
fatal_error("Lines are parallel, no intersection exists.")

shapes_layer = viewer.add_shapes(name='grid_shapes')
# add mixed shapes using the `add` method
Expand Down

0 comments on commit fa17334

Please sign in to comment.