Grasshopper

algorithmic modeling for Rhino

How to make recursive process with Python ?

I plan to make a loop by connecting Honeybee's componet.

The diagram would be like this.

I hope that it's technially possible.

But, at first I need to solve recursive error  "1. Recursive data stream found, this component depends on itself".

I know why this happens but don't have no idea.

And I also know some of existing post about this problem on Grasshopper  forum but there has been not usefull solution yet.

thank you for your helping.

Views: 2073

Replies to This Discussion

Thank you for your reply, Tom.

It just makes iteration inside Python.

that absolutely works.

I'm talking about like this

http://www.grasshopper3d.com/forum/topics/grasshopper-loop-from-gec...

At this link above, Andrei tried to make a loop combined with Geco.

I am doing the same thing using Ladybug&Honeybee.

I'm sorry that my explanation doesn't enough.

Yohei

Tom

I know those plugin.

But they doesn't work to solve this problem.

Yohei

Tom

The attached image is no relation with my project.

I just wanted to tell you that Grasshopper interface doesn't allow the recursive connection although there are some plugins to handle recursive process like Hoopsnake.

Your another idea is very good.

I try this at first.

Thanks, Tom !

Yohei

Thank you for your reply, Marcus.

>> As far as I understand you, you are not calling Honeybee inside your Python component

Yes.

I foud most of plugins I have using "ghpythonlib.components" but couldn't find Ladybug or Honeybee.


Thank you for your idea !!

Yohei

Ladybug+Honeybee components are not available to be accessed through node-in-code ghpythonlib.components module.
It's because unlike other Grasshopper plugins, Ladybug+Hobeybee components are single .ghuser objects, not compiled .gha files.


However Mostapha recently started implementing this functionality, but at the moment only limited number of Ladybug components are supported. No Honeybee components can be called in this way, at least not now.

Thank you for your information, djordje.

We can have a look at the Python script by just double click on LB&HB component and can also modify them. So I think we don't have to use LB&HB as library in Python.

My idea is just copy all scripts of LB&HB and paste into one Python component.

Throughout this way, we can make recursion just like Andrei said.

First I will read what Mostapha is saying.

Yohei

To djordje.

If you time a time, Could you tell where Mostapha is talking about kinds of these problem at this link. I couldn't find it... 

Yohei.

Hi Yohei,

I was not referring to your recursion issue, but rather to this part of your comment:

"I found most of plugins I have using "ghpythonlib.components" but couldn't find Ladybug or Honeybee."

"If you time a time, Could you tell where Mostapha is talking about kinds of these problem at this link. I couldn't find it..."

The link I sent was related to upper "ghpythonlib.components" quote, not the recursion issue. It starts at: "Rewriting Ladybug!".


To djordje

Thank you for your further information.

I think this is the best solution for this problem if we can import the LB&HB's library to Python.

Yohei

An easy solution is to write the value to a file and read it back.

To Mostapha,

Thank you for your information.

you imagined like this ?

I really appreciate that if you tell me more about it.

When I save the value, How can i do that ? Shoud I save as .xml ?

I've never worked with exporting and importing the data.

I found a few plugins or a way to do that on Python like this.

But I am not sure which one is better for this issue.

Yohei

Here is an example to write a single value to a text file and read it back. To get the process started you need to create a text file with a single line. I attached an example.

What are you exactly trying to do with Ladybug and Honeybee? Maybe you can use the new libraries and put them all together in a single python component.

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