What is Direct Shape and why is everyone talking about them?
Well, its an object class that was added to Revit’s API – I think in 2015 – and if I had to put it bluntly I would say it’s just a little bit better import method for SAT/DWG based geometry. Why do I say that? Well, according to documentation that you will find in the Revit SDK / on Jeremy Tammik’s blog – you might be inclined to believe that it’s magical, but truth is that it’s a good step in direction to respectability, but not quite there yet. I can’t wait for Revit team to finally implement a set of tools that allow you to write any arbitrary piece of geometry to any category and have it support a full range of that category properties. For now, however, we have to settle on Direct Shape and their limited way of pretending that they are something that they are not.
For those of you not familiar with Direct Shape, it basically allows you to use Revit’s Tessalated Shape Builder (Mesh-lite), Solid object builder, or hack together some form of OBJ, SAT etc imports in order to extract the geometry from them and push them into these pseudo-families that Direct Shapes are. Why do I call them pseudo-families? They are step in a right direction, I said, but besides being able to pretend that they are a Window or Wall Category object – they don’t really have any of the properties that these object normally offer. What this means in real life? If you wanted to get fancy and import your funky Rhino model into Revit and push into Direct Shape as a Wall, you might have been disillusioned to believe that now you have a Wall object that you can “do things” with: host objects to, dimension to, tag, enclose spaces/rooms etc. The answer is NO, NO, NO, and NO. Sure, when you select your Direct Shape it does tell you it’s a Wall, but you can only dimension to it, if its a box – it has to have flat faces aligned with Revit’s Z axis. As far as I know, it will not be able to calculate a Dimension reference unless its a BOX and that’s pretty sad. Now, tell me why would I be importing a BOX into Revit? I think out of all things that you can model in Revit, BOX is definitely in the “very possible” category.
So what is it useful for? In this example I will demonstrate a small workflow for using it to temporarily store placeholders for something that in the future might turn out to be a full fledged Revit family. It, of course doesn’t have to, because in some cases the objects that we are creating are so trivial that it doesn’t matter if they are compatible Revit families. Have a look at these mounds for example:
Yeah, so it looks like we were designing a play-space for kids, and we needed some mounds. No big deal. We can easily model these things in Rhino. Then what? We are re-designing them about 10 times a day, and some poor soul has to bring them into Revit to keep the drawings updated. Yup, that’s my jazz, right there. Why not use a Direct Shape to temporarily store our Rhino geometry in it, represent it properly on drawings and then eventually build that thing up in Revit. Here’s how:
Step 1: Rhino. Model that NURBS.
Step 2: Contour, then Split the surface so that you get segments representing topo-like geometry, and looking much better in plan.
Step 3: Export these surfaces to SAT and then you are almost there.
When I do these things I try to live a sane life and follow Brian Ringley’s advice:
Since, I am not exactly into repeating Contour, Split, Delete, Export routines too many times so I actually wrote a small RhinoScript in Python to automate that part. Here’s the code:
Now, this is not exactly magical, but it gets the job done. I only played with this for a little bit (Sunday afternoon), so It’s not fully vetted, but it does what I need. Also, it’s been a while for me since last time I was playing with rhinoscript. Holy shit! Last time must have been 3 years ago, when I was first learning Python and Zach Downey had these awesome Python Rhino Script videos on DesignAlyze. Anyways, it was pretty quick to get back into it, and it made more sense to do a command like that, rather than jump into Grasshopper because I was doing this workflow for a non-Grasshopper user. Sometimes it’s the client that dictates the delivery method, and this was one of these cases.
Step 4: Import them SATs into Revit as Direct Shapes:
For this I have created a little specialty in Grimshaw Tools. You can find a little info about this tool in my Portfolio page. Basically, it allows me to import a SAT file as a Direct Shape. The trick was to add a little manager to be able to quickly swap them out and update geometry in them, when new SATs became available. Here’s a sample of how to convert a SAT to a Direct Shape:
There is of course more stuff to this tool, and even more that is missing. Currently I am messing up a few things, by creating a new instance of Direct Shape every time I am updating it, which is not the right thing. I think I saw some better methods available for simply updating already existing instance definitions with new geometry using the Direct Shape Library Manager. Then again, I only played with this for a Sunday afternoon, and this was good enough to get my designers through the finish line and home before 6pm.
So, yeah now my Direct Shapes can be updated in Revit. I still can’t put a material on them or tag them, but at least I can show them properly in plan, section, elevation and maybe one day I will be able to do more than that. Again, it’s a good start, but definitely not a full solution. If you are on a project and need to get something from Rhino to Revit in a pinch, this can get the job done. Then again, if you are in a pinch like that, you probably fucked up something anyways, so you might want to re-thing your strategy.