Skip to content

Commit 65098aa

Browse files
move view_boundaries to src/idfhub/helpers/geometry.py (#116)
1 parent 64b91b5 commit 65098aa

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

generate_geometry.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,18 @@
3232
box_room, complex_room,
3333
get, get_from_pattern,
3434
ApertureManager, add_aperture,
35-
join_surface
35+
join_surface,
36+
view_boundaries
3637
)
3738

38-
LOGGER = get_logger("idfhub", level=logging.INFO)
39+
LOGGER = get_logger(log_level=logging.INFO)
3940

4041
# Building global params
4142
ADMIN_WIDTH = 37.0
4243
ADMIN_DEPTH = 11.0
4344
LEVEL_HEIGHT = 3.0
4445

45-
def view_boundaries(building: Model):
46-
"""check boundary conditions"""
47-
for element in building:
48-
for _face in element.faces:
49-
message = f"id: {_face.identifier} type: {type(_face.type)}"
50-
LOGGER.info(message)
51-
message = f"bc: {_face.boundary_condition}"
52-
LOGGER.info(message)
53-
message = f"material: {_face.properties.energy.construction.identifier}"
54-
LOGGER.info(message)
46+
5547

5648
print("-> Creating Honeybee Rooms.....")
5749

src/idfhub/helpers/geometry.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from honeybee.boundarycondition import Surface
77
from honeybee.door import Door
88
from honeybee.face import Face
9+
from honeybee.model import Model
910
from honeybee.room import Room
1011

1112
from honeybee_energy.construction.window import WindowConstruction
@@ -28,6 +29,17 @@
2829
DOOR = "door"
2930
WIN = "win"
3031

32+
def view_boundaries(building: Model):
33+
"""check boundary conditions"""
34+
for element in building:
35+
for _face in element.faces:
36+
message = f"id: {_face.identifier} type: {type(_face.type)}"
37+
LOGGER.info(message)
38+
message = f"bc: {_face.boundary_condition}"
39+
LOGGER.info(message)
40+
message = f"material: {_face.properties.energy.construction.identifier}"
41+
LOGGER.info(message)
42+
3143
def box_room(
3244
name,
3345
width=WIDTH,

0 commit comments

Comments
 (0)