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.
Hi Daniel and hi all,
Short question, debugging issues. I'm modifying a c# custom goal scripting example. I've been writing some lines but I'm completely blind.
Daniel Piker
There is another method called Output which you can add to your custom GoalObject implementation.
So for instance, with a length goal, you might want to output the actual line updated with the new end point positions, for which you would add something like this:
public new object Output(List<KangarooSolver.Particle> p)
{
Line L = new Line(p[PIndex[0]].Position, p[PIndex[1]].Position);
return L;
}
All of these outputs come out of the O parameter of the solver component.
Aug 6, 2015