Creating solids from volumetric surfaces via dynamo

Hello guys, i’m trying to create some solids from my volume surfaces inside dynamo, but i’ve encountered a couple problems:

First, when we create it directly from the civil3D UI, the prompt is somewhat different from the normal solid extraction:

image

as we can see, the normal parameters that define the solid (depth, fixed elevation and at surface) can’t be modified. So, the nodes i got to create surface from the civil3D toolkit all come with one of these parameters. Any ideas how should I proceed?

Besides this, I tried to continue creating a solid from my volume surface, using the TinSurfaceExtensions.CreateSolids with a depth of 0, because it looks like to me this is the input the API takes when doing this operation, but when I try to, I get the following input error:

image

In this case, how can I change my Autodesk.Civil.DynamoNodes.Surface, which I get from selecting my surface in the model space, to Autodesk.Civil.DynamoNodes.TinSurface? I Tried using the object.geometry node but it always give me “non-implemented” with surfaces input, and I’m a little lost here.

Thanks in advance

Generally speaking, the functionality that you see in the UI is not necessarily the same as the methods exposed in the API.

This is a good example. The _AeccExportSurfaceToSolid command is doing more than what is exposed in the API for TIN volume surfaces, which (currently) doesn’t have any methods for extracting solids.

I don’t think you’ll be able to use this node with volume surfaces because volume surfaces are a different class:

TIN volume surface → TinVolumeSurface class
TIN surface → TinSurface class

Both inherit from the Surface base class (which is why you get a type of Autodesk.Civil.DynamoNodes.Surface when selecting it), but the methods for extracting solids are unique to the TinSurface class.

So, I can’t replicate what the UI command is doing, not even via python?

I guessed that the “0 depth” showed in the prompt was misleading, and from what i read in the forum, i’m guessing i won’t be able to come around this (i was thinking in something like getting mesh’s from the Surface and converting them to solids, but idk if this is really needed…)

if all of this isn’t possible, I was thinking of going with the good old macros, but i’ll need to study it, since i don’t know if I can chain multiple actions (like, select surface A → extract solid → deselect surface A → select surface B → extract solid. And Don’t really know if I can make it smart (filtering by type/name of surface, something like this) and flexible (variable according to the number of my surfaces)

Ok, after some research and experiment, what I can guess the command is doing, is taking both the surfaces used for making the volume surface, and generating the solid with the “Create solid at surface” command, using these surfaces as basis. The only catch is that I feel like it’s waaaay faster when i try to generate it from the volumeSurface than from both TINSurfaces.

That makes sense. It might be faster because all of the differences in elevation have already been computed to build the volume surface.

yeah, that’s what I thought, but if we take the times separately for each action (extracting volumetric surface then generating the solid, taking out the human factor), and creating it from the direct command/node, seems to take almost double the time. I’ll look into it more and come back with my thoughts

thank you @mzjensen