mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +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")
|
declaration = tool.Ifc.schema().declaration_by_name("IfcElementType")
|
||||||
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
||||||
names = [d.name() for d in declarations]
|
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()
|
version = tool.Ifc.get_schema()
|
||||||
return [(c, c, get_entity_doc(version, c).get("description", "")) for c in sorted(names)]
|
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):
|
def regenerate_from_type(self, usecase_path, ifc_file, settings):
|
||||||
filling = settings["related_object"]
|
filling = settings["related_object"]
|
||||||
if not filling.FillsVoids:
|
if not getattr(filling, "FillsVoids", None):
|
||||||
return
|
return
|
||||||
|
|
||||||
opening = filling.FillsVoids[0].RelatingOpeningElement
|
opening = filling.FillsVoids[0].RelatingOpeningElement
|
||||||
|
|||||||
Reference in New Issue
Block a user