Skip to content

Commit

Permalink
fix(release): Trigger new release to get around secondary rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Jan 13, 2023
1 parent f92728f commit 5562122
Show file tree
Hide file tree
Showing 22 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The ladybug-grasshopper plugin has the following dependencies (other than Rhino/
* [ladybug-geometry](https://github.com/ladybug-tools/ladybug-geometry)
* [ladybug-comfort](https://github.com/ladybug-tools/ladybug-comfort)
* [ladybug-display](https://github.com/ladybug-tools/ladybug-display)
* [ladybug-radiance](https://github.com/ladybug-tools/ladybug-radiance)
* [ladybug-rhino](https://github.com/ladybug-tools/ladybug-rhino)

## Installation
Expand Down
Binary file modified ladybug_grasshopper/icon/LB Solar Envelope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ladybug_grasshopper/json/LB_Solar_Envelope.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{
"access": "item",
"name": "solar_rights_",
"description": "Set to True to compute a solar rights boundary and False to compute\na solar collection boundary. Solar rights boundaries represent the\nboundary below which one can build without shading the surrounding\nobstacles from any of the _vectors. Solar collection boundaries\nrepresent the boundary above which the one will have direct solar\naccess to all of the input _vectors. (Default: False).",
"description": "Set to True to compute a solar rights boundary and False to compute\na solar collection boundary. Solar rights boundaries represent the\nboundary below which one can build without shading the surrounding\nobstacles from any of the _vectors. Solar collection boundaries\nrepresent the boundary above which one will have direct solar\naccess to all of the input _vectors. (Default: False).",
"type": "bool",
"default": null
},
Expand Down
2 changes: 1 addition & 1 deletion ladybug_grasshopper/json/LB_Surface_Ray_Tracing.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}
],
"subcategory": "3 :: Analyze Geometry",
"code": "\nimport math\n\ntry:\n from ladybug_geometry.geometry3d.ray import Ray3D\n from ladybug_geometry.geometry3d.polyline import Polyline3D\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_geometry:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.togeometry import to_joined_gridded_mesh3d, to_point3d, \\\n to_vector3d\n from ladybug_{{cad}}.fromgeometry import from_point3d, from_vector3d, from_ray3d, \\\n from_polyline3d\n from ladybug_{{cad}}.intersect import join_geometry_to_brep, bounding_box_extents, \\\n trace_ray, normal_at_point\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs, list_to_data_tree, \\\n hide_output\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\nif all_required_inputs(ghenv.Component):\n # check the _bounce_count_\n _bounce_count_ = 0 if _bounce_count_ is None else _bounce_count_ - 1\n assert _bounce_count_ >= 0, 'The input _bounce_count_ must be greater ' \\\n 'than zero. Got {}.'.format(_bounce_count_ + 1)\n # process the input sun vector\n lb_vec = to_vector3d(_vector).normalize()\n neg_lb_vec = -lb_vec\n vec = from_vector3d(lb_vec)\n\n # convert all of the _source_geo and contex into a single Brep for ray tracing\n rtrace_brep = join_geometry_to_brep(_source_geo + context_)\n\n # autocompute the first and last bounce length if it's unspecified\n if _first_length_ is None or _last_length_ is None:\n max_pt, min_pt = (to_point3d(p) for p in bounding_box_extents(rtrace_brep))\n diag_dist = max_pt.distance_to_point(min_pt)\n _first_length_ = diag_dist if _first_length_ is None else _first_length_\n _last_length_ = diag_dist if _last_length_ is None else _last_length_\n\n # create the gridded mesh from the _source_geo and set up the starting rays\n study_mesh = to_joined_gridded_mesh3d(_source_geo, _grid_size)\n move_vec = neg_lb_vec * _first_length_\n source_points = [pt + move_vec for pt in study_mesh.face_centroids]\n lb_rays = [Ray3D(pt, lb_vec) for pt in source_points]\n start_rays = [from_ray3d(ray) for ray in lb_rays]\n\n # trace each ray through the geometry\n cutoff_ang = math.pi / 2\n rtrace_geo = [rtrace_brep]\n rays, int_pts = [], []\n for ray, pt, norm in zip(start_rays, source_points, study_mesh.face_normals):\n if norm.angle(neg_lb_vec) < cutoff_ang:\n pl_pts = trace_ray(ray, rtrace_geo, _bounce_count_ + 1)\n # if the intersection was successful, create a polyline represeting the ray\n if pl_pts:\n # gather all of the intersection points\n all_pts = [pt]\n for i_pt in pl_pts:\n all_pts.append(to_point3d(i_pt))\n # compute the last point\n if len(pl_pts) < _bounce_count_ + 2:\n int_norm = normal_at_point(rtrace_brep, pl_pts[-1])\n int_norm = to_vector3d(int_norm)\n last_vec = all_pts[-2] - all_pts[-1]\n last_vec = last_vec.normalize()\n final_vec = last_vec.reflect(int_norm).reverse()\n final_pt = all_pts[-1] + (final_vec * _last_length_)\n all_pts.append(final_pt)\n # create a Polyline3D from the points\n lb_ray_line = Polyline3D(all_pts)\n rays.append(from_polyline3d(lb_ray_line))\n int_pts.append([from_point3d(p) for p in all_pts])\n\n # convert the intersection points to a data tree\n int_pts = list_to_data_tree(int_pts)\n hide_output(ghenv.Component, 1)\n",
"code": "\nimport math\n\ntry:\n from ladybug_geometry.geometry3d.ray import Ray3D\n from ladybug_geometry.geometry3d.polyline import Polyline3D\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_geometry:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.togeometry import to_joined_gridded_mesh3d, to_point3d, \\\n to_vector3d\n from ladybug_{{cad}}.fromgeometry import from_point3d, from_vector3d, from_ray3d, \\\n from_polyline3d\n from ladybug_{{cad}}.intersect import join_geometry_to_brep, bounding_box_extents, \\\n trace_ray, normal_at_point\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs, list_to_data_tree, \\\n hide_output\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\nif all_required_inputs(ghenv.Component):\n # check the _bounce_count_\n _bounce_count_ = 0 if _bounce_count_ is None else _bounce_count_ - 1\n assert _bounce_count_ >= 0, 'The input _bounce_count_ must be greater ' \\\n 'than zero. Got {}.'.format(_bounce_count_ + 1)\n # process the input sun vector\n lb_vec = to_vector3d(_vector).normalize()\n neg_lb_vec = -lb_vec\n vec = from_vector3d(lb_vec)\n\n # convert all of the _source_geo and contex into a single Brep for ray tracing\n rtrace_brep = join_geometry_to_brep(_source_geo + context_)\n\n # autocompute the first and last bounce length if it's unspecified\n if _first_length_ is None or _last_length_ is None:\n max_pt, min_pt = (to_point3d(p) for p in bounding_box_extents(rtrace_brep))\n diag_dist = max_pt.distance_to_point(min_pt)\n _first_length_ = diag_dist if _first_length_ is None else _first_length_\n _last_length_ = diag_dist if _last_length_ is None else _last_length_\n\n # create the gridded mesh from the _source_geo and set up the starting rays\n study_mesh = to_joined_gridded_mesh3d(_source_geo, _grid_size)\n move_vec = neg_lb_vec * _first_length_\n source_points = [pt + move_vec for pt in study_mesh.face_centroids]\n lb_rays = [Ray3D(pt, lb_vec) for pt in source_points]\n start_rays = [from_ray3d(ray) for ray in lb_rays]\n\n # trace each ray through the geometry\n cutoff_ang = math.pi / 2\n rtrace_geo = [rtrace_brep]\n rays, int_pts = [], []\n for ray, pt, norm in zip(start_rays, source_points, study_mesh.face_normals):\n if norm.angle(neg_lb_vec) < cutoff_ang:\n pl_pts = trace_ray(ray, rtrace_geo, _bounce_count_ + 2)\n # if the intersection was successful, create a polyline represeting the ray\n if pl_pts:\n # gather all of the intersection points\n all_pts = [pt]\n for i_pt in pl_pts:\n all_pts.append(to_point3d(i_pt))\n # compute the last point\n if len(pl_pts) < _bounce_count_ + 2:\n int_norm = normal_at_point(rtrace_brep, pl_pts[-1])\n int_norm = to_vector3d(int_norm)\n last_vec = all_pts[-2] - all_pts[-1]\n last_vec = last_vec.normalize()\n final_vec = last_vec.reflect(int_norm).reverse()\n final_pt = all_pts[-1] + (final_vec * _last_length_)\n all_pts.append(final_pt)\n # create a Polyline3D from the points\n lb_ray_line = Polyline3D(all_pts)\n rays.append(from_polyline3d(lb_ray_line))\n int_pts.append([from_point3d(p) for p in all_pts])\n\n # convert the intersection points to a data tree\n int_pts = list_to_data_tree(int_pts)\n hide_output(ghenv.Component, 1)\n",
"category": "Ladybug",
"name": "LB Surface Ray Tracing",
"description": "Get a ray tracing visualization of direct sunlight rays reflected off of _source_geo\nand subsequently bouncing through a set of context_ geometries.\n_\nExamples where this visualization could be useful include understading the\nreflection of light by a light shelf or testing to see whether a parabolic\nglass or metal building geometry might focus sunlight to dangerous levels at\ncertain times of the year.\n_\nNote that this component assumes that all sun light is reflected specularly\n(like a mirror) and, for more detailed raytracing analysis with diffuse\nscattering, the Honeybee Radiance components should be used.\n-"
Expand Down
2 changes: 1 addition & 1 deletion ladybug_grasshopper/json/LB_Wind_Rose.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ladybug_grasshopper/src/LB Solar Envelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
a solar collection boundary. Solar rights boundaries represent the
boundary below which one can build without shading the surrounding
obstacles from any of the _vectors. Solar collection boundaries
represent the boundary above which the one will have direct solar
represent the boundary above which one will have direct solar
access to all of the input _vectors. (Default: False).
_run: Set to "True" to run the component and get a solar envelope.
Expand Down
2 changes: 1 addition & 1 deletion ladybug_grasshopper/src/LB Surface Ray Tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
rays, int_pts = [], []
for ray, pt, norm in zip(start_rays, source_points, study_mesh.face_normals):
if norm.angle(neg_lb_vec) < cutoff_ang:
pl_pts = trace_ray(ray, rtrace_geo, _bounce_count_ + 1)
pl_pts = trace_ray(ray, rtrace_geo, _bounce_count_ + 2)
# if the intersection was successful, create a polyline represeting the ray
if pl_pts:
# gather all of the intersection points
Expand Down
4 changes: 2 additions & 2 deletions ladybug_grasshopper/src/LB Wind Rose.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
show_calm_ is True, then the initial frequency interval corresponds
to the number of calm hours in the data collection, which may not
align with this freq_dist_ (Default: 5 meters)
_freq_hours_: The number of hours in each frequency interval (Default: 50).
_freq_hours_: The number of hours in each frequency interval (Default: 50).
_max_freq_lines_: A number representing the maximum frequency intervals in
the rose, which determines the maximum amount of hours represented by the
outermost ring of the windrose. Specifically, this number multiplied by the
Expand Down Expand Up @@ -310,7 +310,7 @@ def title_text(data_col):
hide_output(ghenv.Component, 5) # keep the devault visual simple

# compute direction angles and prevailing direction
theta = 180.0 / windrose._number_of_directions
theta = 180.0 / _dir_count_
angles = [(angle + theta) % 360.0 for angle in windrose.angles[:-1]]
prevailing = windrose.prevailing_direction
vis_set = objectify_output(
Expand Down
Binary file modified ladybug_grasshopper/user_objects/LB Solar Envelope.ghuser
Binary file not shown.
Binary file modified ladybug_grasshopper/user_objects/LB Surface Ray Tracing.ghuser
Binary file not shown.
Binary file modified ladybug_grasshopper/user_objects/LB Wind Rose.ghuser
Binary file not shown.
Binary file modified samples/comfort_in_a_street_canyon.gh
Binary file not shown.
Binary file modified samples/direct_sun_study.gh
Binary file not shown.
Binary file modified samples/outdoor_comfort.gh
Binary file not shown.
Binary file modified samples/psychrometric_chart.gh
Binary file not shown.
Binary file modified samples/radiation_benefit_on_sunpath.gh
Binary file not shown.
Binary file modified samples/radiation_graphics.gh
Binary file not shown.
Binary file modified samples/radiation_study.gh
Binary file not shown.
Binary file modified samples/raytracing_study.gh
Binary file not shown.
Binary file modified samples/solar_envelope.gh
Binary file not shown.
Binary file modified samples/visualization_set.gh
Binary file not shown.
Binary file modified samples/windrose_plot.gh
Binary file not shown.

0 comments on commit 5562122

Please sign in to comment.