Skip to content

Commit 01568eb

Browse files
committed
looking for intersections between two sets of lines, iterate over all combinations from both sets
1 parent cbaf873 commit 01568eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

spatialmath/geom3d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import spatialmath.base as base
1010
from spatialmath import SE3
1111
from spatialmath.baseposelist import BasePoseList
12+
from itertools import product
1213

1314
_eps = np.finfo(np.float64).eps
1415

@@ -746,7 +747,7 @@ def closest_to_line(self, line):
746747

747748
p = []
748749
dist = []
749-
for line1, line2 in zip(self, line):
750+
for line1, line2 in product(self, line):
750751
v1 = line1.v
751752
w1 = line1.w
752753
v2 = line2.v

0 commit comments

Comments
 (0)