Grasshopper

algorithmic modeling for Rhino

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.

Inside the custom goal, inside public override void Calculate(List<KangarooSolver.Particle> p), is there any way of outputing other geometry (such as vectors or lines, to see what is happening) or using the Print() command? (I've been getting errors when trying it)
Thanks a lot!

Views: 1010

Replies to This Discussion

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.

Hi Daniel.

Thanks for the lines.

Still nothing in the output. I tried several things, and positions. Neither giving error nor output. I attach a simple file trying to ouput a bisector line or a circle. 

More questions:

-if we want to ouput several geometries, we need to gather them in a list? and use just a single output?

-would it be possible to print values (from inside the calculate method in the panel? (that's always useful) 

Attachments:

in the way I'm using the Output  method is not giving any result. Do I have to call anything else? 

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service