Generate Solids Between TIN Surfaces with Dynamo for Civil 3D

Hello @Paolo_Emilio_Serra1

I am working in the geotechnical department of a big company as CAD/BIM technician.
I got a lot of tasks regarding to generate solids between surfaces.
This year I got the opportunity to install Civil 3D 2021 + Dynamo so it feels that finally I should solve it.
I have found an interesting video here from your training:

I am new with dynamo, so I am learning, finding good examples to apply in my work.
I have tried to script your Dynamo’s nodes and also I have written the entire Python’s code (in the node Python Script).

I got an issue when I run the code:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 37, in
ImportError: Cannot import name Messagebox

Do you know how I can solve it?

I have sent to you the .dyn via message. I hope you got it. Some images below:

Thank you so much!

Regards, Davide Bonfante

Hi,

Please check for the Civil3DToolkit package also from @Paolo_Emilio_Serra1 to install it in Dynamo.
There you will find the nodes to create solids from TIN surfaces.

Regards,

Hello!

Thank you for your answer!
I have installed it.

My task is not to create a solid from a surface but I am going to create a solid between two surfaces, starting from a polyline as boundary.

The error now is:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 232, in
File “”, line 205, in create_solids
StandardError: Cannot create a PolySurface from an empty list

I attach the nodes I have created following the example in the video:
TinSurfaces.dyn (18.4 KB)

How can I solve it?
It is really identical to the example in the video but it doesn’t work.
This process would be really important in our design.

Thank you everybody!

Regards, Davide

Capture

You’ve made a typo.
Python is case sensitive.
Use MessageBox instead of Messagbox

@e.winter Thank you! I have already written Messagebox (look the picture).

The code that I have written is identical to the code of @Paolo_Emilio_Serra1

@mzjensen It seems interesting! Can you please show an example about how it works?
Do you mean that this node replace the python script?

Thank you!

Regards, Davide

Re-read what @e.winter suggested. Python is case-sensitive. You’ve typed Messagebox but it should be MessageBox.

I’d actually say it the other way. Your Python node is replacing something that already exists :wink:

@mzjensen that is amazing! I am on my way to office. As soon as I get to the office I try it.

I take the opportunity for questions.

  1. The python script would make also possible to create a boundary (fo example a “close” polyline) and extrude only the surface’s portion delimited to the selected boundary. Is it still possible with this node? Is it “path” maybe?
    PS of course I should cut the surface from Civil 3D but I am curious about it :relaxed:

  2. Can I get the area & volume of the new generated solid between the two surfaces?

Regards, Davide

  1. I haven’t tried the path, not sure if it works like this, but you can create a temporary surface by cropping the tin surface, using it to create the solids, and then delete it if you don’t need it :

  2. Yes you can get the volume using standard geometry nodes :
    Report volumes

The area as well you just need to select the faces for this.

Thank you so much for helping me! I really appreciate your support, it helps me to understand the approach! I wish you a good week!