BILT Speaker

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

Tuesday, 1 December 2020

Stair Section Detail Level in Revit

Here is yet another problem with Revit Stairs that really needs to be fixed by Autodesk:  

The view 'Detail Level' display in section is not consistent between walls, floors and stairs (not to mention ramps!):

View Detail Level


When a view is set to Medium or Fine detail level, sections of most categories display the correct materials:

When the View detail level is set to 'Coarse', the cut hatching display of some elements is overridden by the Type properties 'Coarse Scale Fill Pattern'

This capability is available only for certain categories - meaning that the display of stairs is pretty hopeless at Coarse scale

 


Workarounds

What to do about this?  There are several possible ways to resolve this lack in Revit, but none is very good!

Visibility Graphics

You can over-ride the cut pattern of stairs - but this requires several steps (excuse the pun) on top of just changing one View Detail Level setting:

Due to the fiddly nature of changing this in the view (similar settings may need to be applied to other categories), you would certainly need to include this as part of a View Template - so it could be applied or removed at the flick of a switch.

Filters

You could also try using a View Filter, as it could potentially be applied to multiple categories

This has an advantage in that it is more "discoverable" than searching through all the category overrides - unless you have a gazillion filters applied!

Another advantage in Revit 2021 is the ability to "Enable" or "Disable" the filter without losing the override settings - a very useful new enhancement for Filters.

Downsides

The View Detail Level is very easy to switch on/off - and it affects all categories that have the built-in Coarse Scale override capability.  If you set the view back to Medium, the 'by category' cut pattern overrides get left behind - so you would need another operation to remove those (hence the need to use View Templates).



Another problem with the Visibility Graphics workarounds is what happens when you choose anything other than black solid fill as your hatching override:

If you make it grey . . .

 

The Stairs will show the joint lines between different materials - you may or may not want this, but it is clearly different behaviour to the Coarse Detail Level control that hides the material join lines and treats it as one material, for a nice clean look.

Of course, this is not helped by the inability to join walls/floors to Stairs !!  You still get the joint lines between those.  Refer to Stair Joint Lines

The Worst Workaround

Filled Regions are extremely useful for patching up Revit's inadequacies, but they are not popular with BIM & Model Managers because they cause so many other problems as soon as a model changes.

Filled Regions allow you to make the hatching look exactly how you want, because they allow some of their edges to be "Invisible Lines" - thus they can appear to join with adjacent "real' cut hatching.

Filled regions are placed per view, so if you have multiple sections cutting through the same or similar parts of the model you may end up with many filled regions.

One possible method to manage that problem is to include them in 'Detail Groups' - but they are also problematic to manage, not to mention a major shortcoming of really slowing down your Revit model if you have too many of them.

Conclusion

Whichever workaround you use the most important thing to do is to follow company standard procedures - and be consistent.  Agree with your workmates on which dodgy workaround to use, and stick to it.  This will make it so much easier to come back to make changes when the model is updated.




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 . . . . . .




Wednesday, 6 April 2016

Revit Hatching Pattern Line-Weights

Following on from my post about hatching patterns on stairs, I thought I would describe a strange Revit phenomenon that I noticed a few years back. . . .

There are two main types of hatching patterns in Revit:
  • Hatching patterns applied to the surface of a material, or as a cut pattern
  • Filled Regions - 2D annotation patches
I intend to discuss the former - in particular material surface patterns.

As any good Revit implementer should know, most Revit material hatching patterns are displayed and printed using the Revit line-weight number 1.  [Edit. Ceiling surface patterns use line weight 2]
This number is then converted to a line thickness according to the scale of the view, on a matrix chart accessed from the 'Additional settings' icon on the manage tab of the ribbon.




This matrix is stored per project, and is something that should be set up in the company project template, and then seldom changed.  Unfortunately many new users are not aware that material hatching lines use line weight 1, so they often assign that as their general use thinnest line drawing number.  Most experienced users would recommend reserving weight 1 for hatching, then start the rest of the element line weights from 2 onward (2 = 0.1mm, 3 = 0.18mm, 4 = 0.25mm, 5 = 0.35mm etc).  [Edit. or start from 3, to avoid ceiling hatching patterns in 2].  Once you have set up all your family templates, and libraries it is not easy to change them all a year later.  Sadly the default templates and Autodesk libraries are almost all set up to default most things to weight 1 as the thinnest line weight, which propagates this awkward setup.

Incidentally, if I use the term 'Pen 1' instead of Weight 1, it gives away the fact that I once used pen plotters in the dim, distant past (or even Rotring pens!).

Let's assume that you have set up your library and templates to reserve weight 1 for hatching, it gives you more freedom to play around with pattern line-weights without affecting anything else in the drawings.  But you need to know some mysterious things about how you can control hatching display - or in fact that you have very little control!  The reason for this is that there are various limitations and some hard-coded behaviours within Revit.

Material Surface Patterns - Law of Diminishing Returns

When you apply a surface or cut pattern to a material, you do not get any option to set the line weight - you can only control the pattern and colour.

Object styles do not give you the opportunity to control material pattern line weights;  nor do Visibility Graphics pattern overrides, which can be changed per category:

Or they can be overriden by element, where you can change the weight of projection or cut lines but not hatching patterns:

Notice the colour of the hatching lines at different scales in the screen snapshots below - I have chosen the 'colour purple' to make it easier to distinguish.  At scales from 1:1 through to 1:50 they would all look the same (I only show 1:20 onward), but after that the lines get progressively lighter at each scale change.  This is hard-coded into the software - not something that we appear to have any control over.
1:20 material hatching
1:50 material hatching
1:100 material hatching
1:200 material hatching
1:500 material hatching
1:1000 material hatching
1:2000 material hatching
1:5000 material hatching
You might notice that the line thicknesses above are the same from 1:20 up to 1:1000, which would not necessarily be the case in a real Revit project.  I artificially bumped up the line thicknesses at the smaller scale, to compensate for the screen scale display of the lines.  I ran out of 'thinness' for 1:2000 and 1:5000 as the thinnest that Revit lets you put in is 0.025mm.  However, it is unlikely that your plotter will be able to get lines that thin anyway.
Artificial settings to get consistent screen display - do not use!

At 1:5000 the hatching just stopped displaying - or maybe the lines are so pale we can't see them.  I'm not sure how Revit decides at what scale to give up displaying, as it is not always the same.  It seems to depend on the line thickness, and spacing as well as density of the pattern.

For more weird Revit line weight behaviour click here

What does it all mean?

This is another example of  the software writers deciding what is good for us!  We have no choice or control that I can figure out.  All I can recommend is to reserve weight 1 for material pattern hatching.  It is probably wise to put all filled region hatching in weight 1 too, so that when you apply those nasty little filled region patches in section, they blend together.  Normally I do not approve of that, but when it comes to pads and earth hatching in section it is pretty much unavoidable!

I did wonder about that print settings dialog option 'Replace halftone with thin line':
It does not treat those faded hatch pattern lines as halftone - it only affects them if the whole element or category has been set to halftone.

Saturday, 27 June 2015

Defining Revit Custom Hatch Patterns

Over the years I have defined quite a few Revit custom hatch patterns, and each time I do it I get a headache!  It is usually about 6 months between each attempt at this so I pretty much have to learn it all over again each time.   The format for defining the hatch files (.pat) is so bizarre that it almost defies logic.  Almost, but not quite . . . .

The Autodesk help files have never changed much over the years, and just reading them gets me baffled each time.  So I decided to write my own help file that is actually understandable by human beings, so I can refer to in six months time.  And well, why not put it out there to see if anyone else finds it useful?  Of course there are now lots of  clever little hatch builder programs available, but sometimes you just want something quick and you may not have access rights to download and install that hatch builder.

For examples of stretcher bond brick or tile patterns refer to this post

The more complex example I am showing here is a series of octagons that are quite widely spaced - I originally created it to represent those 'tactile surface indicators' at the base and top of stairs.  The octagons do a pretty good representation of circles on a stair drawing.

The first step is to create a sample of the pattern using lines - say detail lines on a drafting view.  You probably need to show a couple of repeats in each direction - true octagons are simple to create using the 'Polygon Tool' with only two mouse-clicks.



When the octagon is repeated in a Revit pattern, it does not replicate the octagon shape - it actually treats each line as totally separate, and repeats those in two possible directions.  So in order to understand which lines are repeated where, I have colour coded them.  This pattern is based on a 1000 mm square grid with the space between each octagon exactly the same as the octagon width, which means that the orthogonal lines are repeated every 1000mm, exactly offset from each other - a very simple pattern.  The diagonal spacing between octagons is quite different to the octagon width - so the repeats of diagonal lines are much more complex . . . .

Pattern Definition Format

The pattern file is just a text file, saved with a '.pat' extension.
The overall file can have descriptions at the beginning;  it can also have an overall definition of units (important for metric):
;%UNITS=MM

Each pattern definition needs a header prefixed by an *:   a title and description separated by a comma
      *Octagons 1 x spaced,   1000mm spaced and width octagons
It also needs a type definition (Drafting or Model)
      ;%TYPE=MODEL

Each line repeat (in the pattern) is described in one line 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) = offset distance of start of repeat line measured parallel to start of line
    (in the direction of the line,  ie. to match the angle)
  • Shift v (y) = 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
  • 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.
Notes.
  • The Shift values define the repeats in the direction perpendicular to the line.  The Autodesk help files mislead by calling them x and y values - I prefer to think of them as u and v values, which are not necessarily orthogonal.  The Autodesk help files completely omit to mention that they are measured parallel & perpendicular to the line.
  • The Shift values are measured from the start of the line, not from the setout point - another vital piece of information that the Autodesk help files neglect to tell you.
  • The pen down/up values effectively define repeats in the direction of the line.  They are optional.  If they are omitted, you get a continuous line
  • The pen down/up repeat is inconsistent with origin & shift because the coded value of Pen up is the distance from the end of the line to the start of the next - the repeat distance is actually the total of Pen down and (minus) Pen down.

Octagon Pattern Example

The horizontal lines (black)
Angle = 0
Start line x from origin = 1292.9
Start line y from origin = 1000
Shift u of repeat from line start = 0   (ie. it is a direct perpendicular offset)
Shift v of repeat from line start = 1000
Pen down = 414.2    (length of octagon side)
Pen up =   -1585.8   (distance to start of next octagon line from end of first)

0,   1292.9, 1000,         0,          1000,       414.2,  -1585.8


The vertical lines (blue)
90,  1000,    1292.9,     0,          1000,       414.2,  -1585.8

The 45° angle lines (red)
45,  1707.1, 1000,        1414.2, 1414.2,    414.2,  -2414.2

The opposite 45° angle lines (purple)
45,  1000,    1707.1,     1414.2, 1414.2,    414.2,  -2414.2


The -45° angle lines (green)
-45, 1000,   1292.9,      1414.2, 1414.2,    414.2,  -2414.2

The opposite -45° angle lines (orange)
-45, 1707.1, 2000,        1414.2, 1414.2,    414.2,  -2414.2

Pattern File
*Octagons 1 x spaced,
;%TYPE=MODEL
0,   1292.9, 1000,         0,          1000,       414.2,  -1585.8
90,  1000,    1292.9,     0,          1000,       414.2,  -1585.8
45,  1707.1, 1000,        1414.2, 1414.2,    414.2,  -2414.2
45,  1000,    1707.1,     1414.2, 1414.2,    414.2,  -2414.2
-45, 1000,   1292.9,      1414.2, 1414.2,    414.2,  -2414.2
-45, 1707.1, 2000,        1414.2, 1414.2,    414.2,  -2414.2


This needs to be saved as a '.pat' file type before it can be used in Revit.  It can be edited in a simple text editor like 'Notepad'.

Notes:
  • The angle for the last two could be 135° instead of -45°, but the measurement direction would then be in a backward direction, which could be confusing to figure out.
  • If the width and spacing of octagons are not the same, you would need to define two lines at zero and two at 90 degree angles (like the 45 degree line definitions).


I hope this saves me hours of grappling with the file format and help files next time I need to create a quick pattern in Revit.

For examples of stretcher bond brick or tile patterns refer to this post