Grasshopper

algorithmic modeling for Rhino

 

 

 

Hello world,

 

Having some interesting thought processes however I'm unable to define these in grasshopper using a simple script.

I wish to take several volumes (100) for example and pick a point in space, (the sun)

Then draw lines from each area centroid of the volumes to the sun.

I then wish each volume to be extruded to a certain height (5m) however where ever a line intersects with a volume I wish that volume to cease extruding at that point

It’s a concept I'm working on which I'm able to do on a small scale however when I add more volumes the scripts get very heavy, complex and I can’t help but feel there is a much simpler way.

What I'm interested in knowing is if:-  There a way to map or re map an intersecting line with a volume If I simply put all the volumes and lines in a list of data.

I.e if line – 59 intersects with volume 33 extrude volume 33 to point 59. essentially I need grasshopper to know which lines are being intersected and extrude the volumes accordingley.

Really hope someone out there can interpret my text and possible help.

 

Thanks in advance.

 

Rich.

Views: 1104

Replies to This Discussion

It would be helpful if you posted files in addition to your description.  This would help answer several relevant questions...for example, are your starting volumes identical, and what is their orientation?

Yes,


Indeed, I have attached 1 file with two scripts the first one shows how a particular volume is affected by another.

 

The second scipt is simply not working, I'm having trouble understanding the dataflow.

Attachments:

Okay...great...I'm pretty sure I see what you're trying to do.  From your definition it looks like you might not have the latest GH, so I'll also post a picture of the definition...it's explained in there pretty much.  The key to the data management issue I think lies in making sure that when you test for your building's collisions with the sight-lines to the "sun" you don't test them against their own line.  So what the definition does is identify the correct index to remove during the testing process.  Then you have some null-replacement stuff going on as well.

If I was suggesting a better long term strategy for this I'd say you should look into mesh-ray intersections...they run a lot lighter than working with nurbs/breps, so if you want to do this on a really big scale (say 1000+), it'll make it a lot easier for you.  But hopefully this will help you get on the right track and get a better understanding of list/data management too...

I've also created a group of components that may help you out in using lists that you may want to check out: http://www.grasshopper3d.com/group/milkbox/forum/topics/tree-sloth

Attachments:

Hi again,

Really sorry, I'm having major issue deciphering the components your using as they are all icons.

 

I'm searching for the 'saw' icon and 'x' icon with red & black arrows.

 

Thanks.

 

Rich.

no worries.  The saw icon is the "clean tree" component...in earlier versions of GH it looks like a bundle of cherries, under the "tree" category of the sets tab.  The other one is "replace nulls" from the "list" category of the sets tab.  I can't remember if it's there or not in earlier releases...if it isn't, your best bet is probably to use the "null item" component to test for invalidity, and then a "pick 'n' choose" component, like the alternate ending to the attached:

David,

I think this is above my pay grade – I have followed your diagrams however some of the wires are crossed and it is difficult to see where they originate.

I had to alter the input to the evaluate as the CZ & ME have been replaced with X & Y. however I don’t see why that would change anything.

Any suggestions would be great.

I have attached a screenshot.

Again thanks for the help.

Attachments:

looks like you're really close...you've put a "List Item" component in where you should have a "Replace Items"...this is the part the takes away all of the lines.  But otherwise it looks to me like everything is in order.  Regarding the CZ and ME thing, your setup should be fine...but if ever you want to change an input name, you can do it just by right-clicking on the component over the input in question.  It can be a good way to keep track of what each variable means...

David,

Thank you for all your help, It’s has really helped my project move forward.

I need to get to grips with the complexities of grasshopper. I seem to get by but today has been a real eye opener as to how little I know.

Please check out the attached movie showing the outcome.

Thanks again.

Attachments:

Fantastic!  Yeah just stick with it and it'll keep coming to you!! :)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service