Split geometry into individual buildings

Soooooo…

This is a concept I’ve been toying with for awhile. I’m a HUGE fan of the remember node in Refinery, and this workflow is a prime example of the potential. I say workflow because it’s actually a single graph but needs to be run in two environments - first in Dynamo for Civil 3D, then in Dynamo for Revit. Crazy I know, but hear me out as this is a bit crazy.

  1. First I opened the file in Civil 3D 2020 as AutoCAD. I had to clean up the CAD file to merge the surfaces to solids - doable with Dynamo but time to put into this effort was at a premium today. Deleted the bounding box, editing the block, selecting the street lines and deleting them (you only asked for the buildings - again time), then selected all of the polyface meshes which make up the building faces and used a convtosurf command, and then selected connected sets of buildings and used the surfsculpt command to create a watertight solid from the selection. Finally I selected all of the remaining surfaces and deleted them. Finally I exploded the block - giving me individual solids for each building / city block in model space. Took about 5 minutes total including the time to repair a bad mesh or two. It’s shocking how handy some of the AutoCAD tools are for data parsing. It might have been faster to use a ‘group surfaces’ technique in Dynamo similar to the classic group curves which @Vikram_Subbaiah illustrates here, but again, time.

  2. I then launched Dynamo in AutoCAD using the AECCLAUNCHDYNAMO command (since I’m in Civil 3D as AutoCAD I don’t get the ribbon button), and placed the following nodes:


    This gets all solids in the model space of the current AutoCAD document, and returns their geometry as Dynamo data, before passing it onto the Remember node. Data is then saved into the dyn when I save the graph (gotta love those element bindings eh?). I think close out Dynamo and Civil 3D and move back to familiar territory, launching Revit and creating a new project (glad I checked the units while I was in AutoCAD - needed to be in Metric).

  3. In Revit, I launched Dynamo for Revit and opened the graph I created in Dynamo for Civil 3D. Looks like this, which usually would be scary, but it was by design in this case.


    All those unresolved nodes are part of Dynamo for Civil 3D, which have no business interacting with a Revit model anyway. The important part is that the Remember node remembers the geometry from the dwg. Add a few of the more standard Revit nodes…
    Data passed from Civil 3D to Revit cleanly and quickly.

Total time to clean the dwg files, build the graphs and create the Revit elements was less than 30 minutes (sorry for not turning off the Dynamo preview geometry.

13 Likes