mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
getInverse -> get_inverses_by_declaration
Similar to getTotalInverses rename, to prevent confusing with get_inverse.
This commit is contained in:
@@ -878,7 +878,18 @@ class file:
|
|||||||
"""Internal IfcFile pointer address."""
|
"""Internal IfcFile pointer address."""
|
||||||
...
|
...
|
||||||
|
|
||||||
def getInverse(self, instance_id, type, attribute_index): ...
|
def get_inverses_by_declaration(
|
||||||
|
self, instance_id: int, type: declaration, attribute_index: int
|
||||||
|
) -> tuple[entity_instance, ...]:
|
||||||
|
"""Get instance inverses of the particular type defined by ``declaration``.
|
||||||
|
|
||||||
|
:param declaration: Type of inverses to find.
|
||||||
|
Supertypes are also supported - e.g. 'IfcRoot' will also include all 'IfcRelationship' inverses.
|
||||||
|
:param attribute_index: Find references only from the provided attribute index.
|
||||||
|
Could be set to ``-1`` to consider all attributes.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
def getMaxId(self): ...
|
def getMaxId(self): ...
|
||||||
def get_total_inverses_by_id(self, instance_id: int) -> int: ...
|
def get_total_inverses_by_id(self, instance_id: int) -> int: ...
|
||||||
def getUnit(self, unit_type): ...
|
def getUnit(self, unit_type): ...
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ private:
|
|||||||
%rename("by_id") instance_by_id;
|
%rename("by_id") instance_by_id;
|
||||||
%rename("by_type") instances_by_type;
|
%rename("by_type") instances_by_type;
|
||||||
%rename("by_type_excl_subtypes") instances_by_type_excl_subtypes;
|
%rename("by_type_excl_subtypes") instances_by_type_excl_subtypes;
|
||||||
|
%rename("get_inverses_by_declaration") getInverse;
|
||||||
%rename("get_total_inverses_by_id") getTotalInverses;
|
%rename("get_total_inverses_by_id") getTotalInverses;
|
||||||
%rename("entity_instance") IfcBaseClass;
|
%rename("entity_instance") IfcBaseClass;
|
||||||
%rename("file") IfcFile;
|
%rename("file") IfcFile;
|
||||||
|
|||||||
Reference in New Issue
Block a user