@@ -42,6 +42,12 @@ def display():
42
42
'(meaning that their wireframe in certain platforms might not appear ideal). '
43
43
'Also, merging the geometry into a single mesh means interfaces cannot support '
44
44
'the selection of individual Face3D geometries.' , default = True , show_default = True )
45
+ @click .option (
46
+ '--show-color-by/--hide-color-by' , ' /-hcb' , help = 'Flag to note whether the '
47
+ 'color-by geometry should be hidden or shown by default. Hiding the color-by '
48
+ 'geometry is useful when the primary purpose of the visualization is to display '
49
+ 'grid-data or room/face attributes but it is still desirable to have the option '
50
+ 'to turn on the geometry.' , default = True , show_default = True )
45
51
@click .option (
46
52
'--room-attr' , '-r' , help = 'An optional text string of an attribute that the Model '
47
53
'Rooms have, which will be used to construct a visualization of this attribute '
@@ -97,17 +103,19 @@ def display():
97
103
'the config object. By default, it will be printed out to stdout' ,
98
104
type = click .File ('w' ), default = '-' , show_default = True )
99
105
def model_to_vis_set (
100
- model_file , color_by , wireframe , mesh , room_attr , face_attr , color_attr ,
106
+ model_file , color_by , wireframe , mesh , show_color_by ,
107
+ room_attr , face_attr , color_attr ,
101
108
grid_data , grid_display_mode , output_format , output_file ):
102
109
"""Get a JSON object with all configuration information"""
103
110
try :
104
111
model_obj = Model .from_file (model_file )
105
112
room_attr = None if len (room_attr ) == 0 or room_attr [0 ] == '' else room_attr
106
113
face_attr = None if len (face_attr ) == 0 or face_attr [0 ] == '' else face_attr
107
114
text_labels = not color_attr
115
+ hide_color_by = not show_color_by
108
116
vis_set = model_obj .to_vis_set (
109
117
color_by = color_by , include_wireframe = wireframe , use_mesh = mesh ,
110
- room_attr = room_attr , face_attr = face_attr ,
118
+ hide_color_by = hide_color_by , room_attr = room_attr , face_attr = face_attr ,
111
119
room_text_labels = text_labels , face_text_labels = text_labels ,
112
120
grid_data_path = grid_data , grid_display_mode = grid_display_mode )
113
121
output_format = output_format .lower ()
0 commit comments