Skip to content

Commit 8cd657a

Browse files
committed
fix(visualize): Separate mullion edges from frame edges
1 parent ceca78e commit 8cd657a

3 files changed

Lines changed: 54 additions & 13 deletions

File tree

honeybee_grasshopper_core/json/HB_Envelope_Edges.json

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
11
{
2-
"version": "1.9.0",
2+
"version": "1.9.1",
33
"nickname": "EnvelopeEdges",
44
"outputs": [
55
[
66
{
77
"access": "None",
8-
"name": "ext_apertures",
9-
"description": "A list of line segments for the borders around exterior apertures.",
8+
"name": "aperture_frames",
9+
"description": "A list of line segments for where exterior apertures meet\ntheir parent exterior wall or roof.",
1010
"type": null,
1111
"default": null
1212
},
1313
{
1414
"access": "None",
15-
"name": "ext_doors",
16-
"description": "A list of line segments for the borders around exterior doors.",
15+
"name": "aperture_mullions",
16+
"description": "A list of line segments for where exterior apertures meet\none another.",
17+
"type": null,
18+
"default": null
19+
},
20+
{
21+
"access": "None",
22+
"name": "door_frames",
23+
"description": "A list of line segments for where exterior doors meet their\nparent exterior wall or roof.",
24+
"type": null,
25+
"default": null
26+
},
27+
{
28+
"access": "None",
29+
"name": "door_mullions",
30+
"description": "A list of line segments for where exterior doors meet one another.",
1731
"type": null,
1832
"default": null
1933
},
@@ -79,13 +93,20 @@
7993
{
8094
"access": "item",
8195
"name": "ex_coplanar_",
82-
"description": "Boolean to note whether edges falling between two coplanar Faces\nin the building envelope should be included in the result (False) or\nexcluded from it (True). (Default: False).",
96+
"description": "Boolean to note whether edges falling between two coplanar Faces\nin the building envelope should be included in the result (False) or\nexcluded from it (True). (Default: True).",
8397
"type": "bool",
8498
"default": null
99+
},
100+
{
101+
"access": "item",
102+
"name": "mullion_thick_",
103+
"description": "The maximum difference that apertures or doors can be from\none another for the edges to be considered a mullion rather than\na frame. If None, all edges of apertures and doors will be considered\nframes rather than mullions.",
104+
"type": "double",
105+
"default": null
85106
}
86107
],
87108
"subcategory": "1 :: Visualize",
88-
"code": "\ntry: # import the core honeybee dependencies\n from honeybee.model import Model\nexcept ImportError as e:\n raise ImportError('\\nFailed to import honeybee:\\n\\t{}'.format(e))\n\ntry: # import the ladybug_{{cad}} dependencies\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs\n from ladybug_{{cad}}.fromgeometry import from_linesegment3d\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\n\nif all_required_inputs(ghenv.Component):\n # get the edges of the envelope components\n assert isinstance(_model, Model), 'Expected Honeybee Model. Got {}.'.format(type(_model))\n roofs_to_walls, slabs_to_walls, exp_floors_to_walls, ext_walls_to_walls, \\\n roof_ridges, exp_floors_to_floors, underground = \\\n _model.classified_envelope_edges(exclude_coplanar=ex_coplanar_)\n\n # translate edges to {{Cad}} lines\n ext_apertures = [from_linesegment3d(lin) for lin in _model.exterior_aperture_edges]\n ext_doors = [from_linesegment3d(lin) for lin in _model.exterior_door_edges]\n roofs_to_walls = [from_linesegment3d(lin) for lin in roofs_to_walls]\n slabs_to_walls = [from_linesegment3d(lin) for lin in slabs_to_walls]\n exp_floors_to_walls = [from_linesegment3d(lin) for lin in exp_floors_to_walls]\n ext_walls_to_walls = [from_linesegment3d(lin) for lin in ext_walls_to_walls]\n roof_ridges = [from_linesegment3d(lin) for lin in roof_ridges]\n exp_floors_to_floors = [from_linesegment3d(lin) for lin in exp_floors_to_floors]\n underground = [from_linesegment3d(lin) for lin in underground]\n",
109+
"code": "\ntry: # import the core honeybee dependencies\n from honeybee.model import Model\nexcept ImportError as e:\n raise ImportError('\\nFailed to import honeybee:\\n\\t{}'.format(e))\n\ntry: # import the ladybug_{{cad}} dependencies\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs\n from ladybug_{{cad}}.fromgeometry import from_linesegment3d\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\n\nif all_required_inputs(ghenv.Component):\n # get the edges of the envelope components\n assert isinstance(_model, Model), 'Expected Honeybee Model. Got {}.'.format(type(_model))\n ex_coplanar_ = True if ex_coplanar_ is None else ex_coplanar_\n roofs_to_walls, slabs_to_walls, exp_floors_to_walls, ext_walls_to_walls, \\\n roof_ridges, exp_floors_to_floors, underground = \\\n _model.classified_envelope_edges(exclude_coplanar=ex_coplanar_)\n if mullion_thick_ is not None:\n aperture_frames, aperture_mullions, door_frames, door_mullions = \\\n _model.classified_sub_face_edges(mullion_thickness=mullion_thick_)\n else:\n aperture_frames = _model.exterior_aperture_edges\n aperture_mullions = []\n door_frames = _model.exterior_door_edges\n door_mullions = []\n\n # translate edges to {{Cad}} lines\n aperture_frames = [from_linesegment3d(lin) for lin in aperture_frames]\n aperture_mullions = [from_linesegment3d(lin) for lin in aperture_mullions]\n door_frames = [from_linesegment3d(lin) for lin in door_frames]\n door_mullions = [from_linesegment3d(lin) for lin in door_mullions]\n roofs_to_walls = [from_linesegment3d(lin) for lin in roofs_to_walls]\n slabs_to_walls = [from_linesegment3d(lin) for lin in slabs_to_walls]\n exp_floors_to_walls = [from_linesegment3d(lin) for lin in exp_floors_to_walls]\n ext_walls_to_walls = [from_linesegment3d(lin) for lin in ext_walls_to_walls]\n roof_ridges = [from_linesegment3d(lin) for lin in roof_ridges]\n exp_floors_to_floors = [from_linesegment3d(lin) for lin in exp_floors_to_floors]\n underground = [from_linesegment3d(lin) for lin in underground]\n",
89110
"category": "Honeybee",
90111
"name": "HB Envelope Edges",
91112
"description": "Get the edges of a Model's envelope grouped based on the objects they adjoin.\n_\nThe edges returned by this component will only exist along the exterior\nenvelope of the Model's rooms as defined by the contiguous volume across\nall interior adjacencies. In this way, edges that adjoin two honeybee rooms\nwill only be represented once in the list (and not twice for the two rooms).\n_\nThe lengths of the resulting edges are useful for evaluating thermal bridges\nacross the model.\n-"

honeybee_grasshopper_core/src/HB Envelope Edges.py

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,20 @@
2323
_model: A honeybee Model with rooms for which adjacencies have been solved.
2424
ex_coplanar_: Boolean to note whether edges falling between two coplanar Faces
2525
in the building envelope should be included in the result (False) or
26-
excluded from it (True). (Default: False).
26+
excluded from it (True). (Default: True).
27+
mullion_thick_: The maximum difference that apertures or doors can be from
28+
one another for the edges to be considered a mullion rather than
29+
a frame. If None, all edges of apertures and doors will be considered
30+
frames rather than mullions.
2731
2832
Returns:
29-
ext_apertures: A list of line segments for the borders around exterior apertures.
30-
ext_doors: A list of line segments for the borders around exterior doors.
33+
aperture_frames: A list of line segments for where exterior apertures meet
34+
their parent exterior wall or roof.
35+
aperture_mullions: A list of line segments for where exterior apertures meet
36+
one another.
37+
door_frames: A list of line segments for where exterior doors meet their
38+
parent exterior wall or roof.
39+
door_mullions: A list of line segments for where exterior doors meet one another.
3140
roofs_to_walls: A list of line segments where roofs meet exterior walls (or floors).
3241
Note that both the roof Face and the wall/floor Face must be next to one
3342
another in the model's outer envelope and have outdoor boundary conditions for
@@ -60,7 +69,7 @@
6069

6170
ghenv.Component.Name = 'HB Envelope Edges'
6271
ghenv.Component.NickName = 'EnvelopeEdges'
63-
ghenv.Component.Message = '1.9.0'
72+
ghenv.Component.Message = '1.9.1'
6473
ghenv.Component.Category = 'Honeybee'
6574
ghenv.Component.SubCategory = '1 :: Visualize'
6675
ghenv.Component.AdditionalHelpFromDocStrings = '0'
@@ -81,13 +90,24 @@
8190
if all_required_inputs(ghenv.Component):
8291
# get the edges of the envelope components
8392
assert isinstance(_model, Model), 'Expected Honeybee Model. Got {}.'.format(type(_model))
93+
ex_coplanar_ = True if ex_coplanar_ is None else ex_coplanar_
8494
roofs_to_walls, slabs_to_walls, exp_floors_to_walls, ext_walls_to_walls, \
8595
roof_ridges, exp_floors_to_floors, underground = \
8696
_model.classified_envelope_edges(exclude_coplanar=ex_coplanar_)
97+
if mullion_thick_ is not None:
98+
aperture_frames, aperture_mullions, door_frames, door_mullions = \
99+
_model.classified_sub_face_edges(mullion_thickness=mullion_thick_)
100+
else:
101+
aperture_frames = _model.exterior_aperture_edges
102+
aperture_mullions = []
103+
door_frames = _model.exterior_door_edges
104+
door_mullions = []
87105

88106
# translate edges to Rhino lines
89-
ext_apertures = [from_linesegment3d(lin) for lin in _model.exterior_aperture_edges]
90-
ext_doors = [from_linesegment3d(lin) for lin in _model.exterior_door_edges]
107+
aperture_frames = [from_linesegment3d(lin) for lin in aperture_frames]
108+
aperture_mullions = [from_linesegment3d(lin) for lin in aperture_mullions]
109+
door_frames = [from_linesegment3d(lin) for lin in door_frames]
110+
door_mullions = [from_linesegment3d(lin) for lin in door_mullions]
91111
roofs_to_walls = [from_linesegment3d(lin) for lin in roofs_to_walls]
92112
slabs_to_walls = [from_linesegment3d(lin) for lin in slabs_to_walls]
93113
exp_floors_to_walls = [from_linesegment3d(lin) for lin in exp_floors_to_walls]
475 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)