Skip to content

Commit a1df268

Browse files
authored
Perpendicular is not the same as not parallel (#882)
1 parent f19c35c commit a1df268

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cadquery/selectors.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,7 @@ class PerpendicularDirSelector(BaseDirSelector):
267267
"""
268268

269269
def test(self, vec: Vector) -> bool:
270-
angle = self.direction.getAngle(vec)
271-
r = (abs(angle) < self.tolerance) or (abs(angle - math.pi) < self.tolerance)
272-
return not r
270+
return abs(self.direction.getAngle(vec) - math.pi / 2) < self.tolerance
273271

274272

275273
class TypeSelector(Selector):

0 commit comments

Comments
 (0)