Automatticaly selecting curves of the opening in geometry

For my graduation project, I am focusing on the automation of daylight factor calculations using a Revit model. In this process, only the walls and floors from Revit are imported. However, for the calculations, it is necessary to define the curves present on the interior of the openings. The goal is to select these curves automatically, eliminating the need for manual selection. How can I select the inner curves (multiple) of the openings automatically?


?

Hi,

I have some experience with this workflow and I usually use Rhino.Inside.Revit to do it, which I assume that you can use as you have access to Rhino and Revit, right? :sweat_smile:.

I select all the windows, make a bounding box for each of them and then select the two largest faces. Then I compare the distance of each of those face to the centroid of the union box of the complete geometry of the building. The shortest distance of each window corresponds to the interior face of the windows that you are looking for.

In this case I am selecting the complete the windows in each individual union box: frame and glass (because for energy analysis you need everything). If you just want to the glass (because this is daylight), you will need to look for the corresponding subcategory with Rhino.Inside.Revit.

Interior curves of windows.gh (13.4 KB)

I know you asked the question Grasshopper Developer category, so if you open the file, do it from Rhino.Inside.Revit as the Rhino.Inside components will not be active from regular Grasshopper opened with Rhino (probably you know this, but just in case :sweat_smile:)

2 Likes

Thanks for your help, Fernando.
I’ve moved this thread to the more appropriate category.
-wim

1 Like

I tested your script on my building, and it appears to be functioning correctly. I am now in the process of integrating this component into the rest of my script. I will keep you informed about its success.

Additionally, I have a question: Is it possible to arrange a call? Your expertise would greatly assist me in refining my script further?

For my graduation project, I am concentrating on automating daylight factor calculations using a Revit model. During this process, only the walls, floors and windows from Revit are imported. Is it possible to filter only walls, floors, and windows from a specific 3D view? I comprehend that it is feasible to import geometry exclusively from a 3D view, as well as geometry based on family names. Nonetheless, is there a method to amalgamate these two approaches?
image

For my graduation project, I am concentrating on automating daylight factor calculations using a Revit model. Is it possible to only import walls, floors, and windows from a specific 3D view? I comprehend that it is feasible to import geometry exclusively from a 3D view, as well as geometry based on family names. Nonetheless, is there a method to amalgamate these two approaches?

Hi @H_Kramer,

the problem with the logic of what you are asking is this.

Yes, you can filter by viewed elements on a specific 3D view, combined with categories and family names. But if you combine Walls and Windows and then you input the name of a family of a window, you automatically exclude the walls from that logic, because there are no walls with that family name.

The best way in my opinion is to make two separate workflows: one for the elements where the Family is relevant and another for the elements where the family name is not applicable.

View category and family name.gh (14.0 KB)

I hope this helps!

I tried i but it doesn’t import any geometry.

Can you check the result that you are getting after the Element Geometry component with a Panel and post an image?

I also changed the way that you can select the name of the family in case that helps.

View category and family name.gh (15.9 KB)

This solution is effective, thank you. However, when implementing a section box in Revit, it retains the entire element in Grasshopper, even if a portion is outside the section box. Only when te whole element is out of the sectionbox it is hidden. This issue likely pertains to the interaction between Revit and Rhino.

May I pose an additional inquiry? Is it feasible to export the outcomes of my daylight factor calculations back to Revit? These results consist of two meshes and some text. Do you possess expertise in handling such queries?

What does this outcome look like in Revit? What type of element or parameter are you looking to do?

Could it be possible to build up a new modle. If I use the grey mesh. otherwise, the coloured mesh and text in a wireframe modle would be enough?

For the section box case you can do this with the Element View Geometry component.

When it comes to exporting the mesh of the analysis into Revit, I have never done it or seen it. You could definitely export the text but I am not sure it would be very helpful without the mesh. All the colleagues I know that work with these kinds of analysis never export the mesh to Revit, but I understand that it could be helpful.

Hi @H_Kramer,

what about something like this? Just modify this to adapt it to your mesh and text.

Mesh to Revit.gh (21.0 KB)

1 Like

It works! But what does the horizontal and vertical align do? And is it possible to place the data in a specific Revit (3D)view/level?

I am glad it worked!

You are placing the mesh as a DirectShape, so you can see it in any view, but the text will only be visible in the view where you created it, unless you open another view and create a new text. It is not possible to create text in 3D views with the Add Text component (View ‘{3D}’ does not support text notes creation). You can create it directly in Revit in a 3D view, although it has some problems in terms of insertion point and seeing the text when you navigate in the view. Another alternative is the Model Text, that you can actually visualize in all views (just make the depth as low as possible to make it look like a flat text), but there are no components for this in Rhino.Inside (see this link). Maybe @Japhy can shed some light on this :sweat_smile:.

The horizontal and vertical align are just for the text, like any regular text in Revit. It is the text justification in Revit.

1 Like

I encountered an issue with my grid. It appears that the sensor points are incorrectly positioned. These points do not align with the room’s surface that I intend to calculate. I am seeking a solution to this problem. The outer points should be 0.5m away from the wall.

Is it also possible to only define the surface of the glass opening in the frame? So my daylight factor calculation will be more accurate. With the possibility to automatically define one or more glass panels?

Yes, you can just select the glass of the windows by looking for the subcategory. Be aware that you will then have a gap between the walls and the glass panes. I guess you will need to get the geometry of the frames/sills and export it in a different Rhino layer. Just invert the cull pattern to get this.

Interior curves of windows_Subcategories.gh (13.0 KB)

This works, but now I’ve got the problem with finding the orientation of the bounding box. It only shows a surface of one of the bounding box instead of all of them. As your script used to work.

Old:

New: