Extract Volume of soil from contour and patch

I would like to ask for help on how to extract volumes from patched contour lines.
I will then compute for excavation and fill volumes for the soil.

052719.3dm (69.1 KB)
052719.gh (14.0 KB)

However, every time I try to convert a patch to a BREP, an error occurs.
Please see the attached files.

Patch function, if Trim=true (default), will attempt to trim the output by “pulling” the biggest curve to the generated surface and use the resulting curve to trim the surface itself.
It will be almost never be flat, so you can’t cap it.

In this solution i just “trim” the un-trimmed patched surface with a planar surface made from the biggest curve.
Added a “sorting” method to find proper level height “index” of every curve from an unsorted list.


sort_contour_lines.gh (31.8 KB)
(your curves are internalized)

Thanks a lot! I’ll try this out.

One way to measure the volume is to use a mesh.


052719_re.gh (40.3 KB)

1 Like

Nice!
Yours is a much better solution!

Thank you very much!

Just a side note, you may want to study how data trees work. Your definition should never look like that with all the same procedure copy / pasted multiple times.

Thank you very much, I haven’t grasped the concept of data trees fully. Alright, that will be on my list.

Check out sections 1.4 and 1.5

1 Like

thanks big time!