Invalid annotation contexts coming from Revit are now accepted

This commit is contained in:
Dion Moult
2021-10-30 22:10:37 +11:00
parent bc430b80f6
commit b118400cc6
+5 -1
View File
@@ -280,8 +280,12 @@ class IfcImporter:
]
if self.body_contexts:
self.settings.set_context_ids(self.body_contexts)
# Annotation is to accommodate broken Revit files
# See https://github.com/Autodesk/revit-ifc/issues/187
self.plan_contexts = [
c.id() for c in self.file.by_type("IfcGeometricRepresentationContext") if c.ContextType == "Plan"
c.id()
for c in self.file.by_type("IfcGeometricRepresentationContext")
if c.ContextType in ["Plan", "Annotation"]
]
if self.plan_contexts:
self.settings_2d.set_context_ids(self.plan_contexts)