Skip to content

Commit 0c5a739

Browse files
committed
Update to latest sibernetic version
1 parent d2d8ac2 commit 0c5a739

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

SiberneticReplay.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""
2+
A PyVista based viewer/player for saved Sibernetic simulations
3+
4+
Loads in the generated position_buffer.txt file
5+
6+
"""
7+
18
import pyvista as pv
29
import sys
310
import os
@@ -176,12 +183,19 @@ def create_mesh(step):
176183
if __name__ == "__main__":
177184
plotter = pv.Plotter()
178185

179-
position_file = "Sibernetic/position_buffer.txt"
186+
position_file = "buffers/position_buffer.txt" # can be overwritten by arg
187+
188+
if not os.path.isfile(position_file):
189+
position_file = (
190+
"Sibernetic/position_buffer.txt" # example location in Worm3DViewer repo
191+
)
180192

181193
include_boundary = False
182194

183195
if "-b" in sys.argv:
184196
include_boundary = True
197+
else:
198+
print("Run with -b to display boundary box")
185199

186200
if len(sys.argv) > 1 and os.path.isfile(sys.argv[1]):
187201
position_file = sys.argv[1]

0 commit comments

Comments
 (0)