Skip to content

Commit

Permalink
feat(colormesh): Adding the ability to create height field meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Jun 7, 2019
1 parent 77d332a commit f191551
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions plugin/grasshopper/src/LadybugPlus_Color Mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
in the mesh.
_mesh: A Mesh object, with a number of faces or vertices that match
the number of input values and will be colored with restults.
offset_domain_: Optional domain (or number for distance), which will
be used to offset the mesh faces or verticesto according to the
values. Higher values will be offset further.
legend_par_: Optional legend parameters from the Ladybug
'Legend Parameters' component.
legend_title_: A text string for Legend title. Typically, the units
Expand All @@ -35,7 +38,7 @@

ghenv.Component.Name = "LadybugPlus_Color Mesh"
ghenv.Component.NickName = 'colorMesh'
ghenv.Component.Message = 'VER 0.0.04\nMAY_31_2019'
ghenv.Component.Message = 'VER 0.0.04\nJUN_03_2019'
ghenv.Component.Category = "LadybugPlus"
ghenv.Component.SubCategory = "03 :: Extra"
ghenv.Component.AdditionalHelpFromDocStrings = "1"
Expand All @@ -52,7 +55,11 @@

if len(_values) != 0 and _values[0] is not None and _mesh:
# generate Ladybug objects
res_mesh = ResultMesh(_values, to_mesh3d(_mesh), legend_par_)
lb_mesh = to_mesh3d(_mesh)
if offset_dom_:
lb_mesh = lb_mesh.height_field_mesh(
_values, (offset_dom_.T0, offset_dom_.T1))
res_mesh = ResultMesh(_values, lb_mesh, legend_par_)

# generate titles
if legend_title_ is not None:
Expand Down
Binary file modified plugin/grasshopper/userObjects/LadybugPlus_Color Mesh.ghuser
Binary file not shown.

0 comments on commit f191551

Please sign in to comment.