HB Room Parametric Set-up

  • Intro
  • Design
  • Parametric Room Creation
  • Window and door creation by dimensions
  • Windows by ratio
  • Shade Creation
  • HB Model Creation
  • Conclusion
  • Useful Links

Information

Primary software used Honeybee
Course HB Room Parametric Set-up
Primary subject Analysis & simulation
Secondary subject Climate analysis
Level Intermediate
Last updated November 11, 2024

Responsible

Faculty

HB Room Parametric Set-up 0/8

HB Room Parametric Set-up link copied

Tutorial on a paramtric way to setting-up a HB room that can be used for optimization and various simulations.

The exercise aims to guide students through learning how to set-up a parametric room geometry in Grasshopper that can be later used to set up a basic Honeybee room for simulations. The creation of the basic HB room model parametrically allows for automatic iterating through design options.

Parametric room creation
Parametric room creation

HB Room Parametric Set-up 1/8

Design link copied

This example refers to a shoebox geometry and highlights all the important parameters both for setting up the analysis geometry, but also for running the different simulations. Let’s assume an apartment which is on the ground floor of a 2-storeys building. The apartment has 1 façade, the other walls are interior walls. The starting design has a rectangular plan of 10m*10m and it has a height of 3m. The apartment has an entrance from the road with an opaque wooden door and has also one operable window facing the street. The window is shaded with wooden horizontal louvres. On the left and right side there are adjacent apartments, but on the back side it is not neighboring any other apartment or building. The exterior walls are made of concrete in light grey color. The slabs are also made of concrete and they are painted in white color on the bottom side (ceiling). On the top part (floor), they are covered by timber in a darker color. The interior walls are made of plywood and covered also in white paint. With the parametric set-up you can change the size of the room, window, door and shading automatically.

Shoebox geometry design overview
Shoebox geometry design overview

HB Room Parametric Set-up 2/8

Parametric Room Creation link copied

In order to run an analysis through Honeybee, you should first convert the volumes that you have already created for your design into a Honeybee model. This involves importing the created geometry into separate Grasshopper components and organizing them appropriately, in order to have distinct components for walls, openings and shadings. Some important aspects of the openings surfaces creation need to be checked so that they do not obstruct the Honeybee room from running smoothly. For further details on how to set up the room geometry please refer to the “Honeybee room set-up” tutorial.

First, a room for simulation is parametrically created in Grasshopper. A shoebox room is created from 2 points. The input variables room width, depth and height are given with number sliders for the parametric set-up. Remember that, your sliders to determine the room size should have reasonable min & max limits in case you want later to connect them as genomes in an optimization run. To create a shoe-box room follow these steps:

Create shoebox room from 2 points
Create shoebox room from 2 points
  • Create 2 Construct Point components to set the points that will create the boundaries of the shoebox.
Vector
Point
Construct Point
  • Create 3 Number Sliders to specify the room width, depth and height and connect them to the X, Y and Z coordinates of the second constructed point (the first being (0,0,0) ).
Params
Input
Number Slider
  • Create a Box 2PT component. Connect the 2 constructed points to the ‘Point A’ & ‘Point B’ inputs to create the shoebox geometry.
Surface
Primitive
Box 2PT

HB Room from Solid

The simplest way to create a HB room is when it refers only to a room that has solid walls without openings. With this component you can directly as input connect the closed volume (polysurface, mesh, box) that corresponds to your design. It will automatically set its surfaces as walls, roof or exterior floors based on their position and angle of inclination. The roof angle value (in degrees) determines below which angle all faces will be roofs and above which all faces will be walls. By default the value is 60, so that automatically all faces with angle < 60° (horizontal) will be set as roofs and all faces with angle > 60° (vertical) as walls. In this case you should:

Create HB room from solid
Create HB room from solid
  • Create a Honeybee » Create » HB Room from Solid
Honeybee
Create
HB Room from Solid
  • Connect the box output in _geo input.
  • Define the roof angle in a panel and connect in _roof_angle input.
Params
Input
Panel

Note: Here we do not want the entities to be separate (as with the Explode command) but joined all together into one closed polysurface (Brep) or Mesh. If you connect separate surfaces, it will give you a warning even if in total they form a closed volume.

Material properties

With the HB solid room component the material properties are set on the default settings. However, depending on the simulation you want to run you need/want to define specific material properties. How to create those properties is explained for daylight and energy simulations in the corresponding tutorial.

  • Daylight simulations tutorial
  • Energy simulation tutorial

With the HB solid room component those material properties can be set to your specific set by connecting the output of HB Modifier set into the input _mod_set_ of the HB solid room component. Create the exterior, interior, subface and shade subsets as explained in the tutorial above and connect this to the HB modifier set.

Adjust material properties in HB solid room component
Adjust material properties in HB solid room component
  • Create HB modifier set specific for you simulation type
  • Connect output mod_set into the input _mod_set_ of the HB solid room component

Note: The material properties change automatically to the correct subset when you change the face type after the HB solid model. (As explained in the next step)

Adjusting boundary conditions

The boundary conditions of all faces of the shoebox room geometry will be automatically set to outdoors. If your room has a ceiling that faces indoors then change the boundary condition to ‘adiabatic’ and the roof will also automatically change to a ceiling. Same goes with the indoor walls if the boundary condition is changed, then the type automatically changes from facade to indoor wall.

Note: ‘Outdoors’ boundary condition will be automatically assigned to all the walls without differentiation between interior and exterior. On the bottom surface, the ‘Ground’ boundary condition will be assigned.

To change the boundary condition of a face, use Deconstruct Brep and a List Item to select the indoor faces. Then, connect this to an HB properties by Guides Surface component and change the type or boundary conditinon of a HB room with a surface as guideline. Connect the room that is created from solid component in the ‘_rooms’ input and the selected surfaces into the ‘_guide’ input. Then a panel with ‘adiabatic’ as input for the ‘bc_’. The steps to do this:

  • Create a Decontruct Breplist.
Surface
Analysis
Decontruct Breplist
  • Connect it to the shoebox Box 2 Pt component’s output.
  • Create a List Item component and connect the ‘List’ input to the ‘Faces’ output of the Deconstruct Brep.
Sets
List
List Item
  • Create a HB properties by Guides Surface. Connect the HB room from solid to the ‘_rooms’ input and the List Item to the ’_guide’ input.
Honeybee
Create
HB properties by Guides Surface
  • Use Panel to set the bc_’ input to adiabatic.
Params
Input
Panel
Adjusting boundary conditions of HB solid room
Adjusting boundary conditions of HB solid room

To always select automatically the correct faces as the interior wall surfaces, a Python script is created. This script only works for a shoebox geometry with 1 façade surface.  The drop down menu of façade is also used later on with the windows by dimension to orient it on the right plane. To create the automatic selection:

Selecting right façade
Selecting right façade
  • Create a Pyhton 3 Script component.
Maths
Script
Pyhton 3 Script
  • Create 3 input sources and name them ‘facade_index’, ‘floor’ and ‘ceiling’. Create 2 output sources and name them ‘interior surfaces’ and ‘exterior surfaces’.
  • Create 3 Value List components to select the facade, floor and ceiling faces.
Params
Input
Value List
  • Use a Data component to get the interior surfaces and set the ‘index’ of the List Item.
Params
Primitive
Data
  • Write the Python script below:
interior_surfaces = [0, 1, 2, 3]
exterior_surfaces = [facade_index]

interior_surfaces.remove(facade_index)

if floor == 0:
     exterior_surfaces.append(4)
else:
    interior_surfaces.append(4)
 
if ceiling == 0:
    exterior_surfaces.append(5)
else:
    interior_surfaces.append(5)
HB faces check after adjustments
HB faces check after adjustments

HB Room Parametric Set-up 3/8

Window and door creation by dimensions link copied

After we have created the shoebox geometry it is time to create parametrically the window and door openings. In this example, 1 window and 1 door is created on the facade surface. First, we create a plane for the window and door orientation on the facade wall. Next, we create the rectangle of the window and the door based on their specific dimensions. Remember that, your sliders to create the window and door should have reasonable min & max limits in case you want later to connect them as genomes in an optimization run. Then, we need to make the window an HB aperture and the door an HB door and finally, connect it to the HB room that was created in the step before.

Orientation plane

To create a plane for the window and door orientation:

  • Create 2 List Item components and connect their ‘list’ inputs to the ‘faces’ output of the Deconstruct Brep in the Adjust Boundary Conditions part.
Sets
List
List Item
  • Use Panel to set the index of the first List Item to 4 (index of the floor)
Params
Input
Panel
  • Connect the ‘index’ input of the second List Item to the Facade Value List component created in the surface conditions.
  • Create a Decontruct Breplist component and an Area component and connect them to the List Item component outputs.
Surface
Analysis
Decontruct Breplist
Surface
Analysis
Area
  • Create a List Item component and connect its ‘list’ input to the ‘vertices’ output of the Deconstruct Brep and its ‘index’ input to the Facade Value List component.
Sets
List
List Item
  • Create a Substraction component. Connect its inputs to the List Item and ‘centroid output’ of the Area component.
Maths
Operators
Substraction
  • Create a Move component. Connect the ‘geometry’ input to the second List Item component and the ‘motion’ to the Substraction result.
Transform
Euclidean
Move
  • Create a Plane to get the final plane from the output ‘geometry’ of the Move.
Params
Geometry
Plane
Plane for the window and door orientation
Plane for the window and door orientation

After we have created the shoebox geometry it is time to create parametrically the window and door openings. In this example, 1 window and 1 door is created on the facade surface. First, we create a plane for the window and door orientation on the facade wall. Next, we create the rectangle of the window and the door based on their specific dimensions. Remember that, your sliders to create the window and door should have reasonable min & max limits in case you want later to connect them as genomes in an optimization run. Then, we need to make the window an HB aperture and the door an HB door and finally, connect it to the HB room that was created in the step before.

Window geometry

To create a window and place it on the wall at the right location:

  • Create 2 List Item components and connect their ‘list’ inputs to the ‘faces’ output of the Deconstruct Brep in the Adjust Boundary Conditions part.
Sets
List
List Item
  • Use a Panel to set the index of the first List Item to 4 (index of the floor)
Params
Input
Panel
  • Connect the ‘index’ input of the second List Item to the Facade Value List component created in the surface conditions.Curve » Primitive » Rectangle 2Pt
  • Create a Decontruct Breplist component and an Area component and connect them to the List Item component outputs.
Surface
Analysis
Decontruct Breplist
Surface
Analysis
Area
  • Create a List Item component and connect its ‘list’ input to the ‘vertices’ output of the Deconstruct Brep and its ‘index’ input to the Facade Value List component.
Sets
List
List Item
  • Create a Substraction component. Connect its inputs to the List Item and ‘centroid output’ of the Area component.
Maths
Operators
Substraction
  • Create a Move component. Connect the ‘geometry’ input to the second List Item component and the ‘motion’ to the Substraction result.
Transform
Euclidean
Move
  • Create a Params » Geometry » Plane to get the final plane from the output ‘geometry’ of the Move.
Params
Geometry
Plane
Window geometry creation
Window geometry creation

Door geometry

Similarly, to create the door opening:

  • Create 4 Number Sliders to specify the distance of the door from the side wall, the door width and height and the wall thickness.
Params
Input
Number Slider
  • Create two Construct Point components to create the rectangle using the windows dimensions.
Vector
Point
Construct Point
  • Create 5 Number Sliders to specify the distance of the window from the side wall, the sill height, the width, the height of the window and the wall thickness.
Params
Input
Number Slider
  • Create two Construct Point components to create the rectangle using the windows dimensions.
Vector
Point
Construct Point
  • Create a Rectangle 2Pt component.
Curve
Primitive
Rectangle 2Pt
  • Create a XZ Plane component and connect it to the ‘plane’ input of the rectangle 2Pt.
Vector
Plane
XZ Plane
  • Connect the 2 constructed points to the ‘point A’ and ‘point B’ inputs of the Rectangle 2Pt.Use a Surface component to get the final door surface from the output ‘geometry’ of the Orient.
Params
Geometry
Surface
  • Create a Orient component. Connect the ‘rectangle’ output of the Rectangle 2Pt to the ‘geometry’ input. Connect the XZ Plane to the ‘source’ input. Connect the Plane to the ‘target’ input.
Transform
Euclidean
Orient
  • Create a Surface component to get the final window surface from the output ‘geometry’ of the Orient
Params
Geometry
Surface
Window and door geometry creation
Window and door geometry creation

Note: When creating the door rectangle, remember to lift the lowest point of the rectangle slightly from reaching the floor level with a margin value. This will be crucial later for the creation of the HB room.

HB room connection

To connect the window and door to the HB room:

  • Create an HB Aperture component and connect its ‘_geo’ input to the window surface.
Honeybee
Create
HB Aperture
  • Create an HB Door component and connect its ‘_geo’ input to the door surface.
Honeybee
Create
HB Door
  • Create an HB Extruded Border Shades component and connect the ‘_hb_objs’ input to the ‘apertures’ output of the HB aperture. Connect the ‘_depth’ input to the wall thickness Number Slider of the window creation.
Honeybee
Create
HB Extruded Border Shades
  • Use a Panel to set the ‘indoor_’ input to true and extrude the wall towards the interior of the room.
Params
Input
Panel
  • Create an HB Add Subface component and connect its ‘hb_obj’ input to the HB Properties by Guide Surface component. Connect the ‘_sub_faces’ input to the ‘hb_objs’ ouput of the HB Extruded Border Shades and the ‘doors’ output of the HBDoor.
Honeybee
Create
HB Add Subface
Connecting window and door geometry to HB room
Connecting window and door geometry to HB room

HB Room Parametric Set-up 4/8

Windows by ratio link copied

An alternative way for applying openings in your Honeybee model is to create them based on ratio. You need to make sure to connect the correct window/wall ratio to the correct facade side. To do so you need to create a simple Python script to connect the ration to the correct side automatically. Alternatively, you can use the component HB façade parameters, however, by doing so you need to manually connect the ratio with the right façade, which goes against the parametrically of the model and is sensitive for errors.

Parametric ratio list

To create a parametric window/wall ratio list:

Parametric ratio list with Python
Parametric ratio list with Python
  • Create 1 Number Slider to specify the window/wall ratio.
Params
Input
Number Slider
  • Create a Pyhton 3 Script component.
Maths
Script
Pyhton 3 Script
  • Set 2 inputs and name them to ‘facade_index’ and ‘ratio’ and 1 output and name it to ‘ratio_list’.
  • Connect the ‘facade_index’ to the Facade Value List of the surface conditions and the ‘ratio’ to the window/wall ratio Slider.
  • Write the script below:
# Dictionary GH facade index with corresponding HB orientation index
facade_to_hb = {
    0: 2,
    1: 1,
    2: 0,
    3: 3
}

# Function to get HB_index based on facade_index
def get_hb_index(facade_index):
    return facade_to_hb.get(facade_index, "Facade index not found")

#change the GH index of the facade to the HB facade index
hb_index = get_hb_index(facade_index)

#Make the HB ratio list
ratio_list = [0, 0, 0, 0]
ratio_list[hb_index] = ratio
 

Windows by ratio

To create windows by window/wall ratio:

  • Create 3 Number Sliders to specify the window height, the sill height and the wall thickness.
Params
Input
Number Slider
  • Create a Boolean Toggle component to specify if there are multiple windows on the facade.
Params
Input
Boolean Toggle
  • Create a Honeybee » Create » HB Apertures by Ratio
Honeybee
Create
HB Apertures by Ratio
  • Connect the ‘_hb_objs’ input to the HB Properties by Guide Surface component. Connect the ‘_ratio’ input to the ‘ratio_list’ output of the Python component, the ‘subdivide’ input to the Boolean Toggle and the ‘_win_height_’ and ‘_sill_height_’ inputs to the respective sliders.
  • Create a HB Extruded Border Shades component and connect the ‘_hb_objs’ input to the HB Apertures by Ratio ‘hb_objs’ output.
Honeybee
Create
HB Extruded Border Shades
  • Connect the ‘_depth’ input to the wall thickness slider. Use a Panel to set the ‘indoor_’ output to true and extrude the wall towards the interior of the room.
Params
Input
Panel
Window by ratio creation
Window by ratio creation

HB Room Parametric Set-up 5/8

Shade Creation link copied

In this example, we are going to apply shades to all the window, but you can also select separately which opening you want the shades to be applied to. To do so we use a HB louvre shades component and connect the HB room object with the created windows and doors (if applicable. Then create sliders to set the values of depth of the louvers, the number of shades, the distance between the louvers and the angle of louvers. Remember that, your sliders should have reasonable min & max limits in case you want later to connect them as genomes in an optimization run. Additionally, a Boolean toggle is used to set the shading to vertical or horizontal. To create HB shading parametrically:

  • Create a HB Louver Shades component and connect the ‘hb_obj’ result from HB Add Subface to the ‘_hb_objs’ input.
Honeybee
Create
HB Louver Shades
  • Create 4 Number Sliders to define the depth of the louvers, the number of shades, the distance between the louvers and the angle of louvers.
Params
Input
Number Slider
  • Connect the sliders to the ‘_depth’, ‘_shade_count_’, ‘_dist_between_’ and ‘_angle_’ inputs of the HB Louver Shades.
  • Use a Boolean Toggle component to set the ‘vertical_’ input of the HB Louver Shades to False (in order to have horizontal louvres).
Params
Input
Boolean Toggle
Creation of HB Louver Shades
Creation of HB Louver Shades

HB Room Parametric Set-up 6/8

HB Model Creation link copied

Final step of this tutorial is to add all components together to compose the HB room. To do that you can simply connect the HB object from the shading into a HB room component. Then we need to validate the model and visualize it to check if it is correct. To visualize if the model is correct you can use the HB visualize by type component. To validate the model you can use the HB validate model component and check the output after it ran.   To create the HB model:

  • Create an HB Room and connect the ‘rooms_’ input to the ‘hb_objs’ of the HB Louver Shades.
Honeybee
Create
HB Room
  • Create a HB Visualize by Type and connect it to the ‘model’ output of the HB Model to visualize the HB model.
Honeybee
Visualize
HB Visualize by Type
  • Create a HB Validate Model component and connect the ‘_model’ input to the ‘model’ output of the HB Model.
Honeybee
Serialize
HB Validate Model
  • Use a LB FalseStartTogle component, connect it to the ‘_validate’ input of the HB Validate Model and double click it to validate the model.
Ladybug
Extra
LB FalseStartTogle
Create and validate the HB Model
Create and validate the HB Model

HB Room Parametric Set-up 7/8

Conclusion link copied

In this tutorial you have learned how to create a room in Grasshopper in a parametric way. You are now able to use this technique to create any geometry necessary for you work with Grasshopper and use it in any possible analyses and simulations. You also learned how to parametrically set up a Honeybee room  from solid, add parametric openings and shades and construct the HB model.

Final script of creating a HB room parametrically
Final script of creating a HB room parametrically

Final Script

Below you find the complete script of the parametric HB room set-up.

Download ParametricRoom_GHscript_00
HB Room Paramtric Setup Final Grasshopper Script (ZIP, 107 KB)

HB Room Parametric Set-up 8/8

Useful Links link copied

Linked tutorials

If you want to create a more dynamic room, you can check out the tutorial for a parametric room set-up using HB solid room. The tutorial gives the option to create windows by ratio or by specific dimensions.

Follow up tutorials

These next two tutorials use this room set-up to create and perform the analysis simulations for daylight and energy. Check the following tutorials: