BILT Speaker

BILT Speaker
RevitCat - Revit Consultant
Showing posts with label repeat. Show all posts
Showing posts with label repeat. Show all posts

Sunday, 17 February 2019

Stretcher Bond Hatching in Revit

A few years back I posted a description of how to create a complex custom hatch pattern for Revit - that example was for repeating octagons.  Since then I have often needed to quickly create much simpler patterns such as stretcher bond elevation views for bricks, blocks and tiles.  The Octagon pattern was quite complex and it still takes a while to get your head around the logic - so here is a much easier to follow set of examples:


Pattern Definition Format

The pattern file is a text file, saved with a '.pat' extension.
Definition of units (important for metric):
;%UNITS=MM

Each pattern definition has an * prefixed header :   a title and description separated by a comma
      *Stretcher 400x200,   400mm x 200mm stretcher bond
Drafting or Model definition:
       ;%TYPE=MODEL
Each line repeat (in the pattern) is described in one row of text, with comma delimited format.  eg:
0,     1200, 1000,         0,  1000,       400,  -1500

  • Angle  = angle of line from horizontal measured in an anti-clockwise direction
  • Origin x = horizontal distance of start of line from setout point (always orthogonal)
  • Origin y = vertical distance of start of line from setout point (always orthogonal)
  • Shift u (x axis of line) = offset distance of start of repeat line measured parallel to start of line
    (in the direction of the line,  ie. to match the angle).  The Shift values are measured from the start of the line, not from the setout point.
  • Shift v (y axis of line) = offset distance of start of repeat line measured perpendicular to start of line
  • Pen down = length of solid line measured in the direction of the line (optional - it draws a continuous line if omitted)
  • Pen up = length of gap in the line before the next segment of the line starts repeating (measured in the direction of the line);  is always a minus value.  (optional - as per pen down)
NB. I have labelled the shift directions as u & v (not x & y, as Autodesk labels them) because the directions relate to the axis of the line, not the whole pattern - so a vertical line would have a u offset measured vertically (labelled as x direction by Autodesk, which is confusing).

Stretcher Bond Hatching Definitions


A typical staggered tile pattern (stretcher bond) consists of :
  • a series of continuous horizontal lines at regular spacing;
  • Short vertical lines that run between alternate horizontal lines, at a spacing equal to the length of the brick/block/tile
  • Another set of short vertical lines that run between alternate horizontal lines, at a spacing equal to the length of the brick/block/tile - but these are typically offset horizontally by half a length and vertically by one pattern height.
These should almost always be defined as MODEL patterns, as they are meant to be dimensionally correct on the surface of the material.

There are actually two ways to define this:

Option 1 - separate definitions for the two vertical lines

*Stretcher-450x150-1/2,      450 x 150 1/2 stretcher bond
;%TYPE=MODEL
0,         0,0,           0,150
90,       0,0,           0,450,        150,-150
90,    225,150,      0,450,        150,-150

The first row defines the horizontal lines
0,         0,0,           0,150
  • The lines are at zero degrees (horizontal)
  • The first line starts at 0 offset from the origin, both x and y (0,0)
  •  The repeat has a shift of zero horizontally (x or u), and 150mm vertically (y or v) from the line origin (0,150),
  • The next repeat is the same values (0,150) from the start of the previous repeat. 
  • The line is continuous, as the are no pen up/down values




The second row defines the first set of vertical lines
90,       0,0,           0,450,        150,-150
  • The lines are at 90 degrees (vertical )
  • The first line starts at 0 offset from the origin, both x and y (0,0)
  •  The repeat has a shift of zero vertically (u) , and 450mm horizontally (v) , from the line origin (0,450)
  • The next repeat is the same values (0,450) from the start of the previous repeat. 
  • The line is segmented, 150mm solid, 150mm gap (pen up/down 150,-150)
The v shift in this instance is horizontal, perpendicular to the line, with a positive value to the left of the line origin (same as pattern setout point in this case). 
  • As the pattern is symmetrical, it makes no difference if the v shift value is positive or negative
  • Seen below in context, the pattern repeats in both directions from the origin:








The third row defines the second set of vertical lines
90,    225,150,      0,450,        150,-150
  • The lines are at 90 degrees (vertical )
  • The first line starts at 225mm x offset from the origin, and 150mm y offset from the origin (225,150) - ie. half a tile along and one tile up.
  • The repeat has a shift of zero vertically (u) , and 450mm horizontally (v) , from the line origin (0,450)
  • The next repeat is the same values (0,450) from the start of the previous repeat. 
  • The line is segmented, 150mm solid, 150mm gap (pen up/down 150,-150)
 


Option 2 - one definition for both vertical lines

*Stretcher-450x150-1/2,      450 x 150 1/2 stretcher bond
;%TYPE=MODEL
0,         0,0,           0,150
90,       0,0,       150,225,        150,-150


The first row defines the horizontal lines as per previous method
0,         0,0,           0,150

The second row defines the vertical lines
90,       0,0,       150,225,        150,-150
  • The lines are at 90 degrees (vertical )
  • The first line starts at 0 offset from the origin, both x and y (0,0)
  •  The repeat has a shift of 150mm vertically (u) , and 225mm horizontally (v) , from the line origin (150,225)
  • The next repeat is the same values (150,225) from the start of the previous repeat. 
  • The line is segmented, 150mm solid, 150mm gap (pen up/down 150,-150)


  • As the pattern is symmetrical, it makes no difference if the u and v shift values are positive or negative
  • Seen below in context, the pattern repeats in both directions from the origin:


One Third Shift Patterns

The same principles can be applied when the bond is staggered by differing proportions.


Option 1 - separate definitions for each vertical line


*Stretcher-450x150-1/3,   450 x 150 1/3 stretcher bond
;%TYPE=MODEL
0,          0,0,         0,150
90,        0,0,         0,450,       150,-300 
90,    150,150,     0,450,       150,-300
90,    300,300,     0,450,       150,-300


 90,    150,150,     0,450,       150,-300

  • 90 degrees
  • 150mm x line origin, 150mm y line origin
  • Zero u shift repeat, 450mm v shift repeat
  • 150mm Pen Down, 300mm gap (Pen Up)




 90,    300,300,     0,450,       150,-300
  • 90 degrees
  • 300mm x line origin, 300mm y line origin
  • Zero u shift repeat, 450mm v shift repeat
  • 150mm Pen Down, 300mm gap (Pen Up)

Option 2 - one definitions for all vertical lines

*Stretcher-450x150-1/2,      450 x 150 1/2 stretcher bond
;%TYPE=MODEL
0,         0,0,           0,150
90,       0,0,       150,300,        150,-300
Horizontal shift (v) repeat has to be 2/3 of a tile (300mm)

As the joint offset is not half a tile, the same result can be achieved with a negative v shift repeat of -150mm:
0,         0,0,           0,150
90,       0,0,       150,-150,        150,-300



An offset by one third to the left could be achieved by a positive 150mm v shift:
0,         0,0,           0,150
90,       0,0,       150,150,        150,-300


Two Third Shift Patterns

Some patterns cannot have their vertical lines defined by only one row, as you can't define a consistent diagonal repeat.  Therefore you must have multiple rows for the vertical lines.

*Staggered-450x150-2/3, 450 x 150 2/3 stretcher bond
;%TYPE=MODEL
0,          0,0,        0,150
90,        0,0,        0,450,     150,-150
90,    300,150,    0,450,     150,-150








The direction of stagger can be changed with the x origin value:

*Staggered-450x150+2/3, 450 x 150 2/3 stretcher bond
;%TYPE=MODEL
0,          0,0,        0,150
90,        0,0,        0,450,     150,-150
90,    150,150,    0,450,     150,-150

Flemish Bond

More complex brick patterns require extra rows of definition:


*Flemish-240x86,     240 x 86 (Australian Brick size) Flemish stretcher bond
;%TYPE=MODEL
0,           0,0,         0,86
90,         0,0,         0,360,       86,-86 
90,      240,0,        0,360,       86,-86
90,        60,86,      0,360,       86,-86
90,      180,86,      0,360,       86,-86




You could continue this theme with increasing random looking patterns, but I'll leave that for you to figure out . . . . . .




Friday, 7 August 2015

Part 1 - Creating Sinuous Curve Swept Blends in Revit Adaptive/Massing Environment

Loch Ness monster created in Revit

In a recent blog post I was trying to create a swept blend (or loft) along a single spline path
and I encountered a few problems, which were mostly (but not all) solved by including the spline path as part of 'Create Form' process.  That was just a preliminary test for what I ultimately wanted to create:   A swept blend along a sinuous multi-segment path made up of arcs and lines - not a spline (as seen above).
Here follows the next instalment in my trials and tribulations.  I will start simply by comparing the traditional methods and conceptual massing creation of a sweep, before moving on to a swept blend.

Traditional Sweep

In the traditional family editor, Revit can easily create a sweep along a sinuous multi-segment path, unless the radius of a curve on the path is too small and causes impossible geometry.  This example below is a simple sweep of one profile along several linked arcs and lines.  It creates a pretty good looking form if the arcs/lines are at perfect tangents to each other (in both the path and profile) - it does not show any join lines.
Traditional family editor sweep

CME Sweep

Try creating it in the Adaptive/Conceptual Massing Environment (CME) and you don't get such a good result - and there is less likelihood of Revit actually creating the form at all.  The example below is created using the same geometry as the one above, with some provisos:
  • The sweep path of perfect tangent lines and arcs had to be traced as reference lines with the pick line tool as you cannot copy sketch lines from the traditional family editor into the Adaptive/Massing environment (Grrrr - why not?).
  • The profile had to be recreated as an adaptive component profile as you cannot use regular Revit profiles in CME.  Refer to Swept blend using profiles in Adaptive Components for how to create and host the profiles.
CME Sweep using one profile and reference lines/arcs as path
Notice the nasty join lines at every change of line/arc in the path;  likewise in the profile, which again has perfect tangent transitions.

CME Swept Blend

If you try something similar as a swept blend you run into roadblocks very quickly:
  • Host another profile (similar or in this case same shape, lower height) at the other end of the path
  • In this example the easiest way to do that is to place a point on the reference line/arc;  then host the adaptive profile onto the point
  • Select the two profiles and the chain of lines
  • Create Form
  • Computer says 'No'.  Refer to Unable to Create Form for more variations on this dialog box
CME Swept blend on multiple arc/line path - failure
  • If you try moving the host points further around the arcs on the path so that the path is less sinuous it still fails
  • Try putting the host points and profiles on almost straight section but hosted on different lines - still no go
Another swept blend failure
  •  It is not until you put the two profiles onto the same line or arc segment that it actually succeeds in creating a form (if you select only that segment and two profiles)
This technique is getting painful and is obviously not going to work - Revit cannot create a swept blend on multiple segment paths!  What a major limitation on a sophisticated 3D modelling program.

Another approach is required:

How to convert the arcs and lines into one path?  Well you could try tracing a spline over the top - but that has several problems:
  • A spline is not easy to set out on a drawing for construction;  it cannot be dimensioned
  • A spline will not follow the original path accurately - it will bulge out when there should be a smooth transition from arc to straight line
  • The spline will not update if the reference line path is changed

Divide Path

Another option is to use an inbuilt Revit technique:  'Divide Path' - this creates a single element that sits on top of multiple lines/arcs selected in a chain.
The divided path has an added benefit of automatically generating nodes on which to host the profiles.  The next roadblock is that when you select the profiles and then the divided path, the 'Create Form' icon disappears - it cannot use a divided path as a sweep path.  Aaaaargh!
You could start placing profiles along the path, and try to link them as a form - by selecting them all and 'Create form' (without defining a path).  Sadly it does not work - it is unable to create form.  Even if it could, if they are too far apart it might take shortcuts between each profile (ie. it does not respect the order they are on the path).
If you select only some of the profiles, and create a form, you can see that it will not follow the path at all closely, especially if they are not close together.

 If you create separate forms for each pair (or trio) of profiles you get pretty awful results:
Even if it could get the order right it also cannot do all the profiles in one go as the curves are too tight for it.

So, is the answer to increase the number of nodes on the divided path and add more profiles?
It gets a bit tedious placing adaptive profiles, and sometimes they flip for no apparent reason.

So maybe we can use another Revit tool to place multiple profiles:  Repeaters

Repeaters

If you place just one profile on a divided path node, you can use the 'Repeat' command to array the profile onto every node (they still sometime flip!).
If you select all the profiles, Revit should have a better chance of more closely following the path as it joins them all, right?
The next problem is that you cannot create forms directly from a repeater - you have to first dissolve the repeater using the new (in v2015 r2) 'Remove Repeater' command.
This command was wrongly named in my opinion, as it dissolves the repeater back to individual profiles rather than removing it altogether.
If you select all the profiles, Revit still cannot create a form as the path is too sinuous for it, and it still gets the order of profiles wrong even though they are closer to each other

Unable to create Form
The next trick I tried was to push the profiles back along the divided path so that each was closer together, and did not try to go around such a sinuous curve.  This is simple enough on a Divided Path by changing its 'Beginning and End Indent' properties
 
 I then selected all the profiles and 'Create Form'.  Finally some success:
By hiding the profiles, it showed that the form does not have vertical joints - this is because we did not actually define the path by selecting arcs in the path.  that probably means the resultant form is not following exactly along the arcs, but it is close.  We still get joints running along the top because the profile is made up of arcs and lines.  That would not have happened in the traditional Revit family environment - Harrumph!
But this is still effectively a sweep, not a swept blend.  That part is easy to solve:  each profile has a height instance property (because I made them that way - it could be a type property).  So the heights of each one can be adjusted, and the form follows along.
 
 The profile heights could have been adjusted before creating the form
Once you hide the profiles, it is starting to look like the Loch Ness monster that I was trying to create
The next problem to solve is how to get the form to spread along the whole length of the path . . . .

That is an issue to be solved in the next post Part 2 - sadly it is not as simple as you might guess (if you have followed the process so far)


Thursday, 6 March 2014

Revit Repeaters Index Page


When Revit v2013 was released it gave us the first version of a great new feature:  Repeater.  Repeaters are an alternative way of creating arrays in Revit, but they only work in the conceptual massing environment (Adaptive Components and Massing) where the tradional Revit array tool is not available.

I presented a paper on the topic "Divide and Conquer: Adaptive Components in Revit 2013"  at Revit Technology Conferences in May 2012 (Wollongong, NSW), June 2012 (Atlanta, USA).  When I submitted the abstract v2013 had not been released so I wasn't able to use the word "Repeater" in the title!  I followed this up with further presentations at RTC in 2013: "Fractal Fun with Revit Repeaters" - May 2013 in Auckland, July 2013 in Vancouver and September 2013 in Delft (Netherlands).  In the process of researching these topics I have tried to explore the capabilities and also to uncover the mysterious rules of Repeaters.  I have written a number of blog posts on the subject, so it might be useful to list those here.

Revit Repeater Index

Repeater Theory
Fun Examples

Adaptive Components Index

Adaptive components are a vital part of Repeaters, so here are a few posts on them as background:

 

Before Repeaters - Traditional Revit Arrays