From 60d4054db3b4a585c06b9d789a682e05c392b7a5 Mon Sep 17 00:00:00 2001 From: JavierCladellas Date: Wed, 29 Nov 2023 09:28:16 +0100 Subject: [PATCH] Don't remove points from material names #17 --- .../IFC_MultiZoneBuildings_Modelica/Filters/Filter01.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CoTeTo_Generators/IFC_MultiZoneBuildings_Modelica/Filters/Filter01.py b/CoTeTo_Generators/IFC_MultiZoneBuildings_Modelica/Filters/Filter01.py index ad55141..2f9acdd 100644 --- a/CoTeTo_Generators/IFC_MultiZoneBuildings_Modelica/Filters/Filter01.py +++ b/CoTeTo_Generators/IFC_MultiZoneBuildings_Modelica/Filters/Filter01.py @@ -276,7 +276,7 @@ def browsePropertySet(ps,mat): k = prop["k"] if "k" in prop else None c = prop["Cp"] if "Cp" in prop else None d = prop["rho"] if "rho" in prop else None - buildingData.addMaterial(bdm.Material(name=re.sub('[^0-9a-zA-Z_]', '', mat.Name), density=d, capacity=c, conductivity=k)) + buildingData.addMaterial(bdm.Material(name=re.sub('[^0-9a-zA-Z_.]', '', mat.Name), density=d, capacity=c, conductivity=k)) ## Construction types for con in MaterialLayerset.items(): @@ -288,7 +288,7 @@ def browsePropertySet(ps,mat): thickness.append(layer.Thickness/1000.0) else: # length unit in the IFC file in m thickness.append(layer.Thickness) - material.append(re.sub('[^0-9a-zA-Z_]', '',layer.Material.Name)) + material.append(re.sub('[^0-9a-zA-Z_.]', '',layer.Material.Name)) #material.append("BuildingSystems.HAM.Data.MaterialProperties.Thermal.Masea.Concrete") buildingData.addConstruction(bdm.Construction(name="Construction"+str(ico), numberOfLayers=len(con[1]),