Grasshopper

algorithmic modeling for Rhino

Apologies if this is an obvious question, but I'm fairly new to Kangaroo2.

I'm trying to use the K2 Engineering package to get stress/reactions from a simple input curve that relaxes to an elastica shape. While I've been able to isolate the K2Engineering goals from the output of the Solver component, I'm getting two errors in the CastRodOutput component (see screenshot).

1. Invalid cast: ObjectWrapper » Object[]

2. Solution exception:Object reference not set to an instance of an object.

Are the objects returned from the Solver output references to the objects, or the actual objects? The second error seems to imply that I'm getting references rather than the objects themselves, but the panel output appears to be goal objects?

Views: 2497

Attachments:

Replies to This Discussion

Hi Maryanne,

I see now that some of the changes I made in a recent release of Kangaroo(to preserve tree structure in the output) are conflicting with the way K2Engineering handles the output casting. I'll try and figure out a proper solution...

..but in the meantime, a way around this is to use the 'Solver' component from the previous release.

I kept it in there as a 'legacy' component, so that old definitions would still open, but there is currently no way to add the old version of the component to the canvas from the toolbar.

What you can do though is copy-paste the component from another file (such as the one attached below). The old and new components look the same, except if you hover the mouse over the 'O' output, it says 'GoalFunction Outputs' instead of 'GoalFunction Output tree'.

Attachments:

Hi Daniel,

I tried using the oldsolvercomponent with no luck unfortunately.

The kangaroo solver doesn't run as it can't convert the goals.

Any help would be very appreciated.

Thanks for the quick reply! Even with the old solver though, I'm still having casting problems. I have 6 types of goals input into the solver, so if I don't entwine them, I get the following error.

If I do use ExplodeTree to isolate the rod goals, I still get the same errors as before:

Ah, I see the problem now. You need to unflatten before exploding the tree:

Attachments:

That solved it! Thanks again!

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