honeybee-grasshopper-radiance 1.35.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. honeybee_grasshopper_radiance/__init__.py +7 -0
  2. honeybee_grasshopper_radiance/src/HB Adjust HDR.py +107 -0
  3. honeybee_grasshopper_radiance/src/HB Ambient Resolution.py +63 -0
  4. honeybee_grasshopper_radiance/src/HB Annual Average Values.py +205 -0
  5. honeybee_grasshopper_radiance/src/HB Annual Cumulative Values.py +191 -0
  6. honeybee_grasshopper_radiance/src/HB Annual Daylight Metrics.py +209 -0
  7. honeybee_grasshopper_radiance/src/HB Annual Daylight.py +153 -0
  8. honeybee_grasshopper_radiance/src/HB Annual Glare Metrics.py +137 -0
  9. honeybee_grasshopper_radiance/src/HB Annual Irradiance.py +112 -0
  10. honeybee_grasshopper_radiance/src/HB Annual Peak Values.py +224 -0
  11. honeybee_grasshopper_radiance/src/HB Annual Results to Data.py +246 -0
  12. honeybee_grasshopper_radiance/src/HB Annual Sunlight Exposure.py +147 -0
  13. honeybee_grasshopper_radiance/src/HB Aperture Group Schedule.py +69 -0
  14. honeybee_grasshopper_radiance/src/HB Apply Face Modifier.py +107 -0
  15. honeybee_grasshopper_radiance/src/HB Apply ModifierSet.py +71 -0
  16. honeybee_grasshopper_radiance/src/HB Apply Shade Modifier.py +110 -0
  17. honeybee_grasshopper_radiance/src/HB Apply Window Modifier.py +120 -0
  18. honeybee_grasshopper_radiance/src/HB Assign Grids and Views.py +58 -0
  19. honeybee_grasshopper_radiance/src/HB Automatic Aperture Group.py +100 -0
  20. honeybee_grasshopper_radiance/src/HB BSDF Modifier.py +78 -0
  21. honeybee_grasshopper_radiance/src/HB CIE Standard Sky.py +75 -0
  22. honeybee_grasshopper_radiance/src/HB Certain Illuminance.py +41 -0
  23. honeybee_grasshopper_radiance/src/HB Check Scene.py +208 -0
  24. honeybee_grasshopper_radiance/src/HB Climatebased Sky.py +75 -0
  25. honeybee_grasshopper_radiance/src/HB Cumulative Radiation.py +98 -0
  26. honeybee_grasshopper_radiance/src/HB Custom Sky.py +74 -0
  27. honeybee_grasshopper_radiance/src/HB Daylight Control Schedule.py +211 -0
  28. honeybee_grasshopper_radiance/src/HB Daylight Factor.py +82 -0
  29. honeybee_grasshopper_radiance/src/HB Deconstruct Modifier.py +47 -0
  30. honeybee_grasshopper_radiance/src/HB Deconstruct ModifierSet Interior.py +67 -0
  31. honeybee_grasshopper_radiance/src/HB Deconstruct ModifierSet.py +80 -0
  32. honeybee_grasshopper_radiance/src/HB Deconstruct Wea.py +44 -0
  33. honeybee_grasshopper_radiance/src/HB Direct Sun Hours.py +88 -0
  34. honeybee_grasshopper_radiance/src/HB Dynamic Aperture Group.py +90 -0
  35. honeybee_grasshopper_radiance/src/HB Dynamic Shade Group.py +95 -0
  36. honeybee_grasshopper_radiance/src/HB Dynamic State Geometry.py +68 -0
  37. honeybee_grasshopper_radiance/src/HB Dynamic State.py +44 -0
  38. honeybee_grasshopper_radiance/src/HB Exterior Modifier Subset.py +68 -0
  39. honeybee_grasshopper_radiance/src/HB Extract HDR.py +225 -0
  40. honeybee_grasshopper_radiance/src/HB False Color.py +246 -0
  41. honeybee_grasshopper_radiance/src/HB Get Dynamic Groups.py +57 -0
  42. honeybee_grasshopper_radiance/src/HB Get Grids and Views.py +82 -0
  43. honeybee_grasshopper_radiance/src/HB Glare Postprocess.py +225 -0
  44. honeybee_grasshopper_radiance/src/HB Glass Modifier 3.py +62 -0
  45. honeybee_grasshopper_radiance/src/HB Glass Modifier.py +58 -0
  46. honeybee_grasshopper_radiance/src/HB HDR to GIF.py +72 -0
  47. honeybee_grasshopper_radiance/src/HB Imageless Annual Glare.py +108 -0
  48. honeybee_grasshopper_radiance/src/HB Interior Modifier Subset.py +83 -0
  49. honeybee_grasshopper_radiance/src/HB Metal Modifier 3.py +70 -0
  50. honeybee_grasshopper_radiance/src/HB Metal Modifier.py +68 -0
  51. honeybee_grasshopper_radiance/src/HB Mirror Modifier 3.py +56 -0
  52. honeybee_grasshopper_radiance/src/HB Mirror Modifier.py +55 -0
  53. honeybee_grasshopper_radiance/src/HB Model to Rad Folder.py +75 -0
  54. honeybee_grasshopper_radiance/src/HB ModifierSet.py +127 -0
  55. honeybee_grasshopper_radiance/src/HB Opaque Modifier 3.py +68 -0
  56. honeybee_grasshopper_radiance/src/HB Opaque Modifier.py +67 -0
  57. honeybee_grasshopper_radiance/src/HB Point-In-Time Grid-Based.py +93 -0
  58. honeybee_grasshopper_radiance/src/HB Point-In-Time View-Based.py +127 -0
  59. honeybee_grasshopper_radiance/src/HB Radial Grid from Rooms.py +160 -0
  60. honeybee_grasshopper_radiance/src/HB Radial Sensor Grid.py +99 -0
  61. honeybee_grasshopper_radiance/src/HB Radiance Parameter.py +163 -0
  62. honeybee_grasshopper_radiance/src/HB Search Modifier Sets.py +58 -0
  63. honeybee_grasshopper_radiance/src/HB Search Modifiers.py +58 -0
  64. honeybee_grasshopper_radiance/src/HB Section Plane View.py +69 -0
  65. honeybee_grasshopper_radiance/src/HB Sensor Grid from Apertures.py +153 -0
  66. honeybee_grasshopper_radiance/src/HB Sensor Grid from Faces.py +147 -0
  67. honeybee_grasshopper_radiance/src/HB Sensor Grid from Rooms.py +210 -0
  68. honeybee_grasshopper_radiance/src/HB Sensor Grid.py +82 -0
  69. honeybee_grasshopper_radiance/src/HB Shade Modifier Subset.py +62 -0
  70. honeybee_grasshopper_radiance/src/HB Sky View.py +86 -0
  71. honeybee_grasshopper_radiance/src/HB Spatial Daylight Autonomy.py +86 -0
  72. honeybee_grasshopper_radiance/src/HB Subface Modifier Subset.py +90 -0
  73. honeybee_grasshopper_radiance/src/HB Translucent Modifier 3.py +77 -0
  74. honeybee_grasshopper_radiance/src/HB Translucent Modifier.py +77 -0
  75. honeybee_grasshopper_radiance/src/HB View from Viewport.py +85 -0
  76. honeybee_grasshopper_radiance/src/HB View.py +96 -0
  77. honeybee_grasshopper_radiance/src/HB Visualize Sky.py +141 -0
  78. honeybee_grasshopper_radiance/src/HB Wea From Clear Sky.py +61 -0
  79. honeybee_grasshopper_radiance/src/HB Wea From EPW.py +50 -0
  80. honeybee_grasshopper_radiance/src/HB Wea From Tau Clear Sky.py +56 -0
  81. honeybee_grasshopper_radiance/src/HB Wea from Zhang-Huang.py +63 -0
  82. honeybee_grasshopper_radiance/src/__init__.py +1 -0
  83. honeybee_grasshopper_radiance/user_objects/HB Adjust HDR.ghuser +0 -0
  84. honeybee_grasshopper_radiance/user_objects/HB Ambient Resolution.ghuser +0 -0
  85. honeybee_grasshopper_radiance/user_objects/HB Annual Average Values.ghuser +0 -0
  86. honeybee_grasshopper_radiance/user_objects/HB Annual Cumulative Values.ghuser +0 -0
  87. honeybee_grasshopper_radiance/user_objects/HB Annual Daylight Metrics.ghuser +0 -0
  88. honeybee_grasshopper_radiance/user_objects/HB Annual Daylight.ghuser +0 -0
  89. honeybee_grasshopper_radiance/user_objects/HB Annual Glare Metrics.ghuser +0 -0
  90. honeybee_grasshopper_radiance/user_objects/HB Annual Irradiance.ghuser +0 -0
  91. honeybee_grasshopper_radiance/user_objects/HB Annual Peak Values.ghuser +0 -0
  92. honeybee_grasshopper_radiance/user_objects/HB Annual Results to Data.ghuser +0 -0
  93. honeybee_grasshopper_radiance/user_objects/HB Annual Sunlight Exposure.ghuser +0 -0
  94. honeybee_grasshopper_radiance/user_objects/HB Aperture Group Schedule.ghuser +0 -0
  95. honeybee_grasshopper_radiance/user_objects/HB Apply Face Modifier.ghuser +0 -0
  96. honeybee_grasshopper_radiance/user_objects/HB Apply ModifierSet.ghuser +0 -0
  97. honeybee_grasshopper_radiance/user_objects/HB Apply Shade Modifier.ghuser +0 -0
  98. honeybee_grasshopper_radiance/user_objects/HB Apply Window Modifier.ghuser +0 -0
  99. Views.ghuser +0 -0
  100. honeybee_grasshopper_radiance/user_objects/HB Automatic Aperture Group.ghuser +0 -0
  101. honeybee_grasshopper_radiance/user_objects/HB BSDF Modifier.ghuser +0 -0
  102. honeybee_grasshopper_radiance/user_objects/HB CIE Standard Sky.ghuser +0 -0
  103. honeybee_grasshopper_radiance/user_objects/HB Certain Illuminance.ghuser +0 -0
  104. honeybee_grasshopper_radiance/user_objects/HB Check Scene.ghuser +0 -0
  105. honeybee_grasshopper_radiance/user_objects/HB Climatebased Sky.ghuser +0 -0
  106. honeybee_grasshopper_radiance/user_objects/HB Cumulative Radiation.ghuser +0 -0
  107. honeybee_grasshopper_radiance/user_objects/HB Custom Sky.ghuser +0 -0
  108. honeybee_grasshopper_radiance/user_objects/HB Daylight Control Schedule.ghuser +0 -0
  109. honeybee_grasshopper_radiance/user_objects/HB Daylight Factor.ghuser +0 -0
  110. honeybee_grasshopper_radiance/user_objects/HB Deconstruct Modifier.ghuser +0 -0
  111. honeybee_grasshopper_radiance/user_objects/HB Deconstruct ModifierSet Interior.ghuser +0 -0
  112. honeybee_grasshopper_radiance/user_objects/HB Deconstruct ModifierSet.ghuser +0 -0
  113. honeybee_grasshopper_radiance/user_objects/HB Deconstruct Wea.ghuser +0 -0
  114. honeybee_grasshopper_radiance/user_objects/HB Direct Sun Hours.ghuser +0 -0
  115. honeybee_grasshopper_radiance/user_objects/HB Dynamic Aperture Group.ghuser +0 -0
  116. honeybee_grasshopper_radiance/user_objects/HB Dynamic Shade Group.ghuser +0 -0
  117. honeybee_grasshopper_radiance/user_objects/HB Dynamic State Geometry.ghuser +0 -0
  118. honeybee_grasshopper_radiance/user_objects/HB Dynamic State.ghuser +0 -0
  119. honeybee_grasshopper_radiance/user_objects/HB Exterior Modifier Subset.ghuser +0 -0
  120. honeybee_grasshopper_radiance/user_objects/HB Extract HDR.ghuser +0 -0
  121. honeybee_grasshopper_radiance/user_objects/HB Face Radiance Attributes.ghuser +0 -0
  122. honeybee_grasshopper_radiance/user_objects/HB False Color.ghuser +0 -0
  123. honeybee_grasshopper_radiance/user_objects/HB Get Dynamic Groups.ghuser +0 -0
  124. Views.ghuser +0 -0
  125. honeybee_grasshopper_radiance/user_objects/HB Glare Postprocess.ghuser +0 -0
  126. honeybee_grasshopper_radiance/user_objects/HB Glass Modifier 3.ghuser +0 -0
  127. honeybee_grasshopper_radiance/user_objects/HB Glass Modifier.ghuser +0 -0
  128. honeybee_grasshopper_radiance/user_objects/HB HDR to GIF.ghuser +0 -0
  129. honeybee_grasshopper_radiance/user_objects/HB Imageless Annual Glare.ghuser +0 -0
  130. honeybee_grasshopper_radiance/user_objects/HB Interior Modifier Subset.ghuser +0 -0
  131. honeybee_grasshopper_radiance/user_objects/HB Metal Modifier 3.ghuser +0 -0
  132. honeybee_grasshopper_radiance/user_objects/HB Metal Modifier.ghuser +0 -0
  133. honeybee_grasshopper_radiance/user_objects/HB Mirror Modifier 3.ghuser +0 -0
  134. honeybee_grasshopper_radiance/user_objects/HB Mirror Modifier.ghuser +0 -0
  135. honeybee_grasshopper_radiance/user_objects/HB Model to Rad Folder.ghuser +0 -0
  136. honeybee_grasshopper_radiance/user_objects/HB ModifierSet.ghuser +0 -0
  137. honeybee_grasshopper_radiance/user_objects/HB Opaque Modifier 3.ghuser +0 -0
  138. honeybee_grasshopper_radiance/user_objects/HB Opaque Modifier.ghuser +0 -0
  139. honeybee_grasshopper_radiance/user_objects/HB Point-In-Time Grid-Based.ghuser +0 -0
  140. honeybee_grasshopper_radiance/user_objects/HB Point-In-Time View-Based.ghuser +0 -0
  141. honeybee_grasshopper_radiance/user_objects/HB Radial Grid from Rooms.ghuser +0 -0
  142. honeybee_grasshopper_radiance/user_objects/HB Radial Sensor Grid.ghuser +0 -0
  143. honeybee_grasshopper_radiance/user_objects/HB Radiance Parameter.ghuser +0 -0
  144. honeybee_grasshopper_radiance/user_objects/HB Room Radiance Attributes.ghuser +0 -0
  145. honeybee_grasshopper_radiance/user_objects/HB Search Modifier Sets.ghuser +0 -0
  146. honeybee_grasshopper_radiance/user_objects/HB Search Modifiers.ghuser +0 -0
  147. honeybee_grasshopper_radiance/user_objects/HB Section Plane View.ghuser +0 -0
  148. honeybee_grasshopper_radiance/user_objects/HB Sensor Grid from Apertures.ghuser +0 -0
  149. honeybee_grasshopper_radiance/user_objects/HB Sensor Grid from Faces.ghuser +0 -0
  150. honeybee_grasshopper_radiance/user_objects/HB Sensor Grid from Rooms.ghuser +0 -0
  151. honeybee_grasshopper_radiance/user_objects/HB Sensor Grid.ghuser +0 -0
  152. honeybee_grasshopper_radiance/user_objects/HB Shade Modifier Subset.ghuser +0 -0
  153. honeybee_grasshopper_radiance/user_objects/HB Sky View.ghuser +0 -0
  154. honeybee_grasshopper_radiance/user_objects/HB Spatial Daylight Autonomy.ghuser +0 -0
  155. honeybee_grasshopper_radiance/user_objects/HB Subface Modifier Subset.ghuser +0 -0
  156. honeybee_grasshopper_radiance/user_objects/HB Translucent Modifier 3.ghuser +0 -0
  157. honeybee_grasshopper_radiance/user_objects/HB Translucent Modifier.ghuser +0 -0
  158. honeybee_grasshopper_radiance/user_objects/HB View from Viewport.ghuser +0 -0
  159. honeybee_grasshopper_radiance/user_objects/HB View.ghuser +0 -0
  160. honeybee_grasshopper_radiance/user_objects/HB Visualize Sky.ghuser +0 -0
  161. honeybee_grasshopper_radiance/user_objects/HB Wea From Clear Sky.ghuser +0 -0
  162. honeybee_grasshopper_radiance/user_objects/HB Wea From EPW.ghuser +0 -0
  163. honeybee_grasshopper_radiance/user_objects/HB Wea From Tau Clear Sky.ghuser +0 -0
  164. honeybee_grasshopper_radiance/user_objects/HB Wea from Zhang-Huang.ghuser +0 -0
  165. honeybee_grasshopper_radiance/user_objects/__init__.py +1 -0
  166. honeybee_grasshopper_radiance-1.35.1.dist-info/METADATA +64 -0
  167. honeybee_grasshopper_radiance-1.35.1.dist-info/RECORD +170 -0
  168. honeybee_grasshopper_radiance-1.35.1.dist-info/WHEEL +5 -0
  169. honeybee_grasshopper_radiance-1.35.1.dist-info/licenses/LICENSE +661 -0
  170. honeybee_grasshopper_radiance-1.35.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,107 @@
1
+ # Honeybee: A Plugin for Environmental Analysis (GPL)
2
+ # This file is part of Honeybee.
3
+ #
4
+ # Copyright (c) 2025, Ladybug Tools.
5
+ # You should have received a copy of the GNU Affero General Public License
6
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
7
+ #
8
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
9
+
10
+ """
11
+ Apply a Modifier to Honeybee Faces, Doors or Room walls.
12
+ _
13
+ This component supports the assigning of different modifiers based on cardinal
14
+ orientation, provided that a list of Modifiers are input to the _mod.
15
+ -
16
+
17
+ Args:
18
+ _hb_objs: Honeybee Faces, Doors, Rooms or a Model to which the input _mod should
19
+ be assigned. For the case of Rooms or a Model, the modifier
20
+ will only be applied to the Room's outdoor walls. Note that, if you
21
+ need to assign a modifier to all the roofs, floors, etc. of a
22
+ Room, the best practice is to create a ModifierSet and assing that
23
+ to the Room.
24
+ _mod: A Honeybee Modifier to be applied to the input _hb_objs.
25
+ This can also be text for a modifier to be looked up in the
26
+ modifier library. If an array of text or modifier objects
27
+ are input here, different modifiers will be assigned based on
28
+ cardinal direction, starting with north and moving clockwise.
29
+
30
+ Returns:
31
+ hb_objs: The input honeybee objects with their modifiers edited.
32
+ """
33
+
34
+ ghenv.Component.Name = 'HB Apply Face Modifier'
35
+ ghenv.Component.NickName = 'ApplyFaceMod'
36
+ ghenv.Component.Message = '1.9.0'
37
+ ghenv.Component.Category = 'HB-Radiance'
38
+ ghenv.Component.SubCategory = '1 :: Modifiers'
39
+ ghenv.Component.AdditionalHelpFromDocStrings = '6'
40
+
41
+
42
+ try: # import the honeybee-radiance extension
43
+ from honeybee_radiance.lib.modifiers import modifier_by_identifier
44
+ except ImportError as e:
45
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
46
+
47
+ try: # import the core honeybee dependencies
48
+ from honeybee.boundarycondition import Outdoors
49
+ from honeybee.facetype import Wall
50
+ from honeybee.model import Model
51
+ from honeybee.room import Room
52
+ from honeybee.face import Face
53
+ from honeybee.door import Door
54
+ from honeybee.orientation import angles_from_num_orient, face_orient_index
55
+ except ImportError as e:
56
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
57
+
58
+ try: # import the ladybug_rhino dependencies
59
+ from ladybug_rhino.grasshopper import all_required_inputs
60
+ except ImportError as e:
61
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
62
+
63
+
64
+ def is_exterior_wall(face):
65
+ """Check whether a given Face is an exterior Wall."""
66
+ return isinstance(face.boundary_condition, Outdoors) and \
67
+ isinstance(face.type, Wall)
68
+
69
+
70
+ if all_required_inputs(ghenv.Component):
71
+ # duplicate the initial objects
72
+ hb_objs = [obj.duplicate() for obj in _hb_objs]
73
+
74
+ # process the input modifiers
75
+ for i, constr in enumerate(_mod):
76
+ if isinstance(constr, str):
77
+ _mod[i] = modifier_by_identifier(constr)
78
+
79
+ # error message for unrecognized object
80
+ error_msg = 'Input _hb_objs must be a Room, Face, or Door. Not {}.'
81
+
82
+ # assign the modifiers
83
+ if len(_mod) == 1: # assign indiscriminately, even if it's horizontal
84
+ for obj in hb_objs:
85
+ if isinstance(obj, (Face, Door)):
86
+ obj.properties.radiance.modifier = _mod[0]
87
+ elif isinstance(obj, (Room, Model)):
88
+ for face in obj.faces:
89
+ if is_exterior_wall(face):
90
+ face.properties.radiance.modifier = _mod[0]
91
+ else:
92
+ raise TypeError(error_msg.format(type(obj)))
93
+ else: # assign modifiers based on cardinal direction
94
+ angles = angles_from_num_orient(len(_mod))
95
+ for obj in hb_objs:
96
+ if isinstance(obj, (Face, Door)):
97
+ orient_i = face_orient_index(obj, angles)
98
+ if orient_i is not None:
99
+ obj.properties.radiance.modifier = _mod[orient_i]
100
+ elif isinstance(obj, (Room, Model)):
101
+ for face in obj.faces:
102
+ if is_exterior_wall(face):
103
+ orient_i = face_orient_index(face, angles)
104
+ if orient_i is not None:
105
+ face.properties.radiance.modifier = _mod[orient_i]
106
+ else:
107
+ raise TypeError(error_msg.format(type(obj)))
@@ -0,0 +1,71 @@
1
+ # Honeybee: A Plugin for Environmental Analysis (GPL)
2
+ # This file is part of Honeybee.
3
+ #
4
+ # Copyright (c) 2025, Ladybug Tools.
5
+ # You should have received a copy of the GNU Affero General Public License
6
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
7
+ #
8
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
9
+
10
+ """
11
+ Apply ModifierSet to Honeybee Rooms.
12
+ -
13
+
14
+ Args:
15
+ _rooms: Honeybee Rooms to which the input _mod_set should be assigned.
16
+ This can also be a Honeybee Model for which all Rooms
17
+ will be assigned the ModifierSet.
18
+ _mod_set: A Honeybee ModifierSet to be applied to the input _room.
19
+ This can also be text for a modifier set to be looked up in the
20
+ modifier set library.
21
+
22
+ Returns:
23
+ rooms: The input Rooms with their modifier sets edited.
24
+ """
25
+
26
+ ghenv.Component.Name = 'HB Apply ModifierSet'
27
+ ghenv.Component.NickName = 'ApplyModSet'
28
+ ghenv.Component.Message = '1.9.0'
29
+ ghenv.Component.Category = 'HB-Radiance'
30
+ ghenv.Component.SubCategory = '1 :: Modifiers'
31
+ ghenv.Component.AdditionalHelpFromDocStrings = '6'
32
+
33
+ try: # import the honeybee extension
34
+ from honeybee.model import Model
35
+ from honeybee.room import Room
36
+ except ImportError as e:
37
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
38
+
39
+ try: # import the honeybee-radiance extension
40
+ from honeybee_radiance.lib.modifiersets import modifier_set_by_identifier
41
+ except ImportError as e:
42
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
43
+
44
+ try: # import the ladybug_rhino dependencies
45
+ from ladybug_rhino.grasshopper import all_required_inputs
46
+ except ImportError as e:
47
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
48
+
49
+
50
+ if all_required_inputs(ghenv.Component):
51
+ # duplicate the initial objects
52
+ rooms = [obj.duplicate() for obj in _rooms]
53
+
54
+ # extract any rooms from the input Models
55
+ hb_objs = []
56
+ for hb_obj in rooms:
57
+ if isinstance(hb_obj, Model):
58
+ hb_objs.extend(hb_obj.rooms)
59
+ elif isinstance(hb_obj, Room):
60
+ hb_objs.append(hb_obj)
61
+ else:
62
+ raise ValueError(
63
+ 'Expected Honeybee Room or Model. Got {}.'.format(type(hb_obj)))
64
+
65
+ # process the input modifier set if it's a string
66
+ if isinstance(_mod_set, str):
67
+ _mod_set = modifier_set_by_identifier(_mod_set)
68
+
69
+ # assign the modifier set
70
+ for rm in hb_objs:
71
+ rm.properties.radiance.modifier_set = _mod_set
@@ -0,0 +1,110 @@
1
+ # Honeybee: A Plugin for Environmental Analysis (GPL)
2
+ # This file is part of Honeybee.
3
+ #
4
+ # Copyright (c) 2025, Ladybug Tools.
5
+ # You should have received a copy of the GNU Affero General Public License
6
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
7
+ #
8
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
9
+
10
+ """
11
+ Apply a Modifier to Honeybee Shade objects. Alternatively, it can assign a Modifier
12
+ to all of the child shades of an Aperture, Door, Face, or a Room.
13
+ _
14
+ This component supports the assigning of different modifiers based on cardinal
15
+ orientation, provided that a list of Modifiers are input to the _mod.
16
+ -
17
+
18
+ Args:
19
+ _hb_objs: Honeybee Shades, Apertures, Doors, Faces, Rooms, or a Model to which the
20
+ input _mod should be assigned. For the case of a Honeybee Aperture,
21
+ Door, Face, Room or Model, the Modifier will be assigned to only the
22
+ child shades directly assigned to that object. So passing in a Room
23
+ will not change the modifier of shades assigned to Apertures
24
+ of the Room's Faces. If this is the desired outcome, then the Room
25
+ should be deconstructed into its child objects before using
26
+ this component.
27
+ _mod: A Honeybee Modifier to be applied to the input _hb_objs.
28
+ This can also be text for a modifier to be looked up in the shade
29
+ modifier library. If an array of text or modifier objects
30
+ are input here, different modifiers will be assigned based on
31
+ cardinal direction, starting with north and moving clockwise.
32
+
33
+ Returns:
34
+ hb_objs: The input honeybee objects with their modifiers edited.
35
+ """
36
+
37
+ ghenv.Component.Name = 'HB Apply Shade Modifier'
38
+ ghenv.Component.NickName = 'ApplyShadeMod'
39
+ ghenv.Component.Message = '1.9.0'
40
+ ghenv.Component.Category = 'HB-Radiance'
41
+ ghenv.Component.SubCategory = '1 :: Modifiers'
42
+ ghenv.Component.AdditionalHelpFromDocStrings = '6'
43
+
44
+
45
+ try: # import the honeybee-radiance extension
46
+ from honeybee_radiance.lib.modifiers import modifier_by_identifier
47
+ except ImportError as e:
48
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
49
+
50
+ try: # import the core honeybee dependencies
51
+ from honeybee.shade import Shade
52
+ from honeybee.model import Model
53
+ from honeybee.room import Room
54
+ from honeybee.face import Face
55
+ from honeybee.aperture import Aperture
56
+ from honeybee.door import Door
57
+ from honeybee.orientation import angles_from_num_orient, face_orient_index
58
+ except ImportError as e:
59
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
60
+
61
+ try: # import the ladybug_rhino dependencies
62
+ from ladybug_rhino.grasshopper import all_required_inputs
63
+ except ImportError as e:
64
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
65
+
66
+
67
+ if all_required_inputs(ghenv.Component):
68
+ # duplicate the initial objects
69
+ hb_objs = [obj.duplicate() for obj in _hb_objs]
70
+
71
+ # process the input modifiers
72
+ for i, mod in enumerate(_mod):
73
+ if isinstance(mod, str):
74
+ _mod[i] = modifier_by_identifier(mod)
75
+
76
+ # error message for unrecognized object
77
+ error_msg = 'Input _hb_objs must be a Room, Face, Aperture, Door, or Shade. Not {}.'
78
+
79
+ # assign the modifiers
80
+ if len(_mod) == 1:
81
+ for obj in hb_objs:
82
+ if isinstance(obj, Shade):
83
+ obj.properties.radiance.modifier = _mod[0]
84
+ elif isinstance(obj, (Aperture, Face, Room, Door)):
85
+ for shd in obj.shades:
86
+ shd.properties.radiance.modifier = _mod[0]
87
+ elif isinstance(obj, Model):
88
+ for shd in obj.orphaned_shades:
89
+ shd.properties.radiance.modifier = _mod[0]
90
+ else:
91
+ raise TypeError(error_msg.format(type(obj)))
92
+ else: # assign modifiers based on cardinal direction
93
+ angles = angles_from_num_orient(len(_mod))
94
+ for obj in hb_objs:
95
+ if isinstance(obj, (Aperture, Face, Door)):
96
+ orient_i = face_orient_index(obj, angles)
97
+ if orient_i is not None:
98
+ for shd in obj.shades:
99
+ shd.properties.radiance.modifier = _mod[orient_i]
100
+ elif isinstance(obj, Shade):
101
+ obj.properties.radiance.modifier = _mod[0]
102
+ elif isinstance(obj, Room):
103
+ for shd in obj.shades:
104
+ shd.properties.radiance.modifier = _mod[0]
105
+ elif isinstance(obj, Model):
106
+ for shd in obj.orphaned_shades:
107
+ shd.properties.radiance.modifier = _mod[0]
108
+ else:
109
+ raise TypeError(error_msg.format(type(obj)))
110
+
@@ -0,0 +1,120 @@
1
+ # Honeybee: A Plugin for Environmental Analysis (GPL)
2
+ # This file is part of Honeybee.
3
+ #
4
+ # Copyright (c) 2025, Ladybug Tools.
5
+ # You should have received a copy of the GNU Affero General Public License
6
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
7
+ #
8
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
9
+
10
+ """
11
+ Apply Modifier to Honeybee Apertures or glass Doors. Alternatively, it can assign
12
+ Modifiers to the child apertures of input Faces or the apertures within Room walls.
13
+ _
14
+ This component supports the assigning of different modifiers based on cardinal
15
+ orientation, provided that a list of Modifiers are input to the _mod.
16
+ -
17
+
18
+ Args:
19
+ _hb_objs: Honeybee Apertures, Faces, Doors, Rooms or a Model to which the input
20
+ _mod should be assigned. For the case of Rooms or a Model, the
21
+ modifier will only be applied to the apertures in the the
22
+ Room's outdoor walls. Note that, if you need to assign a modifier
23
+ to all the skylights, glass doors, etc. of a Room, the best practice
24
+ is to create a ModifierSet and assing that to the Room.
25
+ _mod: A Honeybee Modifier to be applied to the input _hb_objs.
26
+ This can also be text for a modifier to be looked up in the window
27
+ modifier library. If an array of text or modifier objects
28
+ are input here, different modifiers will be assigned based on
29
+ cardinal direction, starting with north and moving clockwise.
30
+
31
+ Returns:
32
+ hb_objs: The input honeybee objects with their modifiers edited.
33
+ """
34
+
35
+ ghenv.Component.Name = 'HB Apply Window Modifier'
36
+ ghenv.Component.NickName = 'ApplyWindowMod'
37
+ ghenv.Component.Message = '1.9.0'
38
+ ghenv.Component.Category = 'HB-Radiance'
39
+ ghenv.Component.SubCategory = '1 :: Modifiers'
40
+ ghenv.Component.AdditionalHelpFromDocStrings = '6'
41
+
42
+
43
+ try: # import the honeybee-radiance extension
44
+ from honeybee_radiance.lib.modifiers import modifier_by_identifier
45
+ except ImportError as e:
46
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
47
+
48
+ try: # import the core honeybee dependencies
49
+ from honeybee.boundarycondition import Outdoors
50
+ from honeybee.facetype import Wall
51
+ from honeybee.model import Model
52
+ from honeybee.room import Room
53
+ from honeybee.face import Face
54
+ from honeybee.aperture import Aperture
55
+ from honeybee.door import Door
56
+ from honeybee.orientation import angles_from_num_orient, face_orient_index
57
+ except ImportError as e:
58
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
59
+
60
+ try: # import the ladybug_rhino dependencies
61
+ from ladybug_rhino.grasshopper import all_required_inputs
62
+ except ImportError as e:
63
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
64
+
65
+
66
+ def is_exterior_wall(face):
67
+ """Check whether a given Face is an exterior Wall."""
68
+ return isinstance(face.boundary_condition, Outdoors) and \
69
+ isinstance(face.type, Wall)
70
+
71
+
72
+ if all_required_inputs(ghenv.Component):
73
+ # duplicate the initial objects
74
+ hb_objs = [obj.duplicate() for obj in _hb_objs]
75
+
76
+ # process the input modifiers
77
+ for i, constr in enumerate(_mod):
78
+ if isinstance(constr, str):
79
+ _mod[i] = modifier_by_identifier(constr)
80
+
81
+ # error message for unrecognized object
82
+ error_msg = 'Input _hb_objs must be a Room, Face, Aperture, or Door. Not {}.'
83
+
84
+ # assign the modifiers
85
+ if len(_mod) == 1: # assign indiscriminately, even if it's a horizontal object
86
+ for obj in hb_objs:
87
+ if isinstance(obj, (Aperture, Door)):
88
+ obj.properties.radiance.modifier = _mod[0]
89
+ elif isinstance(obj, Face):
90
+ for ap in obj.apertures:
91
+ ap.properties.radiance.modifier = _mod[0]
92
+ elif isinstance(obj, (Room, Model)):
93
+ for face in obj.faces:
94
+ if is_exterior_wall(face):
95
+ for ap in face.apertures:
96
+ ap.properties.radiance.modifier = _mod[0]
97
+ else:
98
+ raise TypeError(error_msg.format(type(obj)))
99
+ else: # assign modifiers only to non-horizontal objects based on cardinal direction
100
+ angles = angles_from_num_orient(len(_mod))
101
+ for obj in hb_objs:
102
+ if isinstance(obj, (Aperture, Door)):
103
+ orient_i = face_orient_index(obj, angles)
104
+ if orient_i is not None:
105
+ obj.properties.radiance.modifier = _mod[orient_i]
106
+ elif isinstance(obj, Face):
107
+ orient_i = face_orient_index(obj, angles)
108
+ if orient_i is not None:
109
+ for ap in obj.apertures:
110
+ ap.properties.radiance.modifier = _mod[orient_i]
111
+ elif isinstance(obj, (Room, Model)):
112
+ for face in obj.faces:
113
+ if is_exterior_wall(face):
114
+ orient_i = face_orient_index(face, angles)
115
+ if orient_i is not None:
116
+ for ap in face.apertures:
117
+ ap.properties.radiance.modifier = _mod[orient_i]
118
+ else:
119
+ raise TypeError(error_msg.format(type(obj)))
120
+
@@ -0,0 +1,58 @@
1
+ # Honeybee: A Plugin for Environmental Analysis (GPL)
2
+ # This file is part of Honeybee.
3
+ #
4
+ # Copyright (c) 2025, Ladybug Tools.
5
+ # You should have received a copy of the GNU Affero General Public License
6
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
7
+ #
8
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
9
+
10
+ """
11
+ Add radiance Sensor Grids and/or Views to a Honeybee Model.
12
+ _
13
+ This assignment is necessary for any Radiance study, though whether a grid or a
14
+ view is required for a particular type of study is depenednet upon the recipe
15
+ used.
16
+ _
17
+ Multiple copies of this component can be used in series and each will add the
18
+ grids or views to any that already exist.
19
+
20
+ -
21
+
22
+ Args:
23
+ _model: A Honeybee Model to which the input grids_ and views_ will be assigned.
24
+ grids_: A list of Honeybee-Radiance SensorGrids, which will be assigned to
25
+ the input _model.
26
+ views_: A list of Honeybee-Radiance Views, which will be assigned to the
27
+ input _model.
28
+
29
+ Returns:
30
+ model: The input Honeybee Model with the grids_ and views_ assigned to it.
31
+ """
32
+
33
+ ghenv.Component.Name = 'HB Assign Grids and Views'
34
+ ghenv.Component.NickName = 'AssignGridsViews'
35
+ ghenv.Component.Message = '1.9.0'
36
+ ghenv.Component.Category = 'HB-Radiance'
37
+ ghenv.Component.SubCategory = '0 :: Basic Properties'
38
+ ghenv.Component.AdditionalHelpFromDocStrings = '5'
39
+
40
+ try: # import core honeybee dependencies
41
+ from honeybee.model import Model
42
+ except ImportError as e:
43
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
44
+
45
+ try: # import ladybug_rhino dependencies
46
+ from ladybug_rhino.grasshopper import all_required_inputs
47
+ except ImportError as e:
48
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
49
+
50
+
51
+ if all_required_inputs(ghenv.Component):
52
+ assert isinstance(_model, Model), \
53
+ 'Expected Honeybee Model. Got {}.'.format(type(_model))
54
+ model = _model.duplicate() # duplicate to avoid editing the input
55
+ if len(grids_) != 0:
56
+ model.properties.radiance.add_sensor_grids(grids_)
57
+ if len(views_) != 0:
58
+ model.properties.radiance.add_views(views_)
@@ -0,0 +1,100 @@
1
+ # Honeybee: A Plugin for Environmental Analysis (GPL)
2
+ # This file is part of Honeybee.
3
+ #
4
+ # Copyright (c) 2025, Ladybug Tools.
5
+ # You should have received a copy of the GNU Affero General Public License
6
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
7
+ #
8
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
9
+
10
+ """
11
+ Calculate Aperture groups for exterior Apertures.
12
+ _
13
+ The Apertures are grouped by orientation unless _view_factor_ is set to True.
14
+ _
15
+ If grouping based on view factor the component calculates view factor from
16
+ Apertures to sky patches (rfluxmtx). Each Aperture is represented by a sensor
17
+ grid, and the view factor for the whole Aperture is the average of the grid. The
18
+ RMSE of the view factor to each sky patch is calculated between all Apertures.
19
+ Agglomerative hierarchical clustering (with complete-linkage method) is used to
20
+ group the Apertures by using a distance matrix of the RMSE values.
21
+
22
+ The view factor approach is Radiance-based (and slower) and will likely group
23
+ Apertures more accurately considering the context geometry of the Honeybee
24
+ Model.
25
+ -
26
+
27
+ Args:
28
+ _model: A Honeybee Model for which Apertures will be grouped automatically.
29
+ Note that this model must have Apertures with Outdoors boundary
30
+ condition assigned to it.
31
+ _room_based_: A boolean to note whether the Apertures should be grouped on a
32
+ room basis. If grouped on a room basis Apertures from different
33
+ room cannot be in the same group. (Default: True).
34
+ _view_factor_: A boolean to note whether the Apertures should be grouped by
35
+ calculating view factors for the Apertures to a discretized sky or
36
+ simply by the normal orientation of the Apertures. (Default: False).
37
+ _size_: Aperture grid size for view factor calculation. A lower number
38
+ will give a finer grid and more accurate results but the calculation
39
+ time will increase. This option is only used if _view_factor_ is set
40
+ to True. (Default: 0.2).
41
+ vert_tolerance_: A float value for vertical tolerance between two Apertures.
42
+ If the vertical distance between two Apertures is larger than this
43
+ tolerance the Apertures cannot be grouped. If no value is given the
44
+ vertical grouping will be skipped. (Default: None).
45
+ states_: An optional list of Honeybee State objects to be applied to all the generated groups.
46
+ These states should be ordered based on how they will be switched on.
47
+ The first state is the default state and, typically, higher states
48
+ are more shaded. If the objects in the group have no states, the
49
+ modifiers already assigned the apertures will be used for all states.
50
+ _run: Set to True to run the automatic Aperture grouping.
51
+
52
+ Returns:
53
+ model: The input Honeybee Model object where all Apertures with Outdoors
54
+ boundary condition have been assigned a dynamic group identifier.
55
+ """
56
+
57
+ ghenv.Component.Name = 'HB Automatic Aperture Group'
58
+ ghenv.Component.NickName = 'AutoGroup'
59
+ ghenv.Component.Message = '1.9.0'
60
+ ghenv.Component.Category = 'HB-Radiance'
61
+ ghenv.Component.SubCategory = '0 :: Basic Properties'
62
+ ghenv.Component.AdditionalHelpFromDocStrings = '2'
63
+
64
+ try:
65
+ from honeybee.model import Model
66
+ except ImportError as e:
67
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
68
+
69
+ try: # import honeybee_radiance_command dependencies
70
+ from honeybee_radiance_command.oconv import Oconv
71
+ except ImportError as e:
72
+ raise ImportError('\nFailed to import honeybee_radiance_command:\n\t{}'.format(e))
73
+
74
+ try:
75
+ from honeybee_radiance.dynamic.multiphase import automatic_aperture_grouping
76
+ except ImportError as e:
77
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
78
+
79
+ try:
80
+ from ladybug_rhino.grasshopper import all_required_inputs
81
+ except ImportError as e:
82
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
83
+
84
+
85
+ if all_required_inputs(ghenv.Component) and _run:
86
+ assert isinstance(_model, Model), \
87
+ 'Input _model must be a Model. Got {}'.format(type(_model))
88
+ # duplicate model
89
+ model = _model.duplicate()
90
+
91
+ # set defaults
92
+ room_based = True if _room_based_ is None else _room_based_
93
+ view_factor = False if _view_factor_ is None else _view_factor_
94
+ size = 0.2 if _size_ is None else _size_
95
+ vertical_tolerance = None if vert_tolerance_ is None else vert_tolerance_
96
+
97
+ # automatically assign groups
98
+ automatic_aperture_grouping(
99
+ model, size=size, room_based=room_based, view_factor_or_orientation=view_factor,
100
+ vertical_tolerance=vertical_tolerance, states=states_)
@@ -0,0 +1,78 @@
1
+ # Honeybee: A Plugin for Environmental Analysis (GPL)
2
+ # This file is part of Honeybee.
3
+ #
4
+ # Copyright (c) 2025, Ladybug Tools.
5
+ # You should have received a copy of the GNU Affero General Public License
6
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
7
+ #
8
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
9
+
10
+ """
11
+ Create a Bidirectional Scattering Distribution Function (BSDF) radiance modifier
12
+ from an XML file.
13
+ -
14
+
15
+ Args:
16
+ _xml_file: Path to an XML file contining BSDF data. These files can
17
+ be produced using the LBNL WINDOW software among other sources.
18
+ _up_vec_: A vector that sets the hemisphere that the BSDF modifier faces.
19
+ For materials that are symmetrical about the face plane (like
20
+ non-angled venetian blinds), this can be any vector that is not
21
+ perfectly normal/perpendicular to the face. For asymmetrica
22
+ materials like angled venetian blinds, this variable should be
23
+ coordinated with the direction that the geometry is facing.
24
+ The default is set to (0.01, 0.01, 1.00), which should hopefully
25
+ not be normal to any typical face.
26
+ thickness_: Optional number to set the thickness of the BSDF. Thickness
27
+ is not supported for aBSDF type. (Default: 0).
28
+ _bsdf_type_: An integer to set the bsdf type. Choose from the choices
29
+ below. (Default: 0).
30
+ * 0 BSDF
31
+ * 1 aBSDF
32
+ Choose aBSDF (peak extraction) for systems with a strong specular
33
+ transmission component. A proposed guideline for when to use aBSDF
34
+ can be found in chapter 6 in "BSDF generation procedures for
35
+ daylighting systems". Find the white paper at:
36
+ * https://task61.iea-shc.org/publications
37
+
38
+ Returns:
39
+ modifier: A BSDF modifier that can be assigned to a Honeybee geometry
40
+ or Modifier Sets.
41
+ """
42
+
43
+ ghenv.Component.Name = 'HB BSDF Modifier'
44
+ ghenv.Component.NickName = 'BSDFMod'
45
+ ghenv.Component.Message = '1.9.0'
46
+ ghenv.Component.Category = 'HB-Radiance'
47
+ ghenv.Component.SubCategory = '1 :: Modifiers'
48
+ ghenv.Component.AdditionalHelpFromDocStrings = '2'
49
+
50
+ try: # import the honeybee-radiance dependencies
51
+ from honeybee_radiance.modifier.material import BSDF, aBSDF
52
+ except ImportError as e:
53
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
54
+
55
+ try: # import ladybug_rhino dependencies
56
+ from ladybug_rhino.grasshopper import all_required_inputs
57
+ except ImportError as e:
58
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
59
+
60
+ BSDF_TYPES = ('bsdf', 'absdf')
61
+
62
+ if all_required_inputs(ghenv.Component):
63
+ # process the vector input
64
+ if _up_vec_ is not None:
65
+ _up_vec_ = (_up_vec_.X, _up_vec_.Y, _up_vec_.Z)
66
+
67
+ if _bsdf_type_ is None:
68
+ _type_= 'bsdf'
69
+ else:
70
+ _type_= _bsdf_type_ if _bsdf_type_ in BSDF_TYPES else BSDF_TYPES[int(_bsdf_type_)]
71
+
72
+ # create the modifier
73
+ if _type_ == 'bsdf':
74
+ modifier = BSDF(
75
+ _xml_file, up_orientation=_up_vec_, thickness=thickness_)
76
+ else:
77
+ modifier = aBSDF(
78
+ _xml_file, up_orientation=_up_vec_)