mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
@@ -73,7 +73,7 @@ def get_pset(element, name, prop=None, should_inherit=True):
|
||||
break
|
||||
|
||||
if not pset and not type_pset:
|
||||
return {}
|
||||
return
|
||||
|
||||
if not prop:
|
||||
if type_pset:
|
||||
@@ -84,10 +84,8 @@ def get_pset(element, name, prop=None, should_inherit=True):
|
||||
return get_property_definition(pset)
|
||||
|
||||
value = get_property_definition(pset, prop)
|
||||
if type_pset:
|
||||
type_value = get_property_definition(type_pset, prop)
|
||||
if value is None and type_value is not None:
|
||||
return type_value
|
||||
if value is None and type_pset is not None:
|
||||
return type_pset
|
||||
return value
|
||||
|
||||
def get_psets(element, psets_only=False, qtos_only=False, should_inherit=True):
|
||||
|
||||
@@ -272,11 +272,13 @@ class Selector:
|
||||
value = ifcopenshell.util.element.get_container(value)
|
||||
elif key == "class":
|
||||
value = value.is_a()
|
||||
elif key == "id":
|
||||
value = value.id()
|
||||
elif isinstance(value, ifcopenshell.entity_instance):
|
||||
if key == "Name" and value.is_a("IfcMaterialLayerSet"):
|
||||
key = "LayerSetName" # This oddity in the IFC spec is annoying so we account for it.
|
||||
|
||||
attribute = value.get_info().get(key, None)
|
||||
attribute = getattr(value, key, None)
|
||||
|
||||
if attribute is not None:
|
||||
value = attribute
|
||||
|
||||
Reference in New Issue
Block a user