honeybee_plus.room module¶
Honeybee test room.
This class generates prototype rooms.
-
class
honeybee_plus.room.
Room
(name=None, origin=(0, 0, 0), width=3.0, depth=6.0, height=3.2, rotation_angle=0)[source]¶ Bases:
honeybee_plus.hbzone.HBZone
Honeybee room.
- Attribute:
origin: Origin of the room as a tuple (default: (0, 0, 0)). width: Room width. depth: Room depth. height: Room height. rotation_angle: Clock-wise rotation angle of the room from YAxis.
-
add_fenestration_surface
(wall_name, width, height, sill_height, window_name=None, radiance_material=None)[source]¶ Add rectangular fenestration surface to surface.
- Parameters
wall_name – Target wall name (back, right, front, left)
width – Opening width. Opening will be centered in HBSurface.
height – Opening height.
sill_height – Sill height (default: 1).
radiance_material – Optional radiance material for this fenestration.
Usage:
r = Room() for pt in r.generate_test_points():
print(pt)
r.add_fenestration_surface(‘back’, 2, 2, .7) r.add_fenestration_surface(‘right’, 4, 1.5, .5) r.add_fenestration_surface(‘right’, 4, 0.5, 2.2) with open(‘c:/ladybug/room.rad’, ‘wb’) as outf:
outf.write(r.to_rad_string(include_materials=True))
-
property
depth
¶ Room depth.
-
generate_interior_view
(u=0.5, v=0.5, z=0.5, angle=0, view_up_vector=(0, 0, 1), view_type=0, view_h_size=60, view_v_size=60, x_resolution=64, y_resolution=64, view_shift=0, view_lift=0)[source]¶ Generate an inetrior view.
- Parameters
u – u value between 0 and 1.
v – v value between 0 and 1.
z – z value between 0 and 1.
angle – Rotation angle from back wall.
view_up_vector – Set the view up (-vu) vector (vertical direction) to (x, y, z).cDefault: (0, 0, 1)
view_type –
- Set view type (-vt) to one of the choices below.
0: Perspective (v) 1: Hemispherical fisheye (h) 2: Parallel (l) 3: Cylindrical panorma (c) 4: Angular fisheye (a) 5: Planisphere [stereographic] projection (s)
For more detailed description about view types check rpict manual page: (http://radsite.lbl.gov/radiance/man_html/rpict.1.html)
view_h_size – Set the view horizontal size (-vs). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.
view_v_size – Set the view vertical size (-vv). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.
x_resolution – Set the maximum x resolution (-x) to an integer.
y_resolution – Set the maximum y resolution (-y) to an integer.
view_shift – Set the view shift (-vs). This is the amount the actual image will be shifted to the right of the specified view. This option is useful for generating skewed perspectives or rendering an image a piece at a time. A value of 1 means that the rendered image starts just to the right of the normal view. A value of −1 would be to the left. Larger or fractional values are permitted as well.
view_lift – Set the view lift (-vl) to a value. This is the amount the actual image will be lifted up from the specified view.
-
generate_test_points
(grid_size=1, height=0.75)[source]¶ Generate a grid of test points in the room.
- Parameters
grid_size – Size of test grid.
height – Test points height.
-
get_location
(u=0.5, v=0.5, z=0.5)[source]¶ Get location as a point based on u, v, z.
u, v, z must be between 0..1.
-
property
height
¶ Room height.
-
property
origin
¶ origin of the room.
-
property
rotation_angle
¶ Room rotation_angle.
-
property
surfaces
¶ Return room surfaces.
-
property
vertices
¶ Return the room vertices.
-
property
width
¶ Room width.