Truncating a Civil 3D surface

(See bold for the gist.)
I have been in a years-long struggle to find/create a consistent method of calculating complex flood plain mitigation volumes, and I believe the biggest piece of the puzzle that would resolve a number of issues at once would be the ability to truncate a surface at a specified elevation.
This is similar to the “Build” option in the surface properties where you can exclude the surface above a particular elevation; but with my so-called truncated surface, I need the surface to have definition at that specified elevation. So, all elevations below the specified elevation remain the same, but everything above simply gets “flattened” and set at the specified elevation.
Of course it can be done with extracted elevation lines and boundaries, and a million component surfaces, etc., but I’m trying to avoid all of that tedious work that frankly no one besides me will ever do anyway. I’ve tried juggling and combining all kids of different comparisons and auxiliary surfaces, but I’m not sure it can be done with conventional C3D surface tools.
Therefore I’m wondering if Dynamo would be of any help. Nodes for doing almost anything with surfaces/surface points seem to be pretty sparse or non-existent. Is dynamo even equipped to do something like what I’m looking for? (Without a ton of raw API/Python coding…)

First up:

Dynamo is coding. Some of it is simplified, but it is coding all the same. If you heard otherwise you were misinformed.

Next up:
Instead of modifying the surface, extract the points and convert to Dynamo geometry. Take each Dynamo point and if the Z component is greater than the elevation set the point to be at the maximum elevation, make new points, a new point group, and finally a new surface.

I’ve created a ton of Dynamo scripts, so pardon my misuse of the word “coding”—which I specifically meant to refer to coding that doesn’t use already made nodes. (No one has ever “told me otherwise”, since that seems to bother you so much.)
I had a feeling it would entail be using regular geometry, and then converting to a Civil 3D surface. I’ll do some digging, since manipulating surface geometry within Dynamo are pretty new to me.
Thanks.

Hey @jameshitt! :wave:

I think a key question here is: do you want to modify the original Surface, or create a new one with the changes? There are different implications to each.

Modifying an already existing surface is probably what I want since this will be an iterative process—volumes get rechecked as grading progresses.
I think I have a couple ideas how I might approach it. I’ll have to prepare a copy of the proposed grade for use in this operation, and inside Dynamo, add the intersection line of that proposed grade surface and the BFE surface (a single flat elevation) to the the surface, and then it should be all point manipulation from there to get it “truncated”.
(The hardest part will just be making all the connections, converting data types, finding the right nodes, etc… Maybe even that intersection line might be easier to generate if I create the comparison in CAD and just pull the zero contours in. It’s a lot of avenues to explore!)

Sounds good! Here’s a (potentially) simpler option:

  1. Get the proposed grade surface (or a copy as you suggest)
  2. Get all the points
  3. Filter the points by Z value so you’re left with only those greater than the BFE
  4. Set the Z value of those points to the BFE

Conceptually, this is just “pulling down” the points that are above the BFE.

There will be some API calls needed using a Python node.

Thanks for the input!
Is the API/Python stuff required in order to update an existing surface?

Yes, because it will require adding a new build operation to the surface.