Skip to content

Commit

Permalink
Prevent endless loop in connector in clc when pos1 and pos2 are ident…
Browse files Browse the repository at this point in the history
…ical.
  • Loading branch information
jonnymaserati committed Dec 17, 2023
1 parent e4e82a0 commit 7eec190
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions welleng/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,13 @@ def _target_pos_and_vec_defined(self, pos3, vec_old=[0., 0., 0.]):
+ args + (True,)
)
)
if abs(
self.dls - self.dls2
) < self.delta_dls:
if any((
abs(
self.dls - self.dls2
) < self.delta_dls,
np.allclose(self.pos1, self.pos2),
np.allclose(self.pos3, self.pos_target)
)):
break
self._happy_finish()
return
Expand Down

0 comments on commit 7eec190

Please sign in to comment.