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,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
+ Create an glass radiance modifier from a single transmittance.
12
+ -
13
+
14
+ Args:
15
+ _name_: Text to set the name for the modifier and to be incorporated into
16
+ a unique modifier identifier.
17
+ _trans: A number between 0 and 1 for the glass modifier transmittance.
18
+ This transmittance will be the same for the red, green and blue channels.
19
+ _refract_: Index of refraction. Typical values are 1.52 for float
20
+ glass and 1.4 for ETFE. If None, Radiance will default to using 1.52
21
+ for glass (Default: None).
22
+
23
+ Returns:
24
+ modifier: A glass modifier that can be assigned to a Honeybee geometry or
25
+ Modifier Sets.
26
+ """
27
+
28
+ ghenv.Component.Name = 'HB Glass Modifier'
29
+ ghenv.Component.NickName = 'GlassMod'
30
+ ghenv.Component.Message = '1.9.0'
31
+ ghenv.Component.Category = 'HB-Radiance'
32
+ ghenv.Component.SubCategory = '1 :: Modifiers'
33
+ ghenv.Component.AdditionalHelpFromDocStrings = '2'
34
+
35
+ try: # import the core honeybee dependencies
36
+ from honeybee.typing import clean_and_id_rad_string, clean_rad_string
37
+ except ImportError as e:
38
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
39
+
40
+ try: # import the honeybee-radiance dependencies
41
+ from honeybee_radiance.modifier.material import Glass
42
+ except ImportError as e:
43
+ raise ImportError('\nFailed to import honeybee_radiance:\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
+ name = clean_and_id_rad_string('GlassMaterial') if _name_ is None else \
53
+ clean_rad_string(_name_)
54
+
55
+ # create the modifier
56
+ modifier = Glass.from_single_transmittance(name, _trans, _refract_)
57
+ if _name_ is not None:
58
+ modifier.display_name = _name_
@@ -0,0 +1,72 @@
1
+ # This file is part of Honeybee.
2
+ #
3
+ # Copyright (c) 2025, Ladybug Tools.
4
+ # You should have received a copy of the GNU Affero General Public License
5
+ # along with Honeybee; If not, see <http://www.gnu.org/licenses/>.
6
+ #
7
+ # @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
8
+
9
+ """
10
+ Convert a High Dynamic Range (HDR) image file into a Graphics Interchange Format
11
+ (GIF) image file.
12
+ _
13
+ GIF files are much smaller than HDRs, they are more portable, and they can be
14
+ previewed with many different types of software. However, they do not contain
15
+ all of the information that an HDR image has.
16
+ -
17
+
18
+ Args:
19
+ _hdr: Path to a High Dynamic Range (HDR) image file.
20
+
21
+ Returns:
22
+ gif: Path to the resulting GIF file,
23
+ """
24
+
25
+ ghenv.Component.Name = 'HB HDR to GIF'
26
+ ghenv.Component.NickName = 'HDR-GIF'
27
+ ghenv.Component.Message = '1.9.0'
28
+ ghenv.Component.Category = 'HB-Radiance'
29
+ ghenv.Component.SubCategory = '4 :: Results'
30
+ ghenv.Component.AdditionalHelpFromDocStrings = '3'
31
+
32
+ import os
33
+
34
+ try: # import honeybee_radiance_command dependencies
35
+ from honeybee_radiance_command.ra_gif import Ra_GIF
36
+ except ImportError as e:
37
+ raise ImportError('\nFailed to import honeybee_radiance_command:\n\t{}'.format(e))
38
+
39
+ try: # import honeybee_radiance dependencies
40
+ from honeybee_radiance.config import folders as rad_folders
41
+ except ImportError as e:
42
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
43
+
44
+ try: # import 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
+ # check the Radiance date of the installed radiance
50
+ try: # import lbt_recipes dependencies
51
+ from lbt_recipes.version import check_radiance_date
52
+ except ImportError as e:
53
+ raise ImportError('\nFailed to import lbt_recipes:\n\t{}'.format(e))
54
+ check_radiance_date()
55
+
56
+
57
+ if all_required_inputs(ghenv.Component):
58
+ # set up the paths for the various files used in translation
59
+ img_dir = os.path.dirname(_hdr)
60
+ input_image = os.path.basename(_hdr)
61
+ new_image = input_image.lower().replace('.hdr', '.gif')
62
+ gif = os.path.join(img_dir, new_image)
63
+
64
+ # create the command to run the conversion to GIF
65
+ ra_gif = Ra_GIF(input=input_image, output=new_image)
66
+
67
+ # run the command
68
+ env = None
69
+ if rad_folders.env != {}:
70
+ env = rad_folders.env
71
+ env = dict(os.environ, **env) if env else None
72
+ ra_gif.run(env, cwd=img_dir)
@@ -0,0 +1,108 @@
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
+ Run an annual glare study for a Honeybee model to compute hourly Daylight Glare
12
+ Probability (DGP) for each sensor in a model's sensor grids.
13
+ _
14
+ This recipe uses the image-less glare method developed by Nathaniel Jones to
15
+ estimate glare at each sensor. More information on this method can be found here:
16
+ https://github.com/nljones/Accelerad/wiki/The-Imageless-Method-for-Spatial-and-Annual-Glare-Analysis
17
+ _
18
+ The resulting DGP is used to compute Glare Autonomy (GA), which is the percentage
19
+ of occupied time that a view is free of glare.
20
+
21
+ -
22
+ Args:
23
+ _model: A Honeybee Model for which Annual Daylight Glare Probability (DGP) will
24
+ be simulated. Note that this model must have grids assigned to
25
+ it and, typically, these are radial grids created using the
26
+ "radial grid" components.
27
+ _wea: A Wea object produced from the Wea components that are under the Light
28
+ Sources tab. This can also be the path to a .wea or a .epw file.
29
+ Note that the Wea must have a timestep of 1 to be used with this
30
+ recipe.
31
+ north_: A number between -360 and 360 for the counterclockwise difference
32
+ between the North and the positive Y-axis in degrees. This can
33
+ also be Vector for the direction to North. (Default: 0).
34
+ _glare_thresh_: A fractional number for the threshold of DGP above which conditions
35
+ are considered to induce glare. This value is used when calculating
36
+ glare autonomy, which is the percent of hours in which the view is
37
+ free of glare. (Default: 0.4 for disturbing or intolerable glare).
38
+ _luminance_fac_: Luminance factor in cd/m2. If the sky patch brightness
39
+ is above this factor it will act as a glare source. (Default: 2000).
40
+ _schedule_: An annual occupancy schedule, either as a Ladybug Hourly Continuous
41
+ Data Collection or a HB-Energy schedule object. This can also be the
42
+ path to a CSV file with 8760 rows or the identifier of a schedule in
43
+ the honeybee-energy schedule library. Any value in this schedule
44
+ that is 0.1 or above will be considered occupied. If not provided,
45
+ a default schedule that runs from 8 AM to 6 PM on all days will be used.
46
+ grid_filter_: Text for a grid identifer or a pattern to filter the sensor grids of
47
+ the model that are simulated. For instance, first_floor_* will simulate
48
+ only the sensor grids that have an identifier that starts with
49
+ first_floor_. By default, all grids in the model will be simulated.
50
+ radiance_par_: Text for the radiance parameters to be used for ray
51
+ tracing. (Default: -ab 2 -ad 5000 -lw 2e-05).
52
+ run_settings_: Settings from the "HB Recipe Settings" component that specify
53
+ how the recipe should be run. This can also be a text string of
54
+ recipe settings.
55
+ _run: Set to True to run the recipe and get results. This input can also be
56
+ the integer "2" to run the recipe silently.
57
+
58
+ Returns:
59
+ report: Reports, errors, warnings, etc.
60
+ results: Raw result files (.dgp) that contain Daylight Glare Probability (DGP)
61
+ matrices for each sensor at each hour of the simulation. These can
62
+ be postprocessed using various components under the 4::Results sub-tab.
63
+ GA: Glare Autonomy (GA) results in percent. GA is the percentage of occupied hours
64
+ that each view is free of glare (with a DGP below the glare threshold).
65
+ These can be plugged into the "LB Spatial Heatmap" component along
66
+ with meshes of the sensor grids to visualize results.
67
+ """
68
+
69
+ ghenv.Component.Name = 'HB Imageless Annual Glare'
70
+ ghenv.Component.NickName = 'AnnualGlare'
71
+ ghenv.Component.Message = '1.9.0'
72
+ ghenv.Component.Category = 'HB-Radiance'
73
+ ghenv.Component.SubCategory = '3 :: Recipes'
74
+ ghenv.Component.AdditionalHelpFromDocStrings = '1'
75
+
76
+ try:
77
+ from lbt_recipes.recipe import Recipe
78
+ except ImportError as e:
79
+ raise ImportError('\nFailed to import lbt_recipes:\n\t{}'.format(e))
80
+
81
+ try:
82
+ from ladybug_rhino.grasshopper import all_required_inputs, recipe_result
83
+ except ImportError as e:
84
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
85
+
86
+
87
+ if all_required_inputs(ghenv.Component) and _run:
88
+ # create the recipe and set the input arguments
89
+ recipe = Recipe('imageless-annual-glare')
90
+ recipe.input_value_by_name('model', _model)
91
+ recipe.input_value_by_name('wea', _wea)
92
+ recipe.input_value_by_name('north', north_)
93
+ recipe.input_value_by_name('glare-threshold', _glare_thresh_)
94
+ recipe.input_value_by_name('luminance-factor', _luminance_fac_)
95
+ recipe.input_value_by_name('schedule', _schedule_)
96
+ recipe.input_value_by_name('grid-filter', grid_filter_)
97
+ recipe.input_value_by_name('radiance-parameters', radiance_par_)
98
+
99
+ # run the recipe
100
+ silent = True if _run > 1 else False
101
+ project_folder = recipe.run(run_settings_, radiance_check=True, silent=silent)
102
+
103
+ # load the results
104
+ try:
105
+ results = recipe_result(recipe.output_value_by_name('results', project_folder))
106
+ GA = recipe_result(recipe.output_value_by_name('ga', project_folder))
107
+ except Exception:
108
+ raise Exception(recipe.failure_message(project_folder))
@@ -0,0 +1,83 @@
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 list of interior modifiers that can be used to edit or create a
12
+ ModifierSet object.
13
+ -
14
+
15
+ Args:
16
+ _interior_wall_: A modifier object for interior walls (or text for
17
+ the identifier of the modifier within the library).
18
+ _ceiling_: A modifier object for ceilings (or text for the identifier of
19
+ the modifier within the library).
20
+ _interior_floor_: A modifier object for interior floors (or text for
21
+ the identifier of the modifier within the library).
22
+ _interior_window_: A modifier object for all apertures with a Surface
23
+ boundary condition. This can also be text for the identifier of the
24
+ modifier within the library.
25
+ _interior_door_: A modifier object for all opaque doors with a Surface
26
+ boundary condition. This can also be text for the identifier of the
27
+ modifier within the library.
28
+ _int_glass_door_: A modifier object for all glass doors with a Surface
29
+ boundary condition. This can also be text for the identifier of the
30
+ modifier within the library.
31
+
32
+ Returns:
33
+ interior_set: A list of interior modifiers that can be used to edit
34
+ or create a ModifierSet object.
35
+ """
36
+
37
+ ghenv.Component.Name = 'HB Interior Modifier Subset'
38
+ ghenv.Component.NickName = 'InteriorSubset'
39
+ ghenv.Component.Message = '1.9.0'
40
+ ghenv.Component.Category = 'HB-Radiance'
41
+ ghenv.Component.SubCategory = '1 :: Modifiers'
42
+ ghenv.Component.AdditionalHelpFromDocStrings = '4'
43
+
44
+ try: # import honeybee_radiance dependencies
45
+ from honeybee_radiance.modifier import Modifier
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:
51
+ from ladybug_rhino.grasshopper import turn_off_old_tag
52
+ except ImportError as e:
53
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
54
+ turn_off_old_tag(ghenv.Component)
55
+
56
+
57
+ def check_mod(mod, input_name):
58
+ """Get an Modifier from the library if it's a string."""
59
+ if isinstance(mod, str):
60
+ return modifier_by_identifier(mod)
61
+ else:
62
+ assert isinstance(mod, Modifier), \
63
+ 'Expected Modifier for {}. Got {}'.format(input_name, type(mod))
64
+ return mod
65
+
66
+
67
+ # go through each input modifier
68
+ if _interior_wall_ is not None:
69
+ _interior_wall_ = check_mod(_interior_wall_, '_interior_wall_')
70
+ if _ceiling_ is not None:
71
+ _ceiling_ = check_mod(_ceiling_, '_ceiling_')
72
+ if _interior_floor_ is not None:
73
+ _interior_floor_ = check_mod(_interior_floor_, '_interior_floor_')
74
+ if _interior_window_ is not None:
75
+ _interior_window_ = check_mod(_interior_window_, '_interior_window_')
76
+ if _interior_door_ is not None:
77
+ _interior_door_ = check_mod(_interior_door_, '_interior_door_')
78
+ if _int_glass_door_ is not None:
79
+ _int_glass_door_ = check_mod(_int_glass_door_, '_int_glass_door_')
80
+
81
+ # return the final list from the component
82
+ interior_set = [_interior_wall_, _ceiling_, _interior_floor_, _interior_window_,
83
+ _interior_door_, _int_glass_door_]
@@ -0,0 +1,70 @@
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 metal radiance modifier from red, green, and blue reflectances.
12
+ -
13
+
14
+ Args:
15
+ _name_: Text to set the name for the modifier and to be incorporated into
16
+ a unique modifier identifier.
17
+ _r_diff_: A number between 0 and 1 for the absolute diffuse red reflectance. (Default: 0).
18
+ _g_diff_: A number between 0 and 1 for the absolute diffuse green reflectance. (Default: 0).
19
+ _b_diff_: A number between 0 and 1 for the absolute diffuse blue reflectance. (Default: 0).
20
+ _spec_: A number between 0 and 1 for the absolute specular reflectance of the modifier.
21
+ Note that the sum of this value and the diffuse should be less
22
+ than one. Specularity of metals is usually 0.9 or greater. (Default: 0.9)
23
+ _rough_: Roughness is specified as the rms slope of surface facets. A value
24
+ of 0 corresponds to a perfectly smooth surface, and a value of 1 would be
25
+ a very rough surface. Roughness values greater than 0.2 are not very
26
+ realistic. (Default: 0).
27
+
28
+ Returns:
29
+ modifier: A metal modifier that can be assigned to a Honeybee geometry
30
+ or Modifier Sets.
31
+ """
32
+
33
+ ghenv.Component.Name = 'HB Metal Modifier 3'
34
+ ghenv.Component.NickName = 'MetalMod3'
35
+ ghenv.Component.Message = '1.9.0'
36
+ ghenv.Component.Category = 'HB-Radiance'
37
+ ghenv.Component.SubCategory = '1 :: Modifiers'
38
+ ghenv.Component.AdditionalHelpFromDocStrings = '0'
39
+
40
+ try: # import the core honeybee dependencies
41
+ from honeybee.typing import clean_and_id_rad_string, clean_rad_string
42
+ except ImportError as e:
43
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
44
+
45
+ try: # import the honeybee-radiance dependencies
46
+ from honeybee_radiance.modifier.material import Metal
47
+ except ImportError as e:
48
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
49
+
50
+ try: # import ladybug_rhino dependencies
51
+ from ladybug_rhino.grasshopper import all_required_inputs
52
+ except ImportError as e:
53
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
54
+
55
+
56
+ if all_required_inputs(ghenv.Component):
57
+ # set the default modifier properties
58
+ _r_diff_ = 0 if _r_diff_ is None else _r_diff_
59
+ _g_diff_ = 0 if _g_diff_ is None else _g_diff_
60
+ _b_diff_ = 0 if _b_diff_ is None else _b_diff_
61
+ _spec_ = 0.9 if _spec_ is None else _spec_
62
+ _rough_ = 0.0 if _rough_ is None else _rough_
63
+ name = clean_and_id_rad_string('MetalMaterial') if _name_ is None else \
64
+ clean_rad_string(_name_)
65
+
66
+ # create the modifier
67
+ modifier = Metal.from_reflected_specularity(
68
+ name, _r_diff_, _g_diff_, _b_diff_, _spec_, _rough_)
69
+ if _name_ is not None:
70
+ modifier.display_name = _name_
@@ -0,0 +1,68 @@
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 metal radiance modifier from a single reflectance.
12
+ -
13
+
14
+ Args:
15
+ _name_: Text to set the name for the modifier and to be incorporated into
16
+ a unique modifier identifier.
17
+ _diff: A number between 0 and 1 for the absolute diffuse metal reflectance.
18
+ This reflectance will be the same for the red, green and blue
19
+ channels. (Default: 0)
20
+ _spec_: A number between 0 and 1 for the absolute specular reflectance of the modifier.
21
+ Note that the sum of this value and the diffuse _reflect should be less
22
+ than one. Specularity of metals is usually 0.9 or greater. (Default: 0.9)
23
+ _rough_: Roughness is specified as the rms slope of surface facets. A value
24
+ of 0 corresponds to a perfectly smooth surface, and a value of 1 would be
25
+ a very rough surface. Roughness values greater than 0.2 are not very
26
+ realistic. (Default: 0).
27
+
28
+ Returns:
29
+ modifier: A metal modifier that can be assigned to a Honeybee geometry
30
+ or Modifier Sets.
31
+ """
32
+
33
+ ghenv.Component.Name = 'HB Metal Modifier'
34
+ ghenv.Component.NickName = 'MetalMod'
35
+ ghenv.Component.Message = '1.9.0'
36
+ ghenv.Component.Category = 'HB-Radiance'
37
+ ghenv.Component.SubCategory = '1 :: Modifiers'
38
+ ghenv.Component.AdditionalHelpFromDocStrings = '2'
39
+
40
+ try: # import the core honeybee dependencies
41
+ from honeybee.typing import clean_and_id_rad_string, clean_rad_string
42
+ except ImportError as e:
43
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
44
+
45
+ try: # import the honeybee-radiance dependencies
46
+ from honeybee_radiance.modifier.material import Metal
47
+ except ImportError as e:
48
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
49
+
50
+ try: # import ladybug_rhino dependencies
51
+ from ladybug_rhino.grasshopper import all_required_inputs
52
+ except ImportError as e:
53
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
54
+
55
+
56
+ if all_required_inputs(ghenv.Component):
57
+ # set the default modifier properties
58
+ _diff_ = 0 if _diff_ is None else _diff_
59
+ _spec_ = 0.9 if _spec_ is None else _spec_
60
+ _rough_ = 0.0 if _rough_ is None else _rough_
61
+ name = clean_and_id_rad_string('MetalMaterial') if _name_ is None else \
62
+ clean_rad_string(_name_)
63
+
64
+ # create the modifier
65
+ modifier = Metal.from_reflected_specularity(
66
+ name, _diff_, _diff_, _diff_, _spec_, _rough_)
67
+ if _name_ is not None:
68
+ modifier.display_name = _name_
@@ -0,0 +1,56 @@
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 an mirror radiance modifier from a single reflectance.
12
+ -
13
+
14
+ Args:
15
+ _name: Text to set the name for the modifier and to be incorporated into
16
+ a unique modifier identifier.
17
+ _r_ref: A number between 0 and 1 for the red reflectance.
18
+ _g_ref: A number between 0 and 1 for the green reflectance.
19
+ _b_ref: A number between 0 and 1 for the blue reflectance.
20
+
21
+ Returns:
22
+ modifier: An mirror modifier that can be assigned to a Honeybee geometry
23
+ or Modifier Sets.
24
+ """
25
+
26
+ ghenv.Component.Name = 'HB Mirror Modifier 3'
27
+ ghenv.Component.NickName = 'MirrorMod3'
28
+ ghenv.Component.Message = '1.9.0'
29
+ ghenv.Component.Category = 'HB-Radiance'
30
+ ghenv.Component.SubCategory = "1 :: Modifiers"
31
+ ghenv.Component.AdditionalHelpFromDocStrings = '0'
32
+
33
+ try: # import the core honeybee dependencies
34
+ from honeybee.typing import clean_rad_string, clean_and_id_rad_string
35
+ except ImportError as e:
36
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
37
+
38
+ try: # import the honeybee-radiance dependencies
39
+ from honeybee_radiance.modifier.material import Mirror
40
+ except ImportError as e:
41
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
42
+
43
+ try: # import ladybug_rhino dependencies
44
+ from ladybug_rhino.grasshopper import all_required_inputs
45
+ except ImportError as e:
46
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
47
+
48
+
49
+ if all_required_inputs(ghenv.Component):
50
+ name = clean_and_id_rad_string('MirrorMaterial') if _name_ is None else \
51
+ clean_rad_string(_name_)
52
+
53
+ # create the modifier
54
+ modifier = Mirror(name, _r_ref, _g_ref, _b_ref)
55
+ if _name_ is not None:
56
+ modifier.display_name = _name_
@@ -0,0 +1,55 @@
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 mirror radiance modifier from a single reflectance.
12
+ -
13
+
14
+ Args:
15
+ _name_: Text to set the name for the modifier and to be incorporated into
16
+ a unique modifier identifier.
17
+ _reflect: A number between 0 and 1 for the mirror reflectance.
18
+ This reflectance will be the same for the red, green and blue channels.
19
+
20
+ Returns:
21
+ modifier: A mirror modifier that can be assigned to a Honeybee geometry
22
+ or Modifier Sets.
23
+ """
24
+
25
+ ghenv.Component.Name = 'HB Mirror Modifier'
26
+ ghenv.Component.NickName = 'MirrorMod'
27
+ ghenv.Component.Message = '1.9.0'
28
+ ghenv.Component.Category = 'HB-Radiance'
29
+ ghenv.Component.SubCategory = '1 :: Modifiers'
30
+ ghenv.Component.AdditionalHelpFromDocStrings = '2'
31
+
32
+ try: # import the core honeybee dependencies
33
+ from honeybee.typing import clean_rad_string, clean_and_id_rad_string
34
+ except ImportError as e:
35
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
36
+
37
+ try: # import the honeybee-radiance dependencies
38
+ from honeybee_radiance.modifier.material import Mirror
39
+ except ImportError as e:
40
+ raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
41
+
42
+ try: # import ladybug_rhino dependencies
43
+ from ladybug_rhino.grasshopper import all_required_inputs
44
+ except ImportError as e:
45
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
46
+
47
+
48
+ if all_required_inputs(ghenv.Component):
49
+ name = clean_and_id_rad_string('MirrorMaterial') if _name_ is None else \
50
+ clean_rad_string(_name_)
51
+
52
+ # create the modifier
53
+ modifier = Mirror.from_single_reflectance(name, _reflect)
54
+ if _name_ is not None:
55
+ modifier.display_name = _name_
@@ -0,0 +1,75 @@
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
+ Write a Honeybee Model to a Radiance Model Folder.
12
+ _
13
+ This Radiance Model Folder is what is used to run various types of Radiance
14
+ studies off of a consistent set of geometry and modifiers.
15
+
16
+ -
17
+
18
+ Args:
19
+ _model: A honeybee model object possessing all geometry, radiance modifiers
20
+ and simulation assets like Sensor Grids and Views.
21
+ minimal_: Boolean to note whether the radiance strings should be written in a minimal
22
+ format (with spaces instead of line breaks). (Default: False).
23
+ _folder_: Path to a folder to into which the Model Radiance Folder will be
24
+ written. If unspecified, it will be written to a sub-folder
25
+ within the default simulation folder.
26
+ _write: Set to True to write the Model to a Radiance folder.
27
+
28
+ Returns:
29
+ report: Reports, errors, warnings, etc.
30
+ folder: Path to the folder in which all of the files have been written.
31
+ """
32
+
33
+ ghenv.Component.Name = 'HB Model to Rad Folder'
34
+ ghenv.Component.NickName = 'ModelToRad'
35
+ ghenv.Component.Message = '1.9.0'
36
+ ghenv.Component.Category = 'HB-Radiance'
37
+ ghenv.Component.SubCategory = '4 :: Results'
38
+ ghenv.Component.AdditionalHelpFromDocStrings = '0'
39
+
40
+ import os
41
+ import re
42
+
43
+ try:
44
+ from ladybug.futil import write_to_file_by_name, nukedir, preparedir
45
+ except ImportError as e:
46
+ raise ImportError('\nFailed to import ladybug:\n\t{}'.format(e))
47
+
48
+ try:
49
+ from honeybee.config import folders
50
+ except ImportError as e:
51
+ raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
52
+
53
+ try:
54
+ from honeybee_radiance_folder.folder import ModelFolder
55
+ except ImportError as e:
56
+ raise ImportError('\nFailed to import honeybee_radiance_folder:\n\t{}'.format(e))
57
+
58
+ try:
59
+ from ladybug_rhino.grasshopper import all_required_inputs, give_warning
60
+ except ImportError as e:
61
+ raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
62
+
63
+
64
+ if all_required_inputs(ghenv.Component) and _write:
65
+ # process the simulation folder name and the directory
66
+ clean_name = re.sub(r'[^.A-Za-z0-9_-]', '_', _model.display_name)
67
+ folder = os.path.join(folders.default_simulation_folder, clean_name, 'radiance') \
68
+ if _folder_ is None else _folder_
69
+ if os.path.isdir(folder):
70
+ nukedir(folder, rmdir=True) # delete the folder if it already exists
71
+ else:
72
+ preparedir(folder) # create the directory if it's not there
73
+
74
+ # write the model folder
75
+ _model.to.rad_folder(_model, folder, minimal=bool(minimal_))