Wednesday, August 15, 2012

RANDOM HUT

Still on the Excel theme, but taking a new direction.

Three years I tackled the problem of how to model an "African Hut".  This is a familiar and important challenge with very broad implications.  Steel & glass is easy.  Even the organic version of high-tech is relatively approachable: nurbs surfaces & panellisation etc.  Rough and ready indigenous is much harder.  How do you get that random irregularity ?



My earlier attempt relied heavily on manual intervention.  Take a circular array of poles, ungroup it, then grab a few and give them a small arbitrary rotation.  Select an irregular selection and substitute a different family with a bendy version of the pole based on a sweep.  Instead of a cylinder, base the pole on a blend between a circle and an elipse.



It worked to some extent, but it's not very parametric.  You can't imaging resizing the hut, or typing in a new number of poles.

Could Excel linking and "RANDBETWEEN" be the answer ?  It's worth a shot. 
First of all I want to get away from the circular array, so I'm using a massing family and creating a spline between 6 points.  The number of points is quite important.  Too many and you'll hardly see the difference from a circle.  Too few and it will be more of an egg.



A trick from my pumpkin experiments came into play to create radius parameters from a central point.  Now I can resize the whole thing without distorting the basic shape.  Excellent !
I used "create form" to extrude the line into a surface, then divided this into panels.  Make the grid say 1 x 50. 



I need a curtain panel with a pole down the middle, which is quite easily knocked up using the rectangular template.  I started with a simple cylinder.  Now let's fire up Excel.  I'm using "Revit Excel Link" from CTC, basically because it's much cheaper.  I don't know if it's the right choice or not, but it works & I'm enjoying using it.

At first I though I was out of luck.  No mention of pattern-based curtain panels, or adaptive components when the category list came up.  But as it happens it recognises my poles as standard "curtain panels" and it finds the Radius parameter even though it's not shared.  Magic !



Export to Excell, type in a formula for the first cell under "R" (=RANDBETWEEN (50,75) )   Propagate this down the column by pulling down the little black square & we get a nice scattered set of values. 
Save the worksheet & import back into Revit. By chance 4 of the values haven't changed (so REL tells me)  Wait a few seconds and check out the results.  Not bad really.
Load the family back into my project.  Make two instances and resize one.  Works perfectly.




Now I may want to work at my pole family.  The degree of variation is fine, but it still looks more like a turned wooden baluster than a real tree branch.  But the basic process I am following is very promising.  I like the shape of the hut.  I can type in instance values for Radius, Height and No of Poles which is a vast improvement in terms of parametrics.



It would be nice to have a slight variation in pole height.  I had this before based on "tedious manual input".  But once again that's probably just an hour or so refining my pole family.


I decided to end with a freebie so download your copy of my "work-in-progress Afri-Huts" from here ...
revit file

This includes 2 of my favourite little tricks for object style settings.  You'll see what you mean when you open your present.  (2012 version file)



6 comments:

  1. Hi Adriel

    The hut is just a mass family, and the pole is a curtain panel by pattern (square version). The secret is just running REL from within family editor and of course making sure you are using instance parameters

    ReplyDelete
  2. Hi Andy!
    It is very strange!I download your file and I edit the Concepto - Hut mass family,but the REL couldnt grab those data,Like Adriel speaks!Strange!Why do you can! ? And your mailbox is ?I want to send some pictures to you !Thx a lot!

    Oscar

    ReplyDelete
  3. Hi Andy!

    "You must be in an opened project document in order to use Revit Excel Link."

    ReplyDelete
  4. Hi Oscar

    Sorry, I missed these comments. Haven't used REL for a little while, but it was definitely working from family editor for me. Recently I have been using the free Randomiser add-in from DP stuff & this also works from within a massing family. I will mention that in my post tomorrow. Hope that helps

    ReplyDelete

I've been getting a lot of spam so had to tighten up comments permissions. Sorry for any inconvenience. I do like to hear from real people