fix route again, didn't work
This commit is contained in:
parent
64326207be
commit
a15d86f20b
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ class Route:
|
|||
|
||||
if self.origin_xyz is not None:
|
||||
node = nodes[0][0]
|
||||
if isinstance(node, int):
|
||||
if not hasattr(node, 'xyz'):
|
||||
node = self.router.nodes[node]
|
||||
origin_distance = np.linalg.norm(node.xyz - self.origin_xyz)
|
||||
else:
|
||||
|
@ -46,7 +46,7 @@ class Route:
|
|||
|
||||
if self.destination_xyz is not None:
|
||||
node = nodes[-1][0]
|
||||
if isinstance(node, int):
|
||||
if not hasattr(node, 'xyz'):
|
||||
node = self.router.nodes[node]
|
||||
destination_distance = np.linalg.norm(node.xyz - self.destination_xyz)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue