Grasshopper

algorithmic modeling for Rhino

Hi all

How is the setup for using kangaroo2 with galapagos (or similar solvers)?

until now, I was using the K1 zombie version, which was convenient. Although K2 converges much faster and finish the computation, I would like to reset the solver everytime changes in the geometry have been made.

Is there any trigger node that checks whether an input has changed? 

Views: 1740

Replies to This Discussion

Hi Anders

I have tried to use your github code for one of daniels simple circle packing examples, but I can't get it to work. 

Could you or another help me out here? :-) 

And thanks a lot for the awesome github repository!

Attachments:

Hi Thomas, if you could be a bit more specific about how it isn't working that would make it easier to troubleshoot :)

I suspect it may have to do with referencing the KangarooSolver.dll. If so try following the instructions regarding "Add the Grasshopper Libraries folder path to the RhinoPython paths list" here

All your github examples works perfectly, but when I try to use the code on something else, it does not work.. why? I have no idea.. :-(
I have added the Grasshopper Libraries, so thats not the problem :-/

Is this the same file as above (Anders_g2.gh)? I only just quickly had a look and it seems that none of your input parameters are actually referenced in the script (Goals, Reset and Step). So that explains why nothing is happening (also, Python is case sensitive, so goals != Goals). I'm not really sure what you're definition is supposed to be doing besides that. I suppose it makes sense debugging-wise to test if it works with the standard K2 solver prior to trying out a custom Python script. Hope that helps..

Sry the erroe in the posted definition is definitely my fault.. I thought i would post a simple example combining your script and a simple daniel piker, circle packing script.
I have copy pasted the KSolver python component so now it should work.. but doesn't.. :-(

https://gyazo.com/865aa757bf108e141441ebc1a9a1eb85

Attachments:

Hi Thomas, looks like your problem is related to Greg's problem above. Also, you're using the output on the standard solver component which outputs all the points (particles) which the solver is operating on. I didn't call that method in the script (although one could). Instead you might simply use the Show component to pass along geometry explicitly. See attached..

Attachments:

Awesome it works! :-)

If I could ask a few final questions? .. 

If I want to define the kangaroo goals in the python comp e.g.:

ks.Goals.SphereCollide(V: List[Point3d], r: float, k: float)

What is List[Point3d] and how do I define it? - it is clearly not a normal list of points

And the show kangaroo component.. would it be ks.GoalObject() ? 

Once again thank you very much for your help and time it is highly appreciated! :-) 

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