From 753e49a8928b77e7352c8556ee3e73d31d375dd6 Mon Sep 17 00:00:00 2001 From: Vincent Delecroix Date: Mon, 28 Aug 2023 13:43:46 +0200 Subject: [PATCH] remove unused function has_intersection --- veerer/layout.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/veerer/layout.py b/veerer/layout.py index e6e4508..fa0a876 100644 --- a/veerer/layout.py +++ b/veerer/layout.py @@ -56,26 +56,6 @@ RED: 'veeringred!20'} -def has_intersection(triangles, new_triangle, pos): - r""" - Check whether ``new_triangle`` intersects one of the triangles in ``triangles`` - where the positions of the vertices have to be found in ``pos``. - """ - for t in triangles: - for i in range(3): - p1 = t[i] - p2 = t[(i + 1) % 3] - for j in range(3): - q1 = new_triangle[j] - q2 = new_triangle[(j + 1) % 3] - - if (orientation(p1, p2, q1) != orientation(p1, p2, q2) and - orientation(q1, q2, p1) != orientation(q1, q2, p2)): - return True - - return False - - class FlatVeeringTriangulationLayout(object): r""" A flat triangulation layout in the plane. @@ -1086,4 +1066,4 @@ def plot_orbit(self, p, n, slope=VERTICAL, **kwds): G += line2d([p1 + x1 / L[i1] * V[i1], p2 + x2 / L[i2] * V[i2]], **kwds) - return G \ No newline at end of file + return G