mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
entity_instance.__getattr__ - document some attributes conversion to Python
This commit is contained in:
@@ -181,6 +181,12 @@ class entity_instance:
|
|||||||
return file.from_pointer(self.wrapped_data.file_pointer())
|
return file.from_pointer(self.wrapped_data.file_pointer())
|
||||||
|
|
||||||
def __getattr__(self, name: str) -> Any:
|
def __getattr__(self, name: str) -> Any:
|
||||||
|
"""
|
||||||
|
Any aggregate attributes (e.g. `SET`) are returns as Python tuples.
|
||||||
|
|
||||||
|
Inverse attributes are always returned as tuples, even it's not a set origially in IFC
|
||||||
|
(e.g. IfcFeatureElementSubtraction.VoidsElements)
|
||||||
|
"""
|
||||||
INVALID, FORWARD, INVERSE = range(3)
|
INVALID, FORWARD, INVERSE = range(3)
|
||||||
attr_cat = self.wrapped_data.get_attribute_category(name)
|
attr_cat = self.wrapped_data.get_attribute_category(name)
|
||||||
if attr_cat == FORWARD:
|
if attr_cat == FORWARD:
|
||||||
|
|||||||
Reference in New Issue
Block a user