Skip to content

Commit 9655db2

Browse files
committed
Ensure variables get set in edge case scenario
1 parent cfdcb75 commit 9655db2

File tree

1 file changed

+5
-0
lines changed
  • roboticstoolbox/backends/VPython

1 file changed

+5
-0
lines changed

roboticstoolbox/backends/VPython/grid.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ def __move_grid_objects(self):
229229
y_origin = round(self.__scene.center.y, 2)
230230
z_origin = 0
231231
self.__focal_point = [x_origin, y_origin, z_origin]
232+
else:
233+
x_origin, y_origin, z_origin = round(self.__scene.center.x, 2), \
234+
round(self.__scene.center.y, 2), \
235+
round(self.__scene.center.z, 2)
236+
self.__focal_point = [x_origin, y_origin, z_origin]
232237
else:
233238
x_origin, y_origin, z_origin = self.__focal_point[0], \
234239
self.__focal_point[1], \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy