Kangaroo

THIS FORUM IS NO LONGER ACTIVE. PLEASE POST ANY NEW QUESTIONS OR DISCUSSION ON:

https://discourse.mcneel.com/c/grasshopper/kangaroo

The discussions here are preserved for reference, but new questions posted here are likely to go unanswered.

Kangaroo is a Live Physics engine for interactive simulation, optimization and form-finding directly within Grasshopper.

Kangaroo 2 Custom Goal output

Hi All,

I'm writing a custom Goal that acts on a collection of vertices. For each of those vertices there is a numeric value I want the solver to output during debugging.

If I have added an 'Output' method to my custom GoalObject. It collects the values for each vertex that the goal acts on in an array, and then returns that array.

The output of the solver however doesn't return the array of values, but returns the string 'System.Double[]', without access to the actual values.

Outputting a single value works without problems. But lists or arrays have the above problem.

What am I mising here...?

Jack

  • up

    Marc Syp

    Make sure you convert using .ToList() and use the DA.SetDataList method on your output of you're in VS.

    Marc
    1