BILT Speaker

BILT Speaker
RevitCat - Revit Consultant

Thursday, 17 October 2013

How to Schedule Panel Locations on a Flat Rectangular Surface in Revit



This post demonstrates how it is possible to schedule repeater component cell numbers on an orthogonal pattern within the Revit Conceptual Massing or Adaptive Component environment:

To set this up, first you need a rectangular surface, which has been divided; then you need to place an adaptive component onto the node(s) of the surface; once arrayed in two directions using the repeater function you can schedule the cell (column and row) numbers on the divided surface.  Of course it isn't that simple - the adaptive component has to be aware of its location relative to a fixed point, by doing some calculations:
  • The example here is perhaps a little more complicated than it needs be to demonstrate the principle, but it does a few other fun things too.
  • The adaptive component to be repeated must be set to “Shared” so it can be scheduled;  it needs to use shared parameters so they can be scheduled too.
  • In this case it is a 5 point adaptive – one for each corner of the base of a rectangle placed on each cell of the divided surface;  the fifth point works as a “Reactor” – it tracks the distance of the component from a base point.
  • This rectangle is made more interesting by having a pyramid on top that has an apex that moves depending where it is in the repeater pattern.
To create the adaptive component:
1.  Start a new generic adaptive family.
  • Place four points in a rectangular shape;  make them adaptive
  • Join the four points with reference lines (make sure 3D snapping is on)
2.  Set up the geometry for the pyramid (optional):
  • Place a point on each line  (if correctly hosted it displays as a small point)
  • For each point assign a (Shared) parameter to its “Normalised Curve Parameter” – for the notional Y axis point, make it “Y_Ratio”;  its point on the opposite side will have its “Measure From” value set to End, rather than beginning, so that they line up.
  • Assign a parameter “X_Ratio” to the notional X axis points (one from beginning, one from end, depending on which direction you drew the reference lines)

  • Join the two opposing points with reference lines
  • Place another point on one of the linking reference lines
  • Select the point and the option bar should show:
 

  • Click on “Host by Intersection”, then select the opposing reference line;  it should move to the intersection of the reference lines
  • Set the “Show Reference Planes” property of the point to Always.
  • Set the work plane to the horizontal plane of the hosted intersection point (it only shows as a single line)
  • Place another point on top of the one on the intersection (ensure 3D snapping is on);  ignore the error message about duplicate points;
  • Select the new point and drag it up in the zed axis – its ”Offset” property should change.  If you are lucky, it should be a positive value (if it is zero, then the workplane or hosting went wrong);
  • Assign a “Height” parameter to it – if it was a negative value you’ll need to assign an interim parameter then convert it to positive with a formula, for the end user to understand.
  • This point becomes the apex of the pyramid;  
  • Join the point to the four corners of the base with four reference lines;
  • Flex the X_Ratio and Y_Ratio and Height parameters
  • Create a Form (surface) on each of the four sides of the pyramid
3.  Setting up the “Reactor” controls (Important):
  • Place a fifth adaptive point to the left of point 1 (bottom left corner of rectangle)
  • Use a reference line to join it to point 1
  • Join points 5 and 4 (Bottom right corner of rectangle) with another reference line – to create a triangle of lines.
  • Place 3 dimensions between the adaptive points 5 & 1, 1 &4, 4 & 5 – for each one make sure to set the relevant reference line as the work plane for the dimension;  it is vital to snap the dimensions to the adaptive points, rather than to line ends, surface corners etc (if not then you can’t use the dimensions later on in formulas)
  • Make each dimension as a reporting instance parameter, for use in the “cosine law” in trigonometry.  We need to calculate the angle in the triangle
  • The Cosine Law for calculating an angle when 3 sides are known, is:
    Angle γ = Arcos( (A² + B² - C²) / 2AB)
  • Revit version of Cosines formula:
    Angle γ = Acos( (A^2 + B^2 - C^2) / 2*A*B)


  • To work out the X and Y components of the distance “A” between points 5 and 1, use trigonometry:

  • This calculation assumes that the angle of the line between P1 and P4 is orthogonal – so it only works with a rectangular repeater pattern.
4.  Calculation of column and row numbers:
  • This requires knowledge of how many rows/columns there will be in the repeater, and the overall size of the repeater


  • Parameters for these need to be built in to the component as shared parameters (for scheduling), as shown below;  these can subsequently be linked to the parent family parameters for these values.
    X Number and Y Number should be integers (count of repeats in each direction)
    Column Number and Row Number should also be integers.
    X Ratio and Y Ratio should be number parameters
  • You may need a couple of checks to take care of when it has zero values for the distances.

5.  Creation of the repeater:
  • The pyramid family needs to be loaded into another family that can support a divided surface – this could be an adaptive component, a mass family or an in-place mass family in a project.  In this example it will be an in-place mass family.
  • Load the pyramid into the project
  • Start an in-place mass family
  • Draw a rectangle of reference lines,
  • Give the rectangle dimension parameters of Length and Width
  • Generate a form (surface) from the lines
  • Select the surface and Divide Surface 
  • Make the nodes visible on the surface (Surface representation)
  • Assign parameters to U Number and V Number on the surface
  • Place a point just to the left of the bottom left corner of the surface – this will become the control point for measuring distance.  It is important for getting the “Reactor” effect working.
  • Place an instance of the pyramid component by snapping the first four placement points onto four adjacent nodes in the same order as you originally created the adaptive points (say clockwise);  place the fifth point on the external point – it is vital that it does not go onto a node of the surface

  • Link 4 parameters to equivalent parent parameters:
    Y_Number to     V Number
    X_Number to     U Number
    TotalX  to  Length
    TotalY  to  Width
  • Hide the nodes on the surface (Using Surface Representation - they cannot be controlled by any view settings)
  • Select the free control point and move it very close to the bottom left corner of the surface.
  • Select the Pyramid and turn it into a repeater 
  • All being well, the pyramid will array itself over the whole surface, but each instance will look slightly different as the apex point is changed depending on its distance from the control point in the bottom left corner.  If not, it could be caused by a problem with the component itself, or else the fifth adaptive point might be hosted on the same point as adaptive point one, in which case it would move with it.
  • Select (tab) any one of the pyramids;  it should display properties including its correct column and row number

  • Finish the in-place mass family
6.  Create a generic Schedule:
  • Add the column and row numbers, and any other parameters you require
  • You will be able to edit the values for Comments and Mark, but no other instance values
  • If you edit the mass family, it allows you to manually select any of the components in the repeater.  Then you can set it to “No Component” or to any other 5 point adaptive component.
When you edit the mass family, the schedule temporarily goes blank.  Sadly this means that it is not possible to drive the geometry from the schedule.  However, it does make it easier to identify and label components in a schedule – useful for adding and editing Mark values to match column and row numbers.

This technique will not work with a curved surface because it all works by calculating the actual distance from the control point to the BL corner of the pyramid and relating that to the overall length of the surface.  It will only work on an orthogonal divided surface, unless you are a mathematical genius and can write formulas to handle more complex geometry!

Saturday, 14 September 2013

How to Indent a Revit Repeater on a Divided Surface

In a recent post by Andy Milburn over on Shades of Grey, he mentioned that it is not possible to indent the edges of a divided surface.  Well, that is absolutely true - Divided surfaces are unlike divided paths, which have an indent setting so that you can push the start or end nodes of the path in from ends of the underlying path.
Divided Path indent settings

The implication of this is that when you use a divided surface to generate a "Repeater" in Revit, the repeated adaptive components will overhang the edge of the divided surface.   In the example below, a one point adaptive component is placed on a node of the divided surface, then repeated - since the adaptive component consists of a cylindrical extrusion centred on the point, it is repeated to all nodes of the divided surface.



Since you cannot indent the edges of a divided surface, how can you prevent the repeater overhanging the divided surface?  If you made the extrusion offset from the adaptive placement point you could make it indent on one or two sides of the divided surface, but then it would overhang even more on the other sides.

However, in Revit there is usually a way to achieve what you want, so I attempted to find a way to indent the repeater, if not the nodes of a divided surface:

How to Indent a Repeater Pattern

You have to use some tricky thinking, and control where the repeater components will land - and prevent it from placing any part of the extrusion in the adaptive component on the edge nodes.
One way to do this would be to create a four point adaptive component:
  • First create a new adaptive component and place four points in a square arrangement
  • Make the points adaptive
  • Join the four points with four reference lines
Now you need to set out a centre point to host the geometry so that it remains centred whatever the arrangement of placement of points
  • Place four more points on the mid-point of each reference line (watch for the triangular snap symbol
  • Join those four points with two more reference lines
  • Place yet another point on one of the central lines
  • When you select the point, it will have an option (on the Option Bar, no less) to host it by intersection
  • Select that option, then pick the other central reference line
  • It will move the point to the central intersection.
  • NB. On reflection, you could skip the last four stages and just have one central linking reference line with a single point on its mid-point.  However, you could this intersection technique for other situations - perhaps if your extruded geometry needs to be more complex than a cylinder (see later on).
  • Select the central point and set its "Show Reference Planes" to "Always"
 

  • Set the active Work Plane to the horizontal reference plane of the central point
  • Place a reference circle centred on the point (assuming you want a cylinder)
  • Give its radius a parameter
  •  Select the circle and "Create Form"
  •  Select the top facet of the cylinder and give its Positive Offset a parameter called "Height"
  • Save and load the family into wherever your divided surface resides
  • Place one of the components onto four adjacent nodes of the divided surface in the same order that they are numbered in the family (its good practice to always use the same convention - say clockwise, unlike the diagrams shown here!!)
  • Select the adaptive component and click on the "Repeater" command (its the Array icons, but with the letter P on it)
  • If you snapped to the nodes correctly it should create a regular pattern
  • The extruded cylinders will be inset from the edge - however, they will only be inset by half the distance between nodes
  • If you want the cylinders to be inset by the full distance between nodes, you'll need to be more tricky:
  • Delete the repeater (you cannot dissolve it or alter its layout)
  • Place a new component on alternate nodes in a square pattern
  • The cylinder should then sit exactly over a node
  • Select the component and "Repeat" it
  • The pattern should spread over alternate nodes on the divided surface
  • The spacing will then most likely be too big
  • Select the divided surface and double the number of divisions (or half the spacing if it is set by distance)
  • Oops - we've now ended up with the same indent as before, so we may need to try another trick
  • The answer here is to coerce Revit into doing what you want by indenting the initial placement of the component 
  • Make sure that the first placement node you select is one node in from both edges
  • Select the component and repeat it
  • This will only work if the number of divisions is equal;  it will probably no longer work if you start playing around with number of divisions after repeating the component - so it pays to set the number of divisions correctly to start with.

If you want to be really clever, you could go back to the original four point adaptive component and give it some reporting parameters and use them to drive the cylinder size depending on the divided node spacing

Sunday, 1 September 2013

RTC Europe - Fractal Fun with Revit Repeaters and Adaptive Components

On 27th September 2013 I will be presenting at the Revit Technology Conference in Delft in the Netherlands.

The topic of my presentation will be:
"Fractal Fun with Revit Repeaters and Adaptive Components" - this will be a new, improved version of the presentations that I gave at RTC in Auckland and Vancouver earlier this year.  Yes, RTC is so good that I'll be attending at all three venues this year.


As part of the presentation, all being well, I intend to give a live demonstration of how to build a fully parametric Revit model of the roof structure shown below - within about 30 minutes.  This is the Gare do Oriente in lisbon, designed by Santiago Calatrava.

Based on feedback I received from RTC in Vancouver, I have updated the handouts to reflect changes made to the modeling process that I will demonstrate.  For anyone who downloaded my presentation from the earlier RTC events, you might like to get an udated version from RTC Europe.

Gare do Oriente, Lisbon by Santiago Calatrava

Every single Revit Technology Conference has been really fantastic, and I have learned new things every time - usually they have saved me more time than the hours I spent there.  I have been able to go back to the office and quickly solve problems that have had me stumped before, or implement new techniques.