1111
1212plotter = None
1313
14- spacing_ = 50
14+ offset_ = 50
1515
1616
17- def add_sibernetic_model (pl , swap_y_z = False , spacing = 50 ):
18- global all_points , all_point_types , last_mesh , plotter , spacing_
19- spacing_ = spacing
17+ def add_sibernetic_model (pl , swap_y_z = False , offset = 50 ):
18+ global all_points , all_point_types , last_mesh , plotter , offset_
19+ offset_ = offset
2020 plotter = pl
2121
2222 points = []
@@ -96,7 +96,7 @@ def add_sibernetic_model(pl, swap_y_z=False, spacing=50):
9696 plotter .remove_scalar_bar ("types" )
9797
9898 max_time = len (all_points ) - 1
99- pl .add_slider_widget (create_mesh , rng = [0 , max_time ], value = 0 , title = "Time point" )
99+ pl .add_slider_widget (create_mesh , rng = [0 , max_time ], value = 30 , title = "Time point" )
100100 pl .add_timer_event (max_steps = 5 , duration = 2 , callback = create_mesh )
101101
102102
@@ -105,7 +105,7 @@ def create_mesh(step):
105105
106106 step_count = step
107107 value = step_count
108- global all_points , all_point_types , last_mesh , plotter , spacing_
108+ global all_points , all_point_types , last_mesh , plotter , offset_
109109
110110 index = int (value )
111111
@@ -128,7 +128,7 @@ def create_mesh(step):
128128 )
129129 else :
130130 last_mesh .points = curr_points
131- last_mesh .translate ((spacing_ , - 50 , - 100 ), inplace = True )
131+ last_mesh .translate ((offset_ , - 50 , - 100 ), inplace = True )
132132
133133 plotter .render ()
134134
0 commit comments