mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 19:26:23 +00:00
util.schema.is_a - use c++ implementation
This commit is contained in:
@@ -80,12 +80,7 @@ def is_a(declaration: ifcopenshell.ifcopenshell_wrapper.entity, ifc_class: str)
|
|||||||
declaration = ifcopenshell.util.schema.get_declaration(wall)
|
declaration = ifcopenshell.util.schema.get_declaration(wall)
|
||||||
ifcopenshell.util.schema.is_a(declaration, "IfcRoot") # True
|
ifcopenshell.util.schema.is_a(declaration, "IfcRoot") # True
|
||||||
"""
|
"""
|
||||||
ifc_class = ifc_class.upper()
|
return declaration._is(ifc_class)
|
||||||
if declaration.name_uc() == ifc_class:
|
|
||||||
return True
|
|
||||||
if declaration.supertype():
|
|
||||||
return is_a(declaration.supertype(), ifc_class)
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def get_supertypes(
|
def get_supertypes(
|
||||||
|
|||||||
Reference in New Issue
Block a user