mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Fix bug where you couldn't manage spatial types in the type manager
This commit is contained in:
@@ -68,7 +68,14 @@ class AuthoringData:
|
||||
declaration = tool.Ifc.schema().declaration_by_name("IfcElementType")
|
||||
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
||||
names = [d.name() for d in declarations]
|
||||
names.extend(("IfcDoorStyle", "IfcWindowStyle"))
|
||||
|
||||
declaration = tool.Ifc.schema().declaration_by_name("IfcSpatialElementType")
|
||||
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
||||
names.extend([d.name() for d in declarations])
|
||||
|
||||
if tool.Ifc.get_schema() in ("IFC2X3", "IFC4"):
|
||||
names.extend(("IfcDoorStyle", "IfcWindowStyle"))
|
||||
|
||||
version = tool.Ifc.get_schema()
|
||||
return [(c, c, get_entity_doc(version, c).get("description", "")) for c in sorted(names)]
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ class FilledOpeningGenerator:
|
||||
|
||||
def regenerate_from_type(self, usecase_path, ifc_file, settings):
|
||||
filling = settings["related_object"]
|
||||
if not filling.FillsVoids:
|
||||
if not getattr(filling, "FillsVoids", None):
|
||||
return
|
||||
|
||||
opening = filling.FillsVoids[0].RelatingOpeningElement
|
||||
|
||||
Reference in New Issue
Block a user