I got the math and a idea on how to calculate the volume between two terrainmodells. But for now I haven’t looked into howto get it into freecad.
I have a function that takes the coordinates of a 3D triangle and the point of interest(xy) and finds the height of that point in the plane the triangle coordinates describe.
So the idea is to have two terrainmodells and place a grid over them with a point distance that fits your agenda. Then calculate the hight for that point in each modell, that gives you a hight. The hight is then multiplied to an area, think of it like pillars between the models.
The problem though is the edges of the models and it probably needs to be calculated parallel.
Volume between terrainmodells.
- microelly2
- Veteran
- Posts: 4691
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Volume between terrainmodells.
Hello and welcome to the forum.
You are right. If you have two terrains you can transform them to elevation grids and then calculate the volume difference data.
I think we can reuse your ideas here in the Civil engineering threads
https://forum.freecadweb.org/viewtopic.php?f=8&t=22277
https://forum.freecadweb.org/viewtopic.php?f=8&t=6973
to build streets through hills such questions have to be answered.
at the moment we are working on methods to map a 2D path to a 3D terrain.
adding and subtraction material is the next step.
You are right. If you have two terrains you can transform them to elevation grids and then calculate the volume difference data.
I think we can reuse your ideas here in the Civil engineering threads
https://forum.freecadweb.org/viewtopic.php?f=8&t=22277
https://forum.freecadweb.org/viewtopic.php?f=8&t=6973
to build streets through hills such questions have to be answered.
at the moment we are working on methods to map a 2D path to a 3D terrain.
adding and subtraction material is the next step.
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Volume between terrainmodells.
Absolutely. Earthwork calculations are a big part of most any civil engineering project, so the ability to accurately compute volumes between two terrains is key. At the moment, I'm trying to get a refactor done of the sketcher tools I'm creating for the Transportation workbench. If I can get it done (hopefully in the next week or so) we can start on the projection issue. That may be optimistic, though.microelly2 wrote: ↑Sun Feb 25, 2018 10:39 pm I think we can reuse your ideas here in the Civil engineering threads
Volume calculation is several steps away for the Transportation wb, but it will be a critical component eventually.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Volume between terrainmodells.
If freecad could be extended with a functional language ,like Haskell, there would be easier to do parallel computation.
- microelly2
- Veteran
- Posts: 4691
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact: