Spaces:
Sleeping
Sleeping
Update app/components.py
Browse files- app/components.py +6 -2
app/components.py
CHANGED
@@ -248,8 +248,12 @@ def display_component_tab(comp_type: str):
|
|
248 |
if "material" in first_layer:
|
249 |
material_data = get_material_data(first_layer["material"])
|
250 |
if material_data:
|
251 |
-
|
252 |
-
|
|
|
|
|
|
|
|
|
253 |
|
254 |
else: # Windows, skylights
|
255 |
# For fenestrations, we need to select a parent component
|
|
|
248 |
if "material" in first_layer:
|
249 |
material_data = get_material_data(first_layer["material"])
|
250 |
if material_data:
|
251 |
+
if isinstance(material_data, Material):
|
252 |
+
absorptivity = material_data.absorptivity
|
253 |
+
emissivity = material_data.emissivity
|
254 |
+
else:
|
255 |
+
absorptivity = material_data.get("absorptivity", 0.7)
|
256 |
+
emissivity = material_data.get("emissivity", 0.9)
|
257 |
|
258 |
else: # Windows, skylights
|
259 |
# For fenestrations, we need to select a parent component
|