Fix validation errors in IFC2X3 with missing ownership and mandatory attributes

This commit is contained in:
Dion Moult
2021-06-23 10:35:13 +10:00
parent 6ecedaa128
commit 1071ac00d4
3 changed files with 26 additions and 3 deletions
@@ -28,4 +28,12 @@ class Usecase:
element.ObjectType = self.settings["predefined_type"]
elif hasattr(element, "ObjectType"):
element.ObjectType = self.settings["predefined_type"]
if self.file.schema == "IFC2X3":
self.handle_2x3_defaults(element)
return element
def handle_2x3_defaults(self, element):
if element.is_a("IfcSpatialStructureElement"):
element.CompositionType = "ELEMENT"
elif element.is_a("IfcRoof"):
element.ShapeType = "NOTDEFINED"