I’m working on a script that would retrieve the footings from a structural model and place zone of influence trapezoids at the base of each footer for the purposes of trench/subslab pipe coordination. As part of that, my plan was to get the host wall, project the location line down to the relevant surface height, extend the line across the surface, and then place a line-based family with a trapezoidal profile that references the footing width and footing/soil conditions to determine the trapezoid’s depth.
I (naively) thought that a simple rectangular footing without stem wall would have six surfaces, of which I’d just grab the surface with the normal pointing downwards and use that as the ‘top’ of the zone of influence family geometry. So I was a bit surprised to find wall foundation elements in my test project with 12+ surfaces.
Digging deeper, this seems to be a consequence of the architect having wall profiles with some awkward editing, causing the foundations that are hosted to the walls to have vertically displaced sections. I think I can deal with those simply by checking the surface’s height and filtering against the foundation level.
But it leads me wondering if I’m missing other edge cases. For instance, I’m not positive my logic works for arc/ellipse-based wall elements. Also, is it possible for the footing cross section to vary in width? There’s also eccentricity to consider on the projection, but I think I can handle that using the wall normal and eccentricity value to displace the projected line.
First a general note: Trying to use a loadable family to account for the flexibility inherent to system families is pretty much always going to miss and edge condition. The Revit team has had footings as a system family instead of as a loadable one for well over a decade now, so there is clearly enough need in the larger industry, and as such it is VERY likely that you’ll have a problem with making a single loadable family do all the work here, and the flexibility ought to be accounted for.
When I have done excavation volumes previously I have done something like this:
- Get the elevation of the lowest min point of the bounding box around all the footing elements.
- Get the elevation of the highest point on the terrain.
- Get the delta between the two elevations and add 10 or some other reasonable number to assure you go more than needed.
- Calculate the maximum horizontal offset based on the expanded delta and your excavation slope.
- Extract all the faces pointing down in anyway way (z component of the surface’s normal < 0)
- Get the perimeter curves of ‘down’ pointing face.
- Build poly curves of the extracted curves using the by grouped curves method.
- Get the largest polycurve by enclosed area
- Reverse any curves with a normal that is less than zero.
- Offset that polycurve outward by the horizontal offset.
- Translate the offset curve vertically by your maximum height.
- Build a solid by lofting between the largest polycurve and the translated offset curve.
- Union the solids into one solid.
- Convert the solid to a mesh using either mesh toolkit or the new mesh tools (new mesh tools preferred).
- Split the excavation mesh by the terrain mesh.
- Get the excavation mesh with the lowest min point - the volume of this mesh is your excavation.