Since the recursive algorithm was so slow and with the slicer approach I have a list with volumes I thought why not create contours at volume intervals. Might be useful for flood simulations.
I renamed the whole macro to "VolumeContours".
The TBC-built-in function to compute all this starts to return only total volumes if I go below a certain slice thickness, 0.0001 m / 0.000329 ft. Which is surprisingly smaller than the earthworks report can do, which starts to return totals if I go below 0.001 m.
Keep in mind that even with 0.0001 m slices the volume on large surfaces changes too much to compute a 100% accurate result. The result/contour is created once the slice sum is >= the target or the interval.
Sidenote:
The earthworks report into Excel also seems to be super inefficient. On a tiny test surface with 10 triangles, 10 m height and slice thickness 0.001 m I can't even press the stop watch quickly enough with my macro, but the report into Excel takes 6 minutes for those 10000 lines. HTML report is much quicker, about 3 seconds, but wouldn't give you all the slice volume decimals.
------------------------------
Ronny Schneider
------------------------------
Original Message:
Sent: 12-29-2021 06:50
From: Ronny Schneider
Subject: Find the altitude for a given volume
I had some time to dig into the computation via macro. I found the issue I had a while ago and also found out how to create a contour via macro.
https://community.trimble.com/communities/community-home/digestviewer/viewthread?GroupId=415&MessageKey=307c6625-a550-4135-9212-13c7f6928b2e&CommunityKey=8a262af4-a35e-4e9a-9dd3-191cc785899a&tab=digestviewer
If you can run macros unzip the attached ZIP into a subfolder in "C:\ProgramData\Trimble\MacroCommands" and restart TBC.
I always just use meters as units, but I spend some time to look into unit conversion as well. It should work with whatever is set in the project settings.
It does use the same method you've been using with the Excel spreadsheet, so use the slice value wisely. If you have a surface with lots of triangles it can take a long time until you get the result.
I might try to tweak the code in the future. Instead of having thousands of slices computed, compute total volumes with large increments and iterate recursively with smaller increments.
Edit: I tested the recursive Algorithm, but it is much slower. In every loop it treats the surface as unknown and needs to compute the prisms, holes etc. from scratch again.
------------------------------
Ronny Schneider
Original Message:
Sent: 12-03-2021 02:17
From: Gregory Fyot
Subject: Find the altitude for a given volume
Thanks @Ronny Schneider for that. This is what i did when i didnt find any other way. Not precise IMHO, more like a DIY solution, but something we can do after all.
I remain sorry that this feature doesnt exist in TBC :(
------------------------------
Gregory Fyot
Original Message:
Sent: 12-02-2021 19:45
From: Ronny Schneider
Subject: Find the altitude for a given volume
Not directly, but you can still do it rather quickly with the Earthworks report and "Volume Breakdown" at the very bottom.
That will give the volume of each interval slice.
If you select to export the result into Excel.
You can just dragselect the Volume fields until you find the desired volume sum.
Afterwards you can still double check it with a standard volume report to this elevation.
------------------------------
Ronny Schneider
Original Message:
Sent: 12-02-2021 04:16
From: Gregory Fyot
Subject: Find the altitude for a given volume
Hi, i've got a basin of which i surveyed a volume limit perimeter and surface points inside that perimeter.
I can easily get in Siteworks or TBC the overall volume of the basin.
I want to get the altitude of a given volume inside my basin.
Example ==> basin goes from Z 100m to Z 80m and it contains 1000cubic meters. If i fill the basin with 800 cubic meter of water, i want to know the Z of that water level.
Is there any way to achieve this in TBC ? Seems like i can only find a volume inside the parent one but with a given Z (surface against elevation).
------------------------------
Gregory Fyot
------------------------------