Kangaroo2 Solver update automatically sometimes but not always

unhandled

(Gabriel Taquet) #1

Hi there,

I am using Rhino 5, Grasshopper 0.9.0076 and the latest release of Kangaroo2.

My question:
Why does the solver sometimes update, sometimes doesn’t?

The issue:
I have a list of points that go through Kangaroo2 solver in order to put constraints to them. I store the output in .csv file in order to be able to add, remove, or simply save points. I am doing that using Python scripts.
Basically:

  • when I am adding a point, I insert a line in my CSV, then update the input by running a Python script. The solver automatically updates and the number of points at the input correspond to the number of points at the output.
  • when I am removing a point, i.e. removing one line from my .csv, the solver does not update automatically and while the number of points at the input is one less than before, the number of points at the output did not vary i.e. after removing a point, number_outputs = number_inputs +1.

The only way I found until now to get the right number of outputs is the simplest: toggle the solver’s reset. But that messes up everything with my points and their location. I cannot use this as a solution.

It is even more confusing because I tried to make a MWE but then the solver requires reset everytime - whether I add a point or delete one. MWE.gh (12.0 KB)

To add a point:

  • click “addPoint”
  • then click “update current CSV”

To remove a point:

  • click “removePoint”
  • then click “update current CSV”
  • you will need to click “reset solver” as well, which is unfortunate

I’m wondering if someone could put some light on what is going on here.

Here is the main file: solverUpdate.gh (24.9 KB)