@@ -35,9 +35,9 @@ def display():
35
35
'generated Honeybee Room objects or if full geometry objects should be '
36
36
'written for each story in the building.' , default = True , show_default = True )
37
37
@click .option (
38
- '--no- plenum/--plenum' , ' /-p ' , help = 'Flag to indicate whether '
39
- 'ceiling/floor plenums should be auto-generated for the Rooms.' ,
40
- default = True , show_default = True )
38
+ '--plenum/--no- plenum' , '-p/-np ' , help = 'Flag to indicate whether '
39
+ 'ceiling/floor plenum depths assigned to Room2Ds should generate '
40
+ 'distinct 3D Rooms in the translation.' , default = True , show_default = True )
41
41
@click .option (
42
42
'--no-ceil-adjacency/--ceil-adjacency' , ' /-a' , help = 'Flag to indicate '
43
43
'whether adjacencies should be solved between interior stories when '
@@ -118,7 +118,7 @@ def display():
118
118
'file contents. By default, it will be printed out to stdout.' ,
119
119
type = click .File ('w' ), default = '-' , show_default = True )
120
120
def model_to_vis_set_cli (
121
- model_file , multiplier , no_plenum , no_ceil_adjacency ,
121
+ model_file , multiplier , plenum , no_ceil_adjacency ,
122
122
color_by , wireframe , mesh , show_color_by ,
123
123
room_attr , face_attr , color_attr , grid_display_mode , show_grid ,
124
124
output_format , output_file ):
@@ -134,7 +134,7 @@ def model_to_vis_set_cli(
134
134
try :
135
135
# process all of the CLI input so that it can be passed to the function
136
136
full_geometry = not multiplier
137
- add_plenum = not no_plenum
137
+ no_plenum = not plenum
138
138
ceil_adjacency = not no_ceil_adjacency
139
139
exclude_wireframe = not wireframe
140
140
faces = not mesh
@@ -145,7 +145,7 @@ def model_to_vis_set_cli(
145
145
hide_grid = not show_grid
146
146
147
147
# pass the input to the function in order to convert the model
148
- model_to_vis_set (model_file , full_geometry , add_plenum , ceil_adjacency , color_by ,
148
+ model_to_vis_set (model_file , full_geometry , no_plenum , ceil_adjacency , color_by ,
149
149
exclude_wireframe , faces , hide_color_by ,
150
150
room_attrs , face_attrs , text_labels , grid_display_mode ,
151
151
hide_grid , output_format , output_file )
@@ -157,11 +157,11 @@ def model_to_vis_set_cli(
157
157
158
158
159
159
def model_to_vis_set (
160
- model_file , full_geometry = False , plenum = False , ceil_adjacency = False ,
160
+ model_file , full_geometry = False , no_plenum = False , ceil_adjacency = False ,
161
161
color_by = 'type' , exclude_wireframe = False , faces = False , hide_color_by = False ,
162
162
room_attr = (), face_attr = (), text_attr = False , grid_display_mode = 'Default' ,
163
163
hide_grid = False , output_format = 'vsf' , output_file = None ,
164
- multiplier = True , no_plenum = True , no_ceil_adjacency = True , wireframe = True , mesh = True ,
164
+ multiplier = True , plenum = True , no_ceil_adjacency = True , wireframe = True , mesh = True ,
165
165
show_color_by = True , color_attr = True , show_grid = True
166
166
):
167
167
"""Translate a Dragonfly Model file (.dfjson) to a VisualizationSet file (.vsf).
@@ -174,8 +174,9 @@ def model_to_vis_set(
174
174
full_geometry: Boolean to note if the multipliers on each Story should
175
175
be passed along to the generated Honeybee Room objects or if full
176
176
geometry objects should be written for each story in the building.
177
- plenum: Boolean to indicate whether ceiling/floor plenums should
178
- be auto-generated for the Rooms. (Default: False).
177
+ no_plenum: Boolean to indicate whether ceiling/floor plenum depths
178
+ assigned to Room2Ds should generate distinct 3D Rooms in the
179
+ translation. (Default: False).
179
180
ceil_adjacency: Boolean to indicate whether adjacencies should be solved
180
181
between interior stories when Room2D floor and ceiling geometries
181
182
are coplanar. This ensures that Surface boundary conditions are used
@@ -259,7 +260,7 @@ def model_to_vis_set(
259
260
# create the VisualizationSet
260
261
multiplier = not full_geometry
261
262
vis_set = model_obj .to_vis_set (
262
- multiplier , plenum , ceil_adjacency , color_by = color_by ,
263
+ multiplier , no_plenum , ceil_adjacency , color_by = color_by ,
263
264
include_wireframe = wireframe , use_mesh = mesh , hide_color_by = hide_color_by ,
264
265
room_attrs = room_attributes , face_attrs = face_attributes ,
265
266
grid_display_mode = grid_display_mode , hide_grid = hide_grid )
@@ -279,9 +280,9 @@ def model_to_vis_set(
279
280
'generated Honeybee Room objects or if full geometry objects should be '
280
281
'written for each story in the building.' , default = True , show_default = True )
281
282
@click .option (
282
- '--no- plenum/--plenum' , ' /-p ' , help = 'Flag to indicate whether '
283
- 'ceiling/floor plenums should be auto-generated for the Rooms.' ,
284
- default = True , show_default = True )
283
+ '--plenum/--no- plenum' , '-p/-np ' , help = 'Flag to indicate whether '
284
+ 'ceiling/floor plenum depths assigned to Room2Ds should generate '
285
+ 'distinct 3D Rooms in the translation.' , default = True , show_default = True )
285
286
@click .option (
286
287
'--no-ceil-adjacency/--ceil-adjacency' , ' /-a' , help = 'Flag to indicate '
287
288
'whether adjacencies should be solved between interior stories when '
@@ -308,7 +309,7 @@ def model_to_vis_set(
308
309
'file contents. By default, it will be printed out to stdout' ,
309
310
type = click .File ('w' ), default = '-' , show_default = True )
310
311
def model_comparison_to_vis_set_cli (
311
- base_model_file , incoming_model_file , multiplier , no_plenum , no_ceil_adjacency ,
312
+ base_model_file , incoming_model_file , multiplier , plenum , no_ceil_adjacency ,
312
313
base_color , incoming_color , output_format , output_file ):
313
314
"""Translate two Dragonfly Models to be compared to a VisualizationSet.
314
315
@@ -327,12 +328,12 @@ def model_comparison_to_vis_set_cli(
327
328
try :
328
329
# process all of the CLI input so that it can be passed to the function
329
330
full_geometry = not multiplier
330
- add_plenum = not no_plenum
331
+ no_plenum = not plenum
331
332
ceil_adjacency = not no_ceil_adjacency
332
333
333
334
# pass the input to the function in order to convert the model
334
335
model_comparison_to_vis_set (
335
- base_model_file , incoming_model_file , full_geometry , add_plenum ,
336
+ base_model_file , incoming_model_file , full_geometry , no_plenum ,
336
337
ceil_adjacency , base_color , incoming_color , output_format , output_file )
337
338
except Exception as e :
338
339
_logger .exception ('Failed to translate Model to VisualizationSet.\n {}' .format (e ))
@@ -342,9 +343,10 @@ def model_comparison_to_vis_set_cli(
342
343
343
344
344
345
def model_comparison_to_vis_set (
345
- base_model_file , incoming_model_file , full_geometry = False , plenum = False ,
346
+ base_model_file , incoming_model_file , full_geometry = False , no_plenum = False ,
346
347
ceil_adjacency = False , base_color = '#74eded' , incoming_color = '#ed7474' ,
347
348
output_format = 'vsf' , output_file = None ,
349
+ multiplier = True , plenum = True , no_ceil_adjacency = True
348
350
):
349
351
"""Translate two Honeybee Models to be compared to a VisualizationSet.
350
352
@@ -361,8 +363,9 @@ def model_comparison_to_vis_set(
361
363
full_geometry: Boolean to note if the multipliers on each Story should
362
364
be passed along to the generated Honeybee Room objects or if full
363
365
geometry objects should be written for each story in the building.
364
- plenum: Boolean to indicate whether ceiling/floor plenums should
365
- be auto-generated for the Rooms. (Default: False).
366
+ no_plenum: Boolean to indicate whether ceiling/floor plenum depths
367
+ assigned to Room2Ds should generate distinct 3D Rooms in the
368
+ translation. (Default: False).
366
369
ceil_adjacency: Boolean to indicate whether adjacencies should be solved
367
370
between interior stories when Room2D floor and ceiling geometries
368
371
are coplanar. This ensures that Surface boundary conditions are used
@@ -394,7 +397,8 @@ def model_comparison_to_vis_set(
394
397
# create the VisualizationSet
395
398
multiplier = not full_geometry
396
399
vis_set = base_model .to_vis_set_comparison (
397
- incoming_model , multiplier , plenum , ceil_adjacency , base_color , incoming_color )
400
+ incoming_model , multiplier , no_plenum , ceil_adjacency ,
401
+ base_color , incoming_color )
398
402
399
403
# output the VisualizationSet through the CLI
400
404
return _output_vis_set_to_format (vis_set , output_format , output_file )
0 commit comments