99import spatialmath .base as base
1010from spatialmath import SE3
1111from spatialmath .baseposelist import BasePoseList
12- from itertools import product
1312
1413_eps = np .finfo (np .float64 ).eps
1514
@@ -564,7 +563,7 @@ def contains(self, x, tol=50*_eps):
564563 else :
565564 raise ValueError ('bad argument' )
566565
567- def __eq__ (l1 , l2 ): # pylint: disable=no-self-argument
566+ def __eq__ (l1 , l2 ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
568567 """
569568 Test if two lines are equivalent
570569
@@ -581,7 +580,7 @@ def __eq__(l1, l2): # pylint: disable=no-self-argument
581580 """
582581 return abs ( 1 - np .dot (base .unitvec (l1 .vec ), base .unitvec (l2 .vec ))) < 10 * _eps
583582
584- def __ne__ (l1 , l2 ): # pylint: disable=no-self-argument
583+ def __ne__ (l1 , l2 ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
585584 """
586585 Test if two lines are not equivalent
587586
@@ -598,7 +597,7 @@ def __ne__(l1, l2): # pylint: disable=no-self-argument
598597 """
599598 return not l1 .__eq__ (l2 )
600599
601- def isparallel (l1 , l2 , tol = 10 * _eps ): # pylint: disable=no-self-argument
600+ def isparallel (l1 , l2 , tol = 10 * _eps ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
602601 """
603602 Test if lines are parallel
604603
@@ -616,7 +615,7 @@ def isparallel(l1, l2, tol=10*_eps): # pylint: disable=no-self-argument
616615 return np .linalg .norm (np .cross (l1 .w , l2 .w ) ) < tol
617616
618617
619- def __or__ (l1 , l2 ): # pylint: disable=no-self-argument
618+ def __or__ (l1 , l2 ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
620619 """
621620 Overloaded ``|`` operator tests for parallelism
622621
@@ -633,7 +632,7 @@ def __or__(l1, l2): # pylint: disable=no-self-argument
633632 """
634633 return l1 .isparallel (l2 )
635634
636- def __xor__ (l1 , l2 ): # pylint: disable=no-self-argument
635+ def __xor__ (l1 , l2 ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
637636
638637 """
639638 Overloaded ``^`` operator tests for intersection
@@ -660,7 +659,7 @@ def __xor__(l1, l2): # pylint: disable=no-self-argument
660659 # ------------------------------------------------------------------------- #
661660
662661
663- def intersects (l1 , l2 ): # pylint: disable=no-self-argument
662+ def intersects (l1 , l2 ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
664663 """
665664 Intersection point of two lines
666665
@@ -683,7 +682,7 @@ def intersects(l1, l2): # pylint: disable=no-self-argument
683682 # lines don't intersect
684683 return None
685684
686- def distance (l1 , l2 ): # pylint: disable=no-self-argument
685+ def distance (l1 , l2 ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
687686 """
688687 Minimum distance between lines
689688
@@ -836,7 +835,7 @@ def closest_to_point(self, x):
836835 return p , d
837836
838837
839- def commonperp (l1 , l2 ): # pylint: disable=no-self-argument
838+ def commonperp (l1 , l2 ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
840839 """
841840 Common perpendicular to two lines
842841
@@ -862,7 +861,7 @@ def commonperp(l1, l2): # pylint: disable=no-self-argument
862861 return l1 .__class__ (v , w )
863862
864863
865- def __mul__ (left , right ): # pylint: disable=no-self-argument
864+ def __mul__ (left , right ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
866865 r"""
867866 Reciprocal product
868867
@@ -888,7 +887,7 @@ def __mul__(left, right): # pylint: disable=no-self-argument
888887 else :
889888 raise ValueError ('bad arguments' )
890889
891- def __rmul__ (right , left ): # pylint: disable=no-self-argument
890+ def __rmul__ (right , left ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
892891 """
893892 Rigid-body transformation of 3D line
894893
@@ -913,7 +912,7 @@ def __rmul__(right, left): # pylint: disable=no-self-argument
913912 # PLUCKER LINE DISTANCE AND INTERSECTION
914913 # ------------------------------------------------------------------------- #
915914
916- def intersect_plane (self , plane ): # pylint: disable=no-self-argument
915+ def intersect_plane (self , plane ): # lgtm[py/not-named-self] pylint: disable=no-self-argument
917916 r"""
918917 Line intersection with a plane
919918
@@ -1193,8 +1192,6 @@ def __init__(self, v=None, w=None):
11931192 import pathlib
11941193 import os .path
11951194
1196- from spatialmath import Twist3
1197-
11981195 L = Line3 .TwoPoints ((1 ,2 ,0 ), (1 ,2 ,1 ))
11991196 print (L )
12001197 print (L .intersect_plane ([0 , 0 , 1 , 0 ]))
@@ -1220,7 +1217,6 @@ def __init__(self, v=None, w=None):
12201217 print (L2 )
12211218 print (L2 .intersect_plane ([0 , 0 , 1 , 0 ]))
12221219
1223- pass
12241220 # base.plotvol3(10)
12251221 # S = Twist3.UnitRevolute([0, 0, 1], [2, 3, 2], 0.5);
12261222 # L = S.line()
0 commit comments