Grasshopper

algorithmic modeling for Rhino

Hi Daniel,

I'm having my first go at transferring some old definitions to Kangaroo2 (trying to resist scripting as we will eventually be teaching Kangaroo2 I assume).

So far it's all going swimmingly. The only thing causing slight confusion is the "GoalFunction Outputs" of the "Solver" component and how this works with the "Show" component. I was assuming it worked similar to the old "Geometry" -> "GeometryOut" parameters.

However, as far as I can tell it outputs all geometries used for making goals in the order that the goal components are wired (vectors output as nulls). Is this correct?

Attached a basic example demonstrating the behaviour.

Best,

Anders

Views: 819

Attachments:

Replies to This Discussion

Hi Anders,

(Great work on the tower btw!)

The Output definitely needs a bit of work - the current way was only a temporary solution, and the plan has always been to give it a full make-over at some point.

I'd really value your input on what would be the most useful way to organize this.

As it is currently, the output from the solver is the the output of each of the Goals, in the order in which they were read in (though since the Goal input gets auto-flattened, I think this is not always exactly the same order in which the wires were connected if there are data trees involved. To have totally explicit control over the order it is still probably clearest to flatten and Merge the goals before input).

Some of the Goals (such as Length and RigidBody) that have an obvious geometric representation automatically produce an Output (lines and meshes respectively). The idea behind this was that people could start seeing geometry after connecting only 2 or 3 components.

Goals can also output other non-geometric information (for example, the mesh Planarize Goal outputs the current planarity measure of each face, and things like stress values could potentially be output in the same way).

Many Goals don't produce any output, and these are the cause of all the nulls in the Solver output parameter. I left them in, because culling them before output would mess up the ordering if people are expecting the indices to match those of the goal inputs.

The Show component produces a type of Goals which don't actually do anything, except maintain particle indices in order to reconstruct the geometry for output.

However, as I say this is all still open to change. Honestly a big reason for not tackling with this sooner is just that dealing with data trees is my absolute least favourite part of GH, especially converting them back and forth with arrays in code.

Perhaps a better way would be to bring back the Geometry input/output like in the old Kangaroo, so it preserves tree structure.

This could even be in addition to the current Output component, to allow for non geometric information to be passed as well.

Thanks Daniel, it would have been a really tricky project to pull off without Joey :)

That's what I figured. As it is now it is certainly both simple, general and flexible enough that it should fit with the definitions I was fiddling with. But I'm sure I will have a better idea of what might be a good approach in a few weeks time once I play with it all a bit more.

I didn't consider that other data types than geometry could be output as well. It makes perfect sense once you get the idea I think. It's a little bit similar to how we ended up designing how to have only one signature for making constraints with ShapeOp (basically the scalars input would have different meanings for different constraints).

I actually quite like how everything in Kangaroo2 is treated as a goal now and that there are no more "Geometry" and "Anchors" parameters. From a software architecture perspective it seems both more clean and general. That said, I'll be sure to update you once I have a better "feel" for how adolescent Joey is behaving out in the wild.

Best,

Anders

Anchoring to this post. I had similar problems trying to understand the show component behaviour compared with the older Kangaroo versions :)

And what about replace the "Show" component by a per-component boolean input (or drop-down menu option) in the goals that produce clear geometry outputs?

hello,

been practicing with kangaroo 2 lately.

in this case using anchor, pressure, length line to inflate meshes. The O output has nulls and lines from Length line goal. The pressure does not output meshes. Once i understood the show concept, i entwined all goals and unflattened the 0 output tree with the entwined goals tree as a guide, using a show goal with the meshes input of pressure.

from the manual:

The Show object (in the Main panel, with the lightbulb icon) is used to attach additional geometry to
be displayed to the points involved in the simulation. It works with lines, polylines, arcs and meshes.

I did not interpret correctly this description. i thought that it was a component to attach lets say spheres to the resulting output points for visualization purposes. the description in Daniels post clears things up, maybe it could be added to the manual. Once you get the idea, its all ok.

I like Angel's idea, that show goal could also be accessed per goal with a right click enable disable show, with the black label under the component informing current status (similar to running/converged). Also introducing another output with geometry data might be useful, but keeping particles V in their own V output.

best

alex

Thanks Ángel and Alex for the suggestions,

I will have another go at making this clearer for the next release.

...and what about some kind of documentation that would explain what the "Show" component is and how to use it ?

It has become customary in the GH world to just let users figure stuff out and scavenge the forum for bits and pieces of information. 

RSS

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service