Python not resetting internal memory when inputs change

gaussian_curvature_v4_edge_strip_and_wip_developable.gh (21.6 KB)

Bit of an odd one. I have a mesh that I convert to a planktonmesh and pass to a python script that wobbles vertexs about to try and make it more developable.
When I change the iteration count from 3 to 100 and then back again, the script continues working on the version in it’s memory, so it just keeps stacking on top of each other and the cone drifts into being an egg shape. If I disconnect the mesh upstream, and then reconnect it it flushes the memory and returns to near cone shaped.

it’s at the bottom of the example script, labelled with a scribble.

using rhino 7, windows 10.