diff --git a/hbph_installer.gh b/hbph_installer.gh index 1f78046..94b2a99 100644 Binary files a/hbph_installer.gh and b/hbph_installer.gh differ diff --git a/honeybee_grasshopper_ph/src/HBPH - Calculate Phius Blind Transmittance.py b/honeybee_grasshopper_ph/src/HBPH - Calculate Phius Blind Transmittance.py new file mode 100644 index 0000000..19685ec --- /dev/null +++ b/honeybee_grasshopper_ph/src/HBPH - Calculate Phius Blind Transmittance.py @@ -0,0 +1,85 @@ +# +# Honeybee-PH: A Plugin for adding Passive-House data to LadybugTools Honeybee-Energy Models +# +# This component is part of the PH-Tools toolkit . +# +# Copyright (c) 2022, PH-Tools and bldgtyp, llc +# Honeybee-PH is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# Honeybee-PH is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For a copy of the GNU General Public License +# see . +# +# @license GPL-3.0+ +# +""" +Calculate an effective solar reduction factor for Phius WUFI-Passive Models. This +calcualtor will output a solar transmittance and solar reflectance value which can +be used in a Honeybee Energy "HB Shade Material" to create interior or exterior blinds. +The calculataion here follows the protocol described in the Phius Guidebook v3.1, Appenix N-8 +- +If the shading reduction factor for a blind in the closed position is “_material_transmittance”, +and “transmittance_efective_” is in the input in WUFI Passive then: + +For exterior blinds use: + Z effective = 0.3 + 0.7 * z + Example: If blinds allow 46% solar access (solar transmittance, Ts) when closed, + use that for "_material_transmittance", and "transmittance_efective_" turns out to be 62%. + Z effective = 0.3 + (0.7*0.46) = 0.622 + +For interior blinds use: + Z effective = 1- (1-z) * (1-0.6) + Example: If blinds allow 46% solar access (solar transmittance, Ts) when closed, + use that for "_material_transmittance", and "transmittance_efective_" turns out to be 78%. + Z effective = 1 – (1-0.46) * (1-0.6) = 0.784 + +- +EM March 23, 2023 + Args: + _material_transmittance: (float) A value from 0.0 to 1.0 + + _inside: (bool) Default=True. Set to False if the blinds are mounted ouside. + + Returns: + transmittance_effective_: The solar transmittance value. Input this result value + into the "_transmittance_" input on an "HB Shade Material" component. + + reflectance_effective_: The solar reflectance value. Input this result value + into the "_reflectance_" input on an "HB Shade Material" component. +""" + +try: + from honeybee_ph_utils import preview +except ImportError as e: + raise ImportError('Failed to import honeybee_ph_utils:\t{}'.format(e)) + +try: + from honeybee_ph_rhino import gh_compo_io, gh_io +except ImportError as e: + raise ImportError('Failed to import honeybee_ph_rhino:\t{}'.format(e)) + + +# ------------------------------------------------------------------------------------- +import honeybee_ph_rhino._component_info_ +reload(honeybee_ph_rhino._component_info_) +ghenv.Component.Name = "HBPH - Calculate Phius Blind Transmittance" +DEV = honeybee_ph_rhino._component_info_.set_component_params(ghenv, dev=False) +if DEV: + reload(gh_io) + from honeybee_ph_rhino.gh_compo_io import win_calc_phius_blind as gh_compo_io + reload(gh_compo_io) + + +# ------------------------------------------------------------------------------------- +gh_compo_interface = gh_compo_io.GHCompo_CalcPhiusShadeTransmittance( + _material_transmittance, + _inside, + ) +transmittance_effective_, reflectance_effective_ = gh_compo_interface.run() diff --git a/honeybee_grasshopper_ph/src/HBPH - Create PH Window Construction.py b/honeybee_grasshopper_ph/src/HBPH - Create PH Window Construction.py index 70407bc..dfb88b8 100644 --- a/honeybee_grasshopper_ph/src/HBPH - Create PH Window Construction.py +++ b/honeybee_grasshopper_ph/src/HBPH - Create PH Window Construction.py @@ -31,7 +31,7 @@ models and outputs. - -EM October 2, 2022 +EM March 22, 2023 Args: _name_: (str) @@ -39,6 +39,12 @@ _glazing: (PhWindowGlazing) A HBPH Window Glazing to build the window construction from. + _shade: (Optional[EnergyWindowMaterialShade]) An Optional solar shade (roller blind) to add to the + window construction. This will show up as a Solar Protection device in WUFI. Use an + "HB - Shade Material" and set the "_transmittance_" input to desired value. Note that + for WUFI and PHPP, the other values such as thickness and emissivity are disregarded. If + the window construction does not have solar shading simply leave this input blank. + nfrc_u_factor_: (float) Optional NRFC U-Factor for the Window Construction. If none is supplied, this value will be approximated from the ISO values of the _glazing and _frame. Note that this is an approximation only. Strictly speaking this ISO value is not valid @@ -79,8 +85,9 @@ ghenv.Component.Name = "HBPH - Create PH Window Construction" DEV = honeybee_ph_rhino._component_info_.set_component_params(ghenv, dev=False) if DEV: - reload(gh_compo_io) reload(gh_io) + from honeybee_ph_rhino.gh_compo_io import win_create_constr as gh_compo_io + reload(gh_compo_io) # ------------------------------------------------------------------------------ @@ -97,6 +104,7 @@ nfrc_u_factor_, nfrc_shgc_, t_vis_, + _shade, ) construction_ = gh_compo_interface.run() diff --git a/honeybee_grasshopper_ph/src/HBPH - Create Ventilation System.py b/honeybee_grasshopper_ph/src/HBPH - Create Ventilation System.py index 1a7ad0f..8f21a2b 100644 --- a/honeybee_grasshopper_ph/src/HBPH - Create Ventilation System.py +++ b/honeybee_grasshopper_ph/src/HBPH - Create Ventilation System.py @@ -22,7 +22,7 @@ """ Create new PH-Style Ventilation Equpment which can be aded to HB-Rooms. - -EM October 2, 2022 +EM March 22, 2023 Args: system_name_: (str) The name to give to the fresh-air ventilation system. @@ -48,7 +48,7 @@ raise ImportError('Failed to import honeybee_ph_utils:\t{}'.format(e)) try: - from honeybee_ph_rhino import gh_compo_io + from honeybee_ph_rhino import gh_compo_io, gh_io except ImportError as e: raise ImportError('Failed to import honeybee_ph_rhino:\t{}'.format(e)) @@ -59,16 +59,17 @@ ghenv.Component.Name = "HBPH - Create Ventilation System" DEV = honeybee_ph_rhino._component_info_.set_component_params(ghenv, dev=False) if DEV: - reload(gh_compo_io) reload(gh_io) + from honeybee_ph_rhino.gh_compo_io import mech_create_vent_sys as gh_compo_io + # ------------------------------------------------------------------------------ gh_compo_interface = gh_compo_io.GHCompo_CreateVentSystem( system_name_, system_type_, vent_unit_, - duct_01_, - duct_02_, + supply_ducts_, + exhaust_ducts_, ) vent_system_ = gh_compo_interface.run() diff --git a/honeybee_grasshopper_ph/src/HBPH - Set Spec Heat Capacity.py b/honeybee_grasshopper_ph/src/HBPH - Set Spec Heat Capacity.py new file mode 100644 index 0000000..8e13e83 --- /dev/null +++ b/honeybee_grasshopper_ph/src/HBPH - Set Spec Heat Capacity.py @@ -0,0 +1,82 @@ +# +# Honeybee-PH: A Plugin for adding Passive-House data to LadybugTools Honeybee-Energy Models +# +# This component is part of the PH-Tools toolkit . +# +# Copyright (c) 2022, PH-Tools and bldgtyp, llc +# Honeybee-PH is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# Honeybee-PH is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For a copy of the GNU General Public License +# see . +# +# @license GPL-3.0+ +# +""" +Set the Room averge Specific Heat Capacity (Wh/m2-K). If a single value is provided, it +will be used to set the attribute value of each Honeybee-Room input. If a list is provided, +the values will be applied to the Honeybee-Rooms in the order input. +- +EM March 29, 2023 + Args: + _room_spec_capacities: (Wh/m2k) Input either - +"1-Lightweight" (Default) +"2-Mixed" +"3-Massive" + + _hb_rooms: (List[roomn.Room]) A list of the Honeybee Rooms to set the + Specific Heat Capacity (Wh/m2k) on. + + Returns: + hb_rooms_: (List[room.Room]) A list of the Honeybee Rooms with their + Specific Heat Capacity (Wh/m2k) set. +""" + +import scriptcontext as sc +import Rhino as rh +import rhinoscriptsyntax as rs +import ghpythonlib.components as ghc +import Grasshopper as gh + + +try: + from honeybee_ph_utils import preview +except ImportError as e: + raise ImportError('Failed to import honeybee_ph_utils:\t{}'.format(e)) + +try: + from honeybee_ph_rhino import gh_compo_io, gh_io +except ImportError as e: + raise ImportError('Failed to import honeybee_ph_rhino:\t{}'.format(e)) + + +#------------------------------------------------------------------------------- +import honeybee_ph_rhino._component_info_ +reload(honeybee_ph_rhino._component_info_) +ghenv.Component.Name = "HBPH - Set Spec Heat Capacity" +DEV = honeybee_ph_rhino._component_info_.set_component_params(ghenv, dev=False) +if DEV: + from honeybee_ph_rhino.gh_compo_io import set_spec_heat_cap as gh_compo_io + reload(gh_compo_io) + + +# ------------------------------------------------------------------------------ +# -- GH Interface +IGH = gh_io.IGH( ghdoc, ghenv, sc, rh, rs, ghc, gh ) + + +# ------------------------------------------------------------------------------ +gh_compo_interface = gh_compo_io.GHCompo_SetRoomSpecHeatCaps( + IGH, + _room_spec_capacities, + _hb_rooms, + ) + +hb_rooms_ = gh_compo_interface.run() \ No newline at end of file diff --git a/honeybee_grasshopper_ph/user_objects/HBPH - Calculate Phius Blind Transmittance.ghuser b/honeybee_grasshopper_ph/user_objects/HBPH - Calculate Phius Blind Transmittance.ghuser new file mode 100644 index 0000000..cede92e Binary files /dev/null and b/honeybee_grasshopper_ph/user_objects/HBPH - Calculate Phius Blind Transmittance.ghuser differ diff --git a/honeybee_grasshopper_ph/user_objects/HBPH - Create PH Window Construction.ghuser b/honeybee_grasshopper_ph/user_objects/HBPH - Create PH Window Construction.ghuser index 80fd701..6ab2bd7 100644 Binary files a/honeybee_grasshopper_ph/user_objects/HBPH - Create PH Window Construction.ghuser and b/honeybee_grasshopper_ph/user_objects/HBPH - Create PH Window Construction.ghuser differ diff --git a/honeybee_grasshopper_ph/user_objects/HBPH - Create Ventilation System.ghuser b/honeybee_grasshopper_ph/user_objects/HBPH - Create Ventilation System.ghuser index ecd835c..75c64e1 100644 Binary files a/honeybee_grasshopper_ph/user_objects/HBPH - Create Ventilation System.ghuser and b/honeybee_grasshopper_ph/user_objects/HBPH - Create Ventilation System.ghuser differ diff --git a/honeybee_grasshopper_ph/user_objects/HBPH - Set Spec Heat Capacity.ghuser b/honeybee_grasshopper_ph/user_objects/HBPH - Set Spec Heat Capacity.ghuser new file mode 100644 index 0000000..5727fc7 Binary files /dev/null and b/honeybee_grasshopper_ph/user_objects/HBPH - Set Spec Heat Capacity.ghuser differ diff --git a/honeybee_ph_rhino/_component_info_.py b/honeybee_ph_rhino/_component_info_.py index 1bf5818..ead8cae 100644 --- a/honeybee_ph_rhino/_component_info_.py +++ b/honeybee_ph_rhino/_component_info_.py @@ -5,7 +5,7 @@ These are called when the component is instantiated within the Grasshopper canvas. """ -RELEASE_VERSION = "Honeybee-PH v1.0.27" +RELEASE_VERSION = "Honeybee-PH v1.0.28" CATEGORY = "HB-PH" SUB_CATEGORIES = { 0: "00 | Utils", @@ -299,6 +299,12 @@ "Category": CATEGORY, "SubCategory": 1, }, + "HBPH - Calculate Phius Blind Transmittance" :{ + "NickName": " Calc. Phius Blind", + "Message": RELEASE_VERSION, + "Category": CATEGORY, + "SubCategory": 1, + }, # -- Envelope "HBPH - Create SD Constructions": { "NickName": "Create SD Const.", @@ -324,6 +330,12 @@ "Category": CATEGORY, "SubCategory": 1, }, + "HBPH - Set Spec Heat Capacity": { + "NickName": "Set Spec Heat Cap.", + "Message": RELEASE_VERSION, + "Category": CATEGORY, + "SubCategory": 1, + }, # -- Shading "HBPH - Create Building Shading": { "NickName": "Create Shading", diff --git a/honeybee_ph_rhino/gh_compo_io/__init__.py b/honeybee_ph_rhino/gh_compo_io/__init__.py index 6eba5a2..7fad946 100644 --- a/honeybee_ph_rhino/gh_compo_io/__init__.py +++ b/honeybee_ph_rhino/gh_compo_io/__init__.py @@ -21,9 +21,11 @@ from honeybee_ph_rhino.gh_compo_io.win_create_frame import GHCompo_CreatePhWinFrame from honeybee_ph_rhino.gh_compo_io.win_create_frame_element import GHCompo_CreatePhWinFrameElement from honeybee_ph_rhino.gh_compo_io.win_set_inst_depth import GHCompo_SetApertureInstallDepth +from honeybee_ph_rhino.gh_compo_io.win_calc_phius_blind import GHCompo_CalcPhiusShadeTransmittance # -- Envelope from honeybee_ph_rhino.gh_compo_io.assmbly_create_sd_const import GHCompo_CreateSDConstructions from honeybee_ph_rhino.gh_compo_io.assmbly_create_mixed_mat import GHCompo_CreateMixedHBMaterial +from honeybee_ph_rhino.gh_compo_io.set_spec_heat_cap import GHCompo_SetRoomSpecHeatCaps # -- Mech from honeybee_ph_rhino.gh_compo_io.mech_create_vent_sys import GHCompo_CreateVentSystem from honeybee_ph_rhino.gh_compo_io.mech_create_ventilator import GHCompo_CreatePhVentilator diff --git a/honeybee_ph_rhino/gh_compo_io/mech_create_vent_sys.py b/honeybee_ph_rhino/gh_compo_io/mech_create_vent_sys.py index 8c670dd..0395195 100644 --- a/honeybee_ph_rhino/gh_compo_io/mech_create_vent_sys.py +++ b/honeybee_ph_rhino/gh_compo_io/mech_create_vent_sys.py @@ -4,7 +4,7 @@ """GHCompo Interface: HBPH - Create Ventilation System.""" try: - from typing import Any, Optional + from typing import Union, Optional, List except ImportError: pass #IronPython 2.7 @@ -27,14 +27,36 @@ class GHCompo_CreateVentSystem(object): display_name = ghio_validators.HBName("display_name") - def __init__(self, _display_name, _sys_type, _vent_unit, _duct_01, _duct_02): - # type: (str, int, ventilation.Ventilator, Optional[ducting.PhDuctElement], Optional[ducting.PhDuctElement]) -> None + def __init__(self, _display_name, _sys_type, _vent_unit, _supply_ducts, _exhaust_ducts): + # type: (str, int, ventilation.Ventilator, List[ducting.PhDuctElement], List[ducting.PhDuctElement]) -> None self.display_name = _display_name or "__unnamed_ventilator__" self.system_type = _sys_type self.vent_unit = _vent_unit - self.duct_01 = _duct_01 - self.duct_02 = _duct_02 + self._supply_ducts = _supply_ducts + self._exhaust_ducts = _exhaust_ducts + @property + def supply_ducts(self): + # type: () -> List[ducting.PhDuctElement] + return self._supply_ducts or [ducting.PhDuctElement.default_supply_duct()] + + @supply_ducts.setter + def supply_ducts(self, _input): + # type: (Union[ducting.PhDuctElement, List[ducting.PhDuctElement]]) -> None + if not isinstance(_input, list): + self._supply_ducts = [_input] + + @property + def exhaust_ducts(self): + # type: () -> List[ducting.PhDuctElement] + return self._exhaust_ducts or [ducting.PhDuctElement.default_exhaust_duct()] + + @exhaust_ducts.setter + def exhaust_ducts(self, _input): + # type: (Union[ducting.PhDuctElement, List[ducting.PhDuctElement]]) -> None + if not isinstance(_input, list): + self._supply_ducts = [_input] + @property def system_type(self): # type: () -> int @@ -52,11 +74,7 @@ def run(self): vent_system_.display_name = self.display_name or vent_system_.display_name vent_system_.sys_type = self.system_type vent_system_.ventilation_unit = self.vent_unit or ventilation.Ventilator() - - if self.duct_01: - vent_system_.duct_01 = self.duct_01 - - if self.duct_02: - vent_system_.duct_02 = self.duct_02 + vent_system_.supply_ducting = self.supply_ducts + vent_system_.exhaust_ducting = self.exhaust_ducts return vent_system_ \ No newline at end of file diff --git a/honeybee_ph_rhino/gh_compo_io/set_spec_heat_cap.py b/honeybee_ph_rhino/gh_compo_io/set_spec_heat_cap.py new file mode 100644 index 0000000..338ce3f --- /dev/null +++ b/honeybee_ph_rhino/gh_compo_io/set_spec_heat_cap.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# -*- Python Version: 2.7 -*- + +"""GHCompo Interface: HBPH - Set Spec. Heat Capacity.""" + +try: + from typing import List +except ImportError: + pass # IronPython 2.7 + +try: + from honeybee import room +except ImportError as e: + raise ImportError("\nFailed to import honeybee:\n\t{}".format(e)) + +try: + from honeybee_ph_rhino import gh_io +except ImportError as e: + raise ImportError("\nFailed to import honeybee_ph_rhino:\n\t{}".format(e)) + +try: + from honeybee_ph.properties.room import PhSpecificHeatCapacity +except ImportError as e: + raise ImportError("\nFailed to import honeybee_ph:\n\t{}".format(e)) + + +class GHCompo_SetRoomSpecHeatCaps(object): + + def __init__(self, _IGH, _spec_capacities, _hb_rooms): + # type: (gh_io.IGH, List[str], List[room.Room]) -> None + self.IGH = _IGH + self.hb_rooms = _hb_rooms + self.spec_capacities = _spec_capacities + + def _get_user_input_spec_heat(self, i): + # type: (int) -> str + """Return a Specific Heat Cap. Type number. If non input, return the default (1).""" + try: + return str(self.spec_capacities[i]).strip().upper() + except: + try: + return str(self.spec_capacities[0]).strip().upper() + except: + return "1" + + def spec_capacity(self, i): + """Return Specific Heat Capacity enum.""" + return PhSpecificHeatCapacity(self._get_user_input_spec_heat(i)) + + def run(self): + # type: () -> List[room.Room] + hb_rooms_ = [room.duplicate() for room in self.hb_rooms] # type: List[room.Room] + + for i, room in enumerate(hb_rooms_): + room.properties.ph.specific_heat_capacity = self.spec_capacity(i) + + return hb_rooms_ + diff --git a/honeybee_ph_rhino/gh_compo_io/win_calc_phius_blind.py b/honeybee_ph_rhino/gh_compo_io/win_calc_phius_blind.py new file mode 100644 index 0000000..5d4eda0 --- /dev/null +++ b/honeybee_ph_rhino/gh_compo_io/win_calc_phius_blind.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# -*- Python Version: 2.7 -*- + +"""GHCompo Interface: HBPH - Calculate Phius Blind Transmittance.""" + +try: + from typing import Tuple +except ImportError: + pass #IronPython 2.7 + +try: + from honeybee_ph_rhino.gh_compo_io import ghio_validators +except ImportError as e: + raise ImportError('\nFailed to import honeybee_ph_rhino:\n\t{}'.format(e)) + + +class GHCompo_CalcPhiusShadeTransmittance(object): + + transmittance = ghio_validators.FloatPercentage("transmittance") + + def __init__(self, _transmittance, _inside): + # type: (float, bool) -> None + print(_transmittance) + self.transmittance = _transmittance or 0.85 + self.inside = _inside + + def run(self): + # type: () -> Tuple[float, float] + """Calculate the effective reduction factor according to Phius Guidebook v3.1, Appendix N-8""" + + if self.inside is False: + transmittance_eff = 1 - (1-self.transmittance) * (1 - 0.6) + else: + transmittance_eff = 0.3 + (0.7 * self.transmittance) + + reflectance = 1.0 - transmittance_eff + + return (transmittance_eff, reflectance) \ No newline at end of file diff --git a/honeybee_ph_rhino/gh_compo_io/win_create_constr.py b/honeybee_ph_rhino/gh_compo_io/win_create_constr.py index 9ff07d9..728d5e2 100644 --- a/honeybee_ph_rhino/gh_compo_io/win_create_constr.py +++ b/honeybee_ph_rhino/gh_compo_io/win_create_constr.py @@ -4,13 +4,15 @@ """GHCompo Interface: HBPH - Create PH Window Construction.""" try: - from typing import Optional + from typing import Optional, Union except ImportError: pass # IronPython 2.7 try: from honeybee_energy.material.glazing import EnergyWindowMaterialSimpleGlazSys from honeybee_energy.construction.window import WindowConstruction + from honeybee_energy.construction.windowshade import WindowConstructionShade + from honeybee_energy.material.shade import EnergyWindowMaterialShade except ImportError as e: raise ImportError('\nFailed to import honeybee_energy:\n\t{}'.format(e)) @@ -42,18 +44,28 @@ class GHCompo_CreatePhConstruction(object): nfrc_shgc = ghio_validators.FloatPercentage("nfrc_shgc", default=None) t_vis = ghio_validators.Float("t_vis", default=0.6) - def __init__(self, _IGH, _display_name, _frame, _glazing, _nfrc_u_factor, _nfrc_shgc, _t_vis): - # type: (gh_io.IGH, str, window.PhWindowFrame, window.PhWindowGlazing, float, float, float) -> None + def __init__(self, _IGH, _display_name, _frame, _glazing, _nfrc_u_factor, _nfrc_shgc, _t_vis, _shading=None): + # type: (gh_io.IGH, str, window.PhWindowFrame, window.PhWindowGlazing, float, float, float, Optional[EnergyWindowMaterialShade] ) -> None self.IGH = _IGH self.display_name = _display_name or clean_and_id_ep_string("PhWindowConstruction") self.frame = _frame self.glazing = _glazing + self.hb_shade_material = _shading self.nfrc_u_factor = _nfrc_u_factor self.nfrc_shgc = _nfrc_shgc self.t_vis = _t_vis + def make_hb_window_construction(self, _window_mat): + # type: (EnergyWindowMaterialSimpleGlazSys) -> Union[WindowConstruction, WindowConstructionShade] + """Return the new HB Window Construction""" + window_construction = WindowConstruction(self.display_name, [_window_mat]) + if self.hb_shade_material: + return WindowConstructionShade(self.display_name, window_construction, self.hb_shade_material) + else: + return window_construction + def run(self): - # type: () -> Optional[WindowConstruction] + # type: () -> Optional[Union[WindowConstruction, WindowConstructionShade]] """Return a new HB-Window-Construction with values set by the PH Elements.""" # --------------------------------------------------------------------- @@ -74,7 +86,7 @@ def run(self): # ------------------------------------------------------------------------------------- # -- Create a new HB Window Construction - hb_win_construction_ = WindowConstruction(self.display_name, [window_mat]) + hb_win_construction_ = self.make_hb_window_construction(window_mat) # ------------------------------------------------------------------------------------- # -- Set the PH Properties on the WindowConstructionProperties diff --git a/honeybee_ph_rhino/reporting/build_floor_segments.py b/honeybee_ph_rhino/reporting/build_floor_segments.py index 09b01a3..3f3712f 100644 --- a/honeybee_ph_rhino/reporting/build_floor_segments.py +++ b/honeybee_ph_rhino/reporting/build_floor_segments.py @@ -261,8 +261,15 @@ def _get_flr_seg_data(_IGH, _get_color, _space): msh_edges = _IGH.ghpythonlib_components.MeshEdges(msh).naked_edges msh_boundary = _IGH.ghpythonlib_components.JoinCurves( msh_edges, preserve=False) - flr_seg_geom_.append(msh_boundary) - flr_sef_attrs_.append(crv_attr) + + # -- Sometimes Join Curves returns a list of items.... + if isinstance(msh_boundary, list): + for crv in msh_boundary: + flr_seg_geom_.append(crv) + flr_sef_attrs_.append(crv_attr) + else: + flr_seg_geom_.append(msh_boundary) + flr_sef_attrs_.append(crv_attr) return flr_seg_geom_, flr_sef_attrs_ diff --git a/honeybee_ph_rhino/reporting/to_pdf.py b/honeybee_ph_rhino/reporting/to_pdf.py index 5c0f48a..2493457 100644 --- a/honeybee_ph_rhino/reporting/to_pdf.py +++ b/honeybee_ph_rhino/reporting/to_pdf.py @@ -492,7 +492,6 @@ def bake_geometry_object(_IGH, _geom_obj, _attr_obj, _layer_name): -------- * (None) """ - doc_object = _IGH.rhinoscriptsyntax.coercerhinoobject(_geom_obj, True, True) geometry = doc_object.Geometry