Hey there,
completely new to Grasshopper…
trying to fix a broken link between Grasshopper and a Rhino file.
I’ve followed Kirdeikis´ great tutorial for using Rhino for architecture (https://www.youtube.com/watch?v=eBCJwGsB30Q). He also explains how to generate a list of room sizes using Grasshopper (starting at 7:29:00 in the video).
For that, he uses the eleFront “Reference Layer”. A panel with the respective layer name is connected to its input. A couple “modules” later, we get a panel with the room sizes.
After closing and reopening both the Rhino and Grasshopper file (also renamed the Rhino file), the connection between the two seems to be lost. There´s no data at the output of the “Reference Layer”.
How can I get the Grasshopper file to retrieve data from my latest Rhino file again?
Here´s a screenshot. The lower strand wasn’t working as wished yet but first I need to fix the file connection anyway…
If you are using Rhino 8 I would encourage you to use native components instead of elefront plug in.. It was a great tool, but now rhino supports all its functionality natively.
But i think in your case you just need to check the name of the layer carefully, and if the geometry you are trying to pass to grasshopper is really on that layer.
Thanks a lot!
I´ll try to work from there on once I find enough time. And might get back with a couple questions if needed.
Just realising that I might need to dive a wee bit deeper than anticipated into how Grasshopper works to get this done… rather than just mindlessly following along the tutorial.
One basic question:
How does Grasshopper link to a Rhino file? Is it always retrieving data from the currently opened Rhino file? So there´s no fixed link between a Rhino file and a Grasshopper file?
But still face two issues…
I’ve now got Grasshopper to output a list with all rooms with their respective room area.
However, the list is neither ordered by story (see 1.) nor by room number (see 2.).
Find attached my Grasshopper file and screenshot of Rhino model / floor plans.
Sort by story
The building I’m drawing has 5 stories. Eventually, I´ll export each plan onto one separate A3 page, so I only want the room areas of the respective story on each page (for example, the ground floor plan should have a list of only the rooms that are on the ground floor).
I´ll basically need to have one separate list per story.
I can think of a couple ways to achieve this but don´t know the Grasshopper linguistic well enough to do so by myself… I could:
A) draw a big rectangle around each floor plan and include it into the script for that specific story. The script would than only include the rooms that are inside that rectangle. Then, I’d copy that script for each story, each with their own rectangle.
B) rename all room names by adding a prefix per story. This would be a little confusing though (too long a number per room). Also, all rooms would just end up inside one big list which I´d have to somehow “cut” into pieces per story.
C) any other ideas?
Sort by room number
This should be quiet straight forward but I can´t figure out how to sort the list by room number. Of course, this must not mess up the correct correlation of each room number/name with its respective room area.
This is the way I approach floor plans too, just make a frame for each floor plan and use the ‘Point in Curve’ component
You should avoid this. In grasshopper you are meant to use Data Trees and not make multiple copies of the same script.
For this you should use the Model Object data type. You can store the area and room number as User Text attributes and then sort the data by Room Number using the ‘Order Content’ component.
I can make a basic script for you if you share a Rhino file
Thanks for your offer, it’d be great if you could write a basic script (including room lists per level) for me!
Also, is there a way to exclude certain things from that list? For example I have written “Luftraum” (meaning air space) in one space which is just the air space of a two story high room. I woudn´t want that in my room list obviously. Maybe it´d help to put that text “Luftraum” onto another layer?
One more thing: In the attic, there´s two rooms with chimneys going through them. Can I subtract their areas from the respective room?
I’ve just extracted the 2D drawings from my 3D model so you can set the Grasshopper script up on that reduced Rhino file.
Attached are the Rhino file (reduced to 2D) and the Grasshopper file in the current state.
Step 0:
I added a layer called ‘kyuubimode::plan frames’ and made a number of rectangles. Each is given a name in the properties from the bottom. -1 is basement, 0 is ground, 1 is first floor and so on
Since you need cut outs in the rooms, we cannot use Closed Curves only. Instead we will first make surfaces for each room with the chimney cut outs. These surfaces are in the ‘kyuubimode::room surfaces’ layer
A Surface is capable of having holes whereas curves are unable to.
Step 2:
Query the room surfaces and annotations in grasshopper. Since we are using surfaces, we can use the ‘Collision One | Many’ component to see which texts, intersect with which surface. I do this by drawing a line at each text in the Z direction and use that as the collision object.
Note: Your geometry is not on the world XY plane so we need to use the ‘project’ component before doing this. After the room surface list is partitioned, we calculate the area and store it as user text on the annotations using the ‘User Text’ component. We can then trim the data tree.
Step 3:
Query the plan frames. Use the ‘Order Content’ component. Set the Key to ‘Name’. This will sort your list in the ascending order of the names. Use ‘Point in Curve’ to partition the list of room surfaces as per the floor. Save the floor value as a user text on the annotations using the ‘User Text’ component. Trim the data tree.
Step 5:
We are done! All that’s left is to extract our values and sort the list.
First we will use a ‘Group Content’ component to partition our list by floors in an ascending order. Then retrieve the user text values and format the text in the way you need.
Woah, thanks so much for your efforts!!
Sorry, just now found the time to come back to this project.
I’ve tried to implement the Grasshopper script into my actual 3D model (adjusting the respective Layer names) and pasting your planes (room surfaces) and plan frames along.
Unfortunately, I´m still running into two issues.
1.) the list now misses the measured areas. It only shows 00m² for all rooms listed.
I´m somehow thinking, that there´s an issue within the process of “colliding” (Collision One / Many) the texts with the respective surfaces via lines.
I think so, because there´s no points shown within my model whereas they are in yours.