lørdag 23. mai 2015

Everyday Dynamo - Linear Interpolation with Three Variables

It's been a long time since school..

As an engineer I feel like I'm putting my head on the block here, but it's been a while since I interpolated between values, even with two variables. And when a situation at work demanded linear interpolation with three variables, I must admit that my mathematical memory failed me..

But why think long and hard, when you can solve it with geometry and Dynamo?

Case: I was given four allowed ground pressure values by a geotechnician by two variables: Foundation depth and foundation base width


So three variables can be represented in 3d-space: X=Base width, Y=Depth and Z=Allowed ground pressure. And if the values are linear they should form a plane, right?
Now if I create a X-coordinate and an Y-coordinate (My wanted values) and project it vertically onto the plane it gives me a point which represents an interpolated value of all the three variables.
Extract the Z-Value and you got your allowed ground pressure!

the simple definition:


So 177.5 it is.. no sweat.

torsdag 7. mai 2015

Ammo: Volume between toposurfaces

Much has been said about the topo tools in Revit, and I for one vote for Civil 3D any day. But once in a while (or rather often) we want to keep things internally in Revit.

An operation that I've always wanted to do in Revit is to calculate the volume between two seperate toposurfaces in Revit. Yes, you can use graded region and phases, and yes, it is cumbersome at best.. What often is the case is that the existing terrain is measured and modeled up early in the project and then the data for the excavated site are delivered later in the project phases. Equally often the data has different outreach in plan and therefore it is sometimes difficult to make any sense of the cut/fill values in Revit.

A similar challenge arises with differences in topos when you have sheet piling.

What I found myself looking for is a method for how to find the volume between two seperate surfaces within a polygon that I've drawn myself.

So here is a simple definition that will do exactly that:


The number input must be large enough to cover both top and bottom topo from where the model lines are drawn.

And the results, with the imported geometry in revit:

Hope it can can be used for something good. Definition here

The next step would be to use different model curves for top/bottom topos for sloped volumes, but that is a whole other story..

Dislaimer: The Topography.Surface node can struggle when used on large topos. modifications soon to come based on Dimitar Venkovs excellent response adn research in this thread