I would like to know how can I extract the outer curves (making the geometry of the building) and inner rectangles (openings for windows) from a mesh as shown in the picture. I have a .obj file and when I select the mesh, it selects all the meshes. COuld you please share some ideas on how can I extract useful curves from it? It can either be in Grasshopper or Rhino itself. Your help will be much appreciated.
Hi -
From the looks of it, you could use BoundingBox to create “the geometry of the building”) and DupBorder to get the curves for the windows.
-wim
BoundingBox works for the volume of the building but DupBorder does not extract the curves of the windows. Do you think any other command can do this?
Thanks again
I would like to know how can I extract the outer curves (making the geometry of the building) and inner rectangles (openings for windows) from a mesh as shown in the picture. I have a .obj file and when I select the mesh, it selects all the meshes. Could you please share some ideas on how can I extract useful curves from it? It can either be in Grasshopper or Rhino itself. I have tried Boundingbox and Dupborder but it did not work. Your help will be much appreciated. I am attaching the Rhino file also
Please don’t start new threads on the same topic. You can always try to revive a thread by adding more information. Also note that there might be fewer answers during a weekend…
The DupBorder doesn’t work because there are no naked edges. In the attached, I offset the bouding box a bit inward to cleanly intersect with the mesh somewhere inside the walls. An intersection between the two will then provide the window curves. You then need to place those back onto the original walls, which I did by extruding them and intersecting with the original bounding box…
Sorry for that. I will be keeping your advice into consideration.
And thanks a lot Wim, it works very well.
I hope I am not being obnoxious but I have another question; can I explode the four sides of this building with their respective windows into 4 separate parts?
I wouldn’t call it obnoxious but moving the goal posts during the game is generally frowned upon;)
Try to completely define the problem in the first post.
The attached is not perfect but might provide something to build further on.
I am having some issues with the script. I was using your script to build on further, however, when I clear values (from the first node where we selected the mesh) and selected the same mesh from the same file; the curve is not closing properly and it is making a diagonal line. I think the issue is with the Close Curve node. I tried to go around this but I could not. Could you please be so kind and help me again? (you can use the existing rhino file I uploaded before to check if it distorts the lines if you select it again.
Thanks a lot
From the description and the picture, I’m afraid I don’t understand the issue that you ran into - you should always provide the .gh file.
At any rate, since the goal posts were moved mid-game, the previous solution was more of a hack to try to hit the new goal with the old strategy. Given that you really are after the walls, the following might be better:
This will take a few seconds to open. Generally, making NURBS surfaces from meshes is a bad idea because you might end up with a lot more geometry than your machine can handle. In this case, though, that’s not a problem and a good way to get clean geometry. Most of that definition is coming up with a strategy to only keep the walls that you want.
In your first post, you wrote that either Grasshopper or Rhino was fine. If you want to do this in Rhino (as there doesn’t seem to be a lot of parametric changes involved in this workflow), you can use the ToNURBS command, followed by MergeAllCoplanarFaces. Then extract the surfaces that you need.
-wim
Sorry, I think I was not much clear (I was trying to be as concise as possible which did not prove beneficial) so I will try to explain myself better this time.
Actually, my main motive is to extract walls with the windows on that specific wall to build further geometry by placing solar panels on the wall face considering windows as forbidden areas for solar panels to be placed on. Everything was going fine until I tried to reselect the geometry from the .3dm file which I attached earlier.
If you open the gh file (you created) attached below and then clear the values in the very first node (Select Mesh) and then reselect the same geometry from .3dm file again, it will distort the geometry as shown in the image. It works fine as long as I do not reselect the geometry from .3dm file.
I mentioned a solution in either Rhino or Gh since I want to have the surfaces that make up the building and windows so I can extract walls and windows as stated earlier which I did (thanks to your help). I am making a parametric model indeed so I can use it for similar .3dm files (different buildings) so the solar panels adjust themselves on the walls keeping windows into account.
I am not sure if I made it simple to understand or more complex. Please let me know of your comments.
I will check the new file you have attached (very grateful for that ) and thanks a lot for bearing up with me.
Kevin, I really appreciate it. It is much closer to what I am looking for. I need help in two more things:
I do not want to Cull the Roof structure (only the bottom part). The roof surface can be the 5th surface
I would like to extract windows surfaces as well besides the facade. (Right now, windows are appearing as an opening in the facade and I cannot increase/decrease the sizes of windows). If windows are separated into separate surfaces then I can perform intersection of extruded facade surfaces with windows surfaces then (I think) it will give me the windows for each facade separately. Can you please help me in getting those openings as surfaces?
I totally acknowledge that I am appearing to be spoon-fed and I totally appreciate your time and effort. I am really new to Grasshopper and importing geometries from Rhino seems to be very difficult for me.
I did something on my own to get windows on a certain wall. I am not sure if it is really efficient solution or not. I would like your comments on it (and also portray that I am trying myself too instead of only being spoon-fed )
This solution works with your mesh, but it is dependent on the mesh being aligned with the world axes. Also, the code to find the roof surfaces is dependent on the side wall normals being aligned with the world X-axis.
There are many ways to approach this. The best approach would be to go back to the source of this object - these elements could be isolated from there.
If you don’t have access to the source of your mesh, a more robust solution could be found starting from the edges or faces of your source mesh. I looked into this, but it greatly increases the complexity of the code.
You’re totally right. I think the script which @wim created is also dependent on the world axes because every time I reselect the source mesh, it distorts the surfaces (facades) created in Grasshopper. The same is happening with your new script. I am unable to change or control the source mesh because it is created in FreeCAD by another person. However, your previous script seems to work independently of the world axes even when I reselect the source mesh which is great. So, I will use your first script to further build on.
Thanks a lot for your help @kev.r and @wim . I have learned a lot from you guys. This forum is amazing <3
This shouldn’t be dependent on the orientation of your source mesh except that it expects the upward facing surface normals to be within 5 degrees of vertical so it can cull these surfaces.
Hi Kevin, this one is awesome. Just one question, what do you mean by upward-facing surface normals to be within 5 degrees of vertical? Is it for the pitched roof?