I’m using ghpython to write a visitors’ path simulation.
I have a timer that’s linked to the python component and it updates all the visitors’ positions and links their past points together to create paths (curves).
The code goes something like this:
#for a single tourist, updates his/her position
#then update the curve
tourist.trail = rs.AddPolyline(tourist.positionList)
Right now I’m faced with the problem that I am adding an entirely new curve for every visitor per update, instead of updating the existing curve. It caused a lot of performance issues. I have tried different solutions including setting the trail to None, or using rs.DeleteObject and a couple of other things. None of them worked.
Thanks for reading and I will really appreciate it if you could offer some insight.