Introduction
Last week I had a nice conversation with one of my Italian friends. The focus of the conversation was how to model a tunnel in Revit starting from an Excel list of points coming out from Civil 3D.So the answer was: Dynamo of course!
First input, the section of the tunnel with his diameter; I can't share the details but lets say that we have:
- Theoretical excavation profile: 200 mm
- Precast segment thickness: 500 mm
Whit this two elements and the excel of the theoretical cent alignment, we can do everything!
Revit profile family
The first family we're going to create is a simple circle profile with a diameter parameter. This family will be as a mass category to be able to nest it later in an adaptive component family for the tunnel.
Just save this family...easy!
Tunnel model
Now we can create a new family as generic adaptive component and load the profile just created. It's important that the family is able to host rebars for future structural modeling.
Whit these elements ready we can start the first script for Dynamo. This script is basically reading a list of normalized point coming from Civil. We need normalized points just because we want our tunnel placed exactly in the origin of the family so, we'll be able later to place it in shared coordinates in the project.
I can't show you the list of points but, it will be easy to understand how this is made: is an Excel worksheet with PENZ format (point name, east, north and elevation)
Then we can read points from the excel and according to the percentage of points that we want to use, recalculate the location of point at equal distance on the curve.
As always when it comes to curves, we need to calculate direction and normal of the curve on specific points.
It's easy to do it just finding to points very close to each other and find a vector between two points. Then the normal is just the cross product between this vector and the Z axis :)
For the last point I used a little trick, reverting the direction of the curve to find the point for the direction, otherwise, there're no points after that and you won't be able to calculate the vector.
Before placing the profile, we need the rotation as well, and to this angle we can calculate the angle between the direction of the curve and the X axis (because the family profile is created as orthogonal to this axis)
Finally we can place the profiles for both the solid and the void. We'll need two solids and two voids to achieve the result. I put this two elements in the same family but, it will be better keep it as separate elements and separate families.
Just a little bit of colors (materials) because life is better with colors!
And this is the final result
Sometimes the void is not cutting the solid automatically so, you need to manually cut with Revit tools.
Cool!
Now just save the family and load this family into a new project.
The project
So place the model in the correct location is easy, we can just use a family by point node and select the tunnel family that we just put in the project.
Last but not least we can adjust the correct project base point to match the real coordinates.
Sections
Now that we have our model placed correctly we need to create sections, both cross and longitudinal.
Those sections should be aligned to the alignment and with a predefined distance.
Dynamo again is the key for the success. We'll use same alignment to find those points and place a section view following the normal vector that we already calculated previously.
For this example I chose to have cross sections each 5 meters and long sections each 15 meters. Then we can choose to start from the beginning of the alignment or from the end, it depends on the alignment direction.
Again we calculate direction, normal and with these point we can place the sections in the correct way. To create a section we need two points as a bounding box. I used to have a buffer to identify the far clip plan and the section diameter to create the right section dimension.
Just a little bit of string manipulation to have a good name for the sections.
And...run!
150 sections just in one click and perfectly aligned to you model, this is awesome, isn't it?
Thanks Dynamo :)
As always everything ready for you to try, except the excel file because is related to real data.
Enjoy and see you on the next tutorial.
Cesare
Hi Cesare ...The uploaded file link seems to have expired ..Care to upload again ?
ReplyDeleteThanks and regards,
-Deuces
Hi Cesare
ReplyDeleteGreat Tutorial
I try to create sections in the project, but it's possible that between the picture 1 and 2 is missing a another photo??
Thanks for all
Hello Cesare, is it possible to update the link to download the content?
ReplyDeleteAwesome!
ReplyDeleteHi Cesare,
ReplyDeleteGreat tutorial, could you upload or share the download link again? It seems to have expired.
Thanks in advance.
Hi Cesare,
ReplyDeleteGood Day. Hope ypubare well. This blog of yours is very interesting. Could you please share some tips and tricks on tunnel modelling like this blog you have here. It would be a big help with the current project I am in.
Thanks.
Justo
Hi Cesare!
ReplyDeleteGreat post. I´ve been looking for something like this in a while. I wanted to ask if you can upload the link again, apparently it´s expired.
Thanks!
-Ignacio
Hi Cesare,
ReplyDeleteThanks for sharing. Seems that the link for the script is expired, can i ask for a new link so that i can learn how to do it.
Thanks
Donn
Thanks for the best content
ReplyDeleteGREAT WORK
IMPRESSIVE!!!
REALLY APPRECIATE YOUR WORK!!!
Bim consulting USA
Thanks for the best content.
ReplyDeleteIf you can, Could you send me the file..? Because i can't not download..
hi Cesare,
ReplyDeleteawesome post, is it possible to get the content?
Best Regards
Eva
Hi Cesare..could you please reload the files...would be helpful!
ReplyDeleteI can't download the link has expired, can I ask for a new link, I'm waiting on email cu2setiawan@gmail.com
ReplyDelete