Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions openmc/tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,16 @@ def write_to_vtk(self, filename=Path('tracks.vtp')):
for state in pt.states:
points.InsertNextPoint(state['r'])

# Create VTK line and assign points to line.
n = pt.states.size
line = vtk.vtkPolyLine()
line.GetPointIds().SetNumberOfIds(n)
for i in range(n):
line.GetPointIds().SetId(i, point_offset + i)
point_offset += n

# Add line to cell array
cells.InsertNextCell(line)
# Create VTK line and assign points to line.
n = pt.states.size
line = vtk.vtkPolyLine()
line.GetPointIds().SetNumberOfIds(n)
for i in range(n):
line.GetPointIds().SetId(i, point_offset + i)
point_offset += n

# Add line to cell array
cells.InsertNextCell(line)

data = vtk.vtkPolyData()
data.SetPoints(points)
Expand Down
Loading