Skip to content

Commit

Permalink
Fix off by one error, for transient glb pushed from EnSight, without …
Browse files Browse the repository at this point in the history
…the ANSYS_scene_timevalue tag.
  • Loading branch information
david-bremer committed Dec 5, 2024
1 parent c653fcc commit 537329c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ansys/pyensight/core/utils/omniverse_glb_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,13 @@ def _build_scene_timeline(self, scene_idx: int, input_timeline: List[float]) ->
if timeline[1] - timeline[0] <= 0.0:
timeline = [0.0, float(num_scenes - 1)]
# carve time into the input timeline.
delta = (timeline[1] - timeline[0]) / float(num_scenes)
delta = (timeline[1] - timeline[0]) / float(num_scenes-1)
output: List[float] = []
output.append(float(scene_idx) * delta + timeline[0])
output.append(output[0] + delta)
if scene_idx < num_scenes-1:
output.append(output[0] + delta)
else:
output.append(output[0])
return output

@staticmethod
Expand Down

0 comments on commit 537329c

Please sign in to comment.