mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Simplify get model types to just got all type products. Fixes failing test.
This commit is contained in:
@@ -75,16 +75,7 @@ class Type(bonsai.core.tool.Type):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_model_types(cls) -> list[ifcopenshell.entity_instance]:
|
def get_model_types(cls) -> list[ifcopenshell.entity_instance]:
|
||||||
ifc_file = tool.Ifc.get()
|
return tool.Ifc.get().by_type("IfcTypeProduct")
|
||||||
types = ifc_file.by_type("IfcElementType")
|
|
||||||
if tool.Ifc.get_schema() == "IFC2X3":
|
|
||||||
types += ifc_file.by_type("IfcWindowStyle")
|
|
||||||
types += ifc_file.by_type("IfcDoorStyle")
|
|
||||||
types += ifc_file.by_type("IfcSpatialStructureElementType")
|
|
||||||
else:
|
|
||||||
types += ifc_file.by_type("IfcSpatialElementType")
|
|
||||||
types += ifc_file.by_type("IfcTypeProduct", include_subtypes=False)
|
|
||||||
return types
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_object_data(cls, obj: bpy.types.Object) -> Union[bpy.types.ID, None]:
|
def get_object_data(cls, obj: bpy.types.Object) -> Union[bpy.types.ID, None]:
|
||||||
|
|||||||
Reference in New Issue
Block a user