mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 01:47:55 +00:00
Invalid annotation contexts coming from Revit are now accepted
This commit is contained in:
@@ -280,8 +280,12 @@ class IfcImporter:
|
|||||||
]
|
]
|
||||||
if self.body_contexts:
|
if self.body_contexts:
|
||||||
self.settings.set_context_ids(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 = [
|
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:
|
if self.plan_contexts:
|
||||||
self.settings_2d.set_context_ids(self.plan_contexts)
|
self.settings_2d.set_context_ids(self.plan_contexts)
|
||||||
|
|||||||
Reference in New Issue
Block a user