A single element may contain any number of materials, so the expression element.material provides a list (see section 4.4.6 for more detail). The list could be empty (e.g. for a fill element) or have a single item, but should always be treated as a list in calculations. It has two possible uses:
-
Searching for materials based on the name
This is often useful for attaching recipes automatically based on its materials (see section 4.5) or determining which measurements the recipe should make (see section 4.6). Consider a recipe intended to take measurement of all types of brick – it might automatically attach to any wall with a material containing the word “brick”:
wall.material contains “brick”
This would attach to walls with materials like “Brick”, “Red Brickwork”, “Brick – Engineered”, “Reclaimed Brick” etc.
The recipe might have a long list of measurements, each targeting a specific type of brick by a suitable expression, e.g.:
wall.material includes “Brick – Furness Handbridge Blend 215”
The associated quantity calculation will only be made when the wall includes a material exactly matching the name “Brick – Furness Handbridge Blend 215”.
-
Calculating geometric material quantities
Every material in a list has an area and volume that can be used in quantity calculations. A specific material can be referenced in a list by appending its name, e.g. for a material called “Red Brick”:
element.material(“Red Brick”)
The name must be an exact match, e.g. the above would not find “Red Brick 1”. The material quantities include:
area
element.material(“Red Brick”).area
The floor plan area
volume
element.material(“Red Brick”).volume
The total volume
If an element contains multiple skins matching the specified material, area and volume will total up the quantities from them all.
Comments
0 comments
Please sign in to leave a comment.