From 1f68c3f6127b29a4c821cce7058c88ff611a983a Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 9 Mar 2021 12:51:18 +1100 Subject: [PATCH] Fix bug where you could not assign a related window or door type. --- src/ifcblenderexport/generate_util_type_json.py | 2 +- .../ifcopenshell/util/entity_to_type_map_4.json | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ifcblenderexport/generate_util_type_json.py b/src/ifcblenderexport/generate_util_type_json.py index 1992878ca5..35a0cba617 100644 --- a/src/ifcblenderexport/generate_util_type_json.py +++ b/src/ifcblenderexport/generate_util_type_json.py @@ -20,7 +20,7 @@ with open(filepath) as fp: entity = line[len("ENTITY ") : -1] elif "END_ENTITY" in line: is_in_where_rule = False - elif entity and "CorrectTypeAssigned" in line: + elif entity and ("CorrectTypeAssigned" in line or "CorrectStyleAssigned" in line): is_in_where_rule = True elif entity and is_in_where_rule and "IN TYPEOF" in line and "RelatingType" in line: type_class = line.split("'")[1].split(".")[1] diff --git a/src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_4.json b/src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_4.json index 23b5a2b0bd..6321d3df56 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_4.json +++ b/src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_4.json @@ -89,6 +89,9 @@ "IfcDistributionChamberElement": [ "IFCDISTRIBUTIONCHAMBERELEMENTTYPE" ], + "IfcDoor": [ + "IFCDOORTYPE" + ], "IfcDuctFitting": [ "IFCDUCTFITTINGTYPE" ], @@ -302,12 +305,18 @@ "IfcWasteTerminal": [ "IFCWASTETERMINALTYPE" ], + "IfcWindow": [ + "IFCWINDOWTYPE" + ], "IfcBeamStandardCase": [ "IFCBEAMTYPE" ], "IfcColumnStandardCase": [ "IFCCOLUMNTYPE" ], + "IfcDoorStandardCase": [ + "IFCDOORTYPE" + ], "IfcMemberStandardCase": [ "IFCMEMBERTYPE" ], @@ -325,5 +334,8 @@ ], "IfcWallStandardCase": [ "IFCWALLTYPE" + ], + "IfcWindowStandardCase": [ + "IFCWINDOWTYPE" ] } \ No newline at end of file