Saturday, April 02, 2011

When you have a hammer, everything is a nail.....

Ok, so not quite true, but one must ask the question, now that '12 supports placing Adaptive Components in project, what are we to do with them?

Well the first answer is, just about anything!!! Remember that AC's can have a single placement point (they don't need multiples) meaning that the family will behave very similar to placing any non-hosted family. I'll let Krista follow-up with a post on this brilliant work-flow, including my suggestion on how to "circumnavigate" the issue of limited category options for AC's.

On to the main subject of this post....

Since time eternal (or at least as long as I can remember) Revit has had a 1D array (ie, define a start point an end point and elements are arrayed between them). However in architecture there are certainly a number of occasions where a 2D array would be far more useful (ie create a "grid" of elements rather then a single row). Now this little technique will not solve all problems, but it may help with some, and inspire others.

My use case is this, we do a number of education facilities at our firm, which means classrooms, classrooms often means regulated "arrays" of chairs or desks, rows and rows of them in fact. So what if we could simple define the outside corners of where we want our furniture, the distance between each row and column, and let the computer do the rest, including dynamically updated if we change the size, interested!?

Enter adaptive components. The first step is to create an AC with a flat plain, that is actually a "void" (thus not visible as a piece of geometry). Each corner (however many you want) is of course an Adaptive Point. Once we have the Void Surface, we can divide it (clever tick huh?) so now we have a grid that we can control with parameters. Did I mention that we can also put the AC into the Furniture Category (kinda useful).

Now that we have our armature, we need some panels to go in our grid. Time for a new family, this time a Panel by Points family (also can be put into the Furniture Category). This family is a little more complicated, you could model your actual furniture here, but my suggestion is to load a family built from the standard template(s). The trick is locating the family in the panel. Here, I've created two sets of crossing reference lines that lock my tablet arm chair to the center of the panel. You could always look at doing an offset, or something else, but for the purposes of demonstration, I decided to keep it "simple".

Once you have your furniture panel, you can load it into your array family. Place the panel (of course you have multiple panels, and allow users to use a Type Parameter to switch one from another) into the divided surface, and now we have a 2D array of chairs. Once that is done, load the array family into your project and start placing.

As with just about anything that uses Adaptive Components, more CPU power is going to be your friend. Regen times can be high with Adaptive Components, though as long as the nested family is not too complex, you should not see anything to far out of the ballpark here.


Jake Boen said...

Robert, Very interesting use of ACs. Why not create the same thing with nested family arrays? The trick i have found is to nest the family into the first 1D array. Then nest that 1D array into the final 2D array family. I have found that this method keeps the arrays from doing the predicatively unexpected. I have also used this technique w/ 3D geometry and easily added the 2D array of 3D geometry to a face based family.

Robert said...

You could use nested arrays, and I have, but I'm pretty sure I can build a family like this, which is far more flexible, then I could with nest arrays. Arrays can be finicky and a bit of a pain to deal with. The divided surface is really quite simple, its how complex you want to make your panel. The AC is also far more flexible, the host points can snap to anything, so if you want sloped seating, no problem, need a non rectangular shape, no problem. Lastly, one number "1". Arrays can never do "1", the least they can do is "2", using the divided surface as an array means you can in fact do "1" in either dimension, or both (though that would be a bit silly....). Lastly, either with some ingenuity and possibly the API, you could deal with a condition where each instance rotates some degree. Also possible, things like drawing a "path" to array items along curves etc, rather then being stuck with straight line.

At the end of the day, I'm just hoping to inspire folks.

Jake Boen said...

You certainly have inspired. At least some of us who try to push the limits to increase productivity (or burn hours on a Friday night - Ha!).
Thanks for sharing. When I get my hands on 2012 I'll make sure to give this a try. It has great potential.