Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
feat(shade): add an object to capture shade elements
Browse files Browse the repository at this point in the history
  • Loading branch information
devangcx committed Nov 19, 2021
1 parent ce1f6b0 commit 6535af2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions honeybee_ifc/shade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Honeybee-IFC Shade object."""


import ifcopenshell
from ifcopenshell.entity_instance import entity_instance as IfcElement
from honeybee.shade import Shade as HBShade
from honeybee.typing import clean_and_id_string
from .element import Element


class Shade(Element):
"""Honeybee-IFC Opening object.
Args:
shade: Any Ifc object that needs to be converted to shade.
settings: An ifcopenshell.geom.settings object.
"""

def __init__(self, shade: IfcElement, settings: ifcopenshell.geom.settings = None):
super().__init__(shade, settings)
self.shade = shade
self.settings = settings or self._settings()

def to_honeybee(self):
"""Convert IFC object to Honeybee shade."""
return [HBShade(clean_and_id_string('Shade'), face)
for face in self.polyface3d.faces]

0 comments on commit 6535af2

Please sign in to comment.