Skip to content

Commit

Permalink
fixed bug related margins
Browse files Browse the repository at this point in the history
  • Loading branch information
takanori-fujiwara committed Aug 5, 2023
1 parent 19f7eec commit 15bf4eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sensing_network/resistor_path_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def _select_source_target_positions(self, node1_pos, node2_pos):

# avoid overlapping with nodes
u = (target_pos - source_pos) / np.linalg.norm(target_pos - source_pos)
source_pos += self.node_r * u + self.margin
target_pos -= self.node_r * u + self.margin
source_pos += (self.node_r + self.margin) * u
target_pos -= (self.node_r + self.margin) * u

return source_pos, target_pos

Expand Down

0 comments on commit 15bf4eb

Please sign in to comment.