Volume Calculation for topography solid by layer

Dear All,

I would like to calculate the volume of topography by specific level different. Maybe its a silly approach, but the concept that I planned to use as following:

  1. Generate the solid from the topography.
  2. Create a large enough mass above the topography.
  3. Use dynamo to form the script about geometry intersection for volume
  4. Shift down the Masslayer by layer and the volume be calculated.

May I ask is there any method or script that can be used? if the approach is possible, I don’t know how to form the script about the part of geometry intersection for volume. Can anyone help? Sorry for causing any inconvenience.


1 Like

Hi there,

If it’s just about creating one big volume from the topography and cutting it up, then you can use something like this:

Since the topography is a mesh, you first have to convert it to a PolySurface (Spring nodes has a great node for that, so be sure to download that package), then get the individual surfaces. The perimeter curves can then be extruded as solids vertically down to generate a nice solid based on the topography.

The bottom of this solid will follow the contours of the topography so the next step is to chop-off the bottom into a nice flat base with the Geometry.Split node. Now that you have an overall solid, you can again use Geometry.Split to split the topography at different levels of your choice (you will need to edit the script to suit the inputs you need - i’ve created planes at 500mm intervals).

Then using the number slider you can determine where the topography solid is split and extract the volume from that. You can see in the image below that the volume increases as the cut planes moves further up:

Hopefully it’s of help.

Note: this method will be very slow to process if the topography has a lot of surfaces

Script made was using Dynamo version 2.3:
Topography Volume.dyn (53.3 KB)


Dear Andy,

Thank you so much @Andy_Grout !! It works!! Thank you for your time to help me with the script.

When I try the calculation, I found that the secondary topo crest (Red dotted line part) will disappear when calculating volume (1+2) as the top boundary cannot touch that. Also, same case when calculating the overall volume (1+2+3+4)
Is it cannot be fixed? Thank you again for your big help!!

I suspect the split node is splitting the solid into three, instead of two volumes for cases like this. Can you expand the results box under each of the last nodes and post that?

If this happens to be the case, we may be able to dispatch the one solid we don’t need from each sub list and combine them via Solid.Union before feeding into the volume calculation.


@Andy_Grout Here’s the step by step. Thank you.

I can’t seem to re-create the issue you’re getting. Can you share your topo file?

If I can take a look at your file, I can get back to you tomorrow

1 Like

@Andy_Grout Thank you for your time, I found that it may be caused by my improperly setting at those 2 numbers (thickness and the datum level). After I turned the number, the problem of solid disappears be solved! :bowing_man: :bowing_man: :bowing_man:
However, to determine the volume including “the top” part still with that warning. :face_with_raised_eyebrow:

Great, glad you managed to work it out :+1:t3:

Dear @Andy_Grout , I am trying to apply it in my real project. The profile of rock excavation as below.
If I only consider the volume above -12825, is the parameter setting correct? Thank you. :bowing_man:

Dear @Andy_Grout, as you can see the base is not flatted :cry:
Am I got some misunderstanding for parameter setting? Thank you :bowing_man:

It looks like the solid you are getting is the bottom bit (which should be cut-off) rather than the top part. See image below, you can try changing x[0] to x[1] in code block highlighted. This simply gets index 1 of the result from geometry.split rather than index 0.

Otherwise it’s difficult to troubleshoot more without having the geometry to study for you.

1 Like

@Andy_Grout, since the file size about 14MB, I uploaded it to google drive for your information. The file is Revit 2020. Any help would be much appreciated :bowing_man: :cry:

Hi William,

Thanks for the topography file. For some reason the planes weren’t cutting it (pun intended), so i used another method to create ‘cutting planes’ with which to cut the topography solid. You must draw a filled region on your 0.0 level plan (larger than the topography area) and select that in the ‘select model element’ node:

The surface from this filled region is then extracted and re-positioned at the correct ‘base’ layer by a translate (move) node. As a side note; I didn’t want the surface showing in preview so i’ve added a node to only show the perimeter curves as a visual reference of where this plane is in dynamo.

I also flattened the results from the first geometry.split as it was a list of a list and so the “x[0]” code block was extracting both split parts of the solid. This may be why your solid before was not cutting with a flat base

Updated script here: Topography Volume2.dyn (68.7 KB)


Dear @Andy_Grout , Cheers! It is really comprehensive. Your dynamo skill is incredible. I am really glad to have met you!! :sob: Thank you so much. I will try my best to learn dynamo :muscle:.


You’re welcome. Glad to have helped

1 Like