Calculating excavation volume in multiple levels

Calculating excavation volume in multiple levels

Anonymous
Not applicable
1,061 Views
6 Replies
Message 1 of 7

Calculating excavation volume in multiple levels

Anonymous
Not applicable

Hello,

assume we have a topography with 20m depth and sloped edges, 

"Cut" parameter of element returnes total volume of excavation, but i need to know how much excavation is between 0 and 2 m depth, how much between 2 -4 m and so on;

as i figured out, topography elements consist of some mesh geometry, and there is no "Solid" to work with it's faces,

a possible solution is to create multiple virtual building pads, calculate their "Cut" parameter and roll back transaction each time, however, i didn't try this because i am looking for better solutions.

is there any way to accomplish this within revit api? 

0 Likes
1,062 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Are the volumes convex?

 

I would just grab the XYZ points and calculate the volume directly from those:

 

http://thebuildingcoder.typepad.com/blog/2009/06/convex-hull-and-volume-computation.html



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 7

Anonymous
Not applicable

Dear jeremy,

These excavation are not necessarily convex and may be of variety of shapes - and slop of a single edge may change in elevation. so they don't make any single pyramid,  cylinder or cube but maybe a mixture of them.

So, is there any way to work with these meshes themselft instead of extracting some points from them ( from their traiangles vertices)  to create volume? Using what method revit itself calculates exact Volume of cut and fill between some complicated surfaces?

 

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk

Search the Revit API help file RevitAPI.chm for "Volume property".

 

The Solid class has it, and many others besides.

 

I am sure one of them will fit your needs.

 

Always do some minimal research yourself before asking others, please.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 7

Anonymous
Not applicable

Thank you for your recommendation, but i did more than "minimal" search, not only in .chm but also in api developers guide. i think here is a place to exchange ideas and solutions, i first introduce my own solution and ask others for better ones!

 

i appreciate your answers but it seems that you didn't read my first  post carefully , i mentioned that there is no "solid" in topography elements, they are "mesh". i am familiar with solid class and its methods and properties and used it several times for elements such as structural framings, floors and walls.

 

for our information: according to revit api developer guide:

 

Typically, the objects returned at the top level of the extracted geometry will be one of:

• Solid – a boundary representation made up of faces and edges

• Mesh – a 3D array of triangles

• Curve – a bounded 3D curve

• Point – a visible point datum at a given 3D location

• PolyLine – a series of line segments defined by 3D points

• GeometryInstance – an instance of a geometric element positioned within the element

 

i think i would use my first solution ,  temporary building pads.

thank you anyways.

 

 

 

0 Likes
Message 6 of 7

jeremytammik
Autodesk
Autodesk

Thank you for clarifying the research you did.

 

That helps a lot, and I was not previously aware of that.

 

If you have a mesh from the topography element and it represents a volume, you might be able to generate a solid from it using the TessellatedShapeBuilder, and then query the solid for its volume.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 7 of 7

Anonymous
Not applicable

Thank you for introducing TessellatedShapeBuilder,
however, we need some "face" to create a solid using TessellatedShapeBuilder, and we don't have any faces, just a mesh with its triangles.
as far as i know, we can convert a face to a mesh by using .Triangulate method, but not from mesh to face. it seems logical because every triangle itself is a standalone face and each of them may be in a different plane, so it is not possible to convert a mesh to face.
i think i should give up creating a solid from topography and it seems the only solution is to work with xyz points of triangle vertics as u mentioned.

0 Likes