mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
typing
This commit is contained in:
@@ -359,7 +359,6 @@ class file:
|
||||
of those methods.
|
||||
|
||||
:param type: Case insensitive name of the IFC class
|
||||
:type type: string
|
||||
:param args: The positional arguments of the IFC class
|
||||
:param kwargs: The keyword arguments of the IFC class
|
||||
:returns: An entity instance
|
||||
@@ -482,12 +481,10 @@ class file:
|
||||
"""Return an IFC entity instance filtered by IFC ID.
|
||||
|
||||
:param id: STEP numerical identifier
|
||||
:type id: int
|
||||
|
||||
:raises RuntimeError: If `id` is not found.
|
||||
|
||||
:returns: An ifcopenshell.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
"""
|
||||
return self[id]
|
||||
|
||||
@@ -495,13 +492,10 @@ class file:
|
||||
"""Return an IFC entity instance filtered by IFC GUID.
|
||||
|
||||
:param guid: GlobalId value in 22-character encoded form
|
||||
:type guid: string
|
||||
|
||||
:raises RuntimeError: If `guid` is not found.
|
||||
|
||||
:returns: An ifcopenshell.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
"""
|
||||
return self[guid]
|
||||
|
||||
@@ -510,9 +504,7 @@ class file:
|
||||
If the entity already exists, it is not re-added. Existence of entity is checked by it's `.identity()`.
|
||||
|
||||
:param inst: The entity instance to add
|
||||
:type inst: ifcopenshell.entity_instance
|
||||
:returns: An ifcopenshell.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
"""
|
||||
|
||||
if self.transaction:
|
||||
@@ -530,14 +522,11 @@ class file:
|
||||
If an IFC type class has subclasses, all entities of those subclasses are also returned.
|
||||
|
||||
:param type: The case insensitive type of IFC class to return.
|
||||
:type type: string
|
||||
:param include_subtypes: Whether or not to return subtypes of the IFC class
|
||||
:type include_subtypes: bool
|
||||
|
||||
:raises RuntimeError: If `type` is not found in IFC schema.
|
||||
|
||||
:returns: A list of ifcopenshell.entity_instance objects
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
if include_subtypes:
|
||||
return [entity_instance(e, self) for e in self.wrapped_data.by_type(type)]
|
||||
@@ -625,9 +614,7 @@ class file:
|
||||
significantly faster.
|
||||
|
||||
:param inst: The entity instance to get inverse relationships
|
||||
:type inst: ifcopenshell.entity_instance
|
||||
:returns: The total number of references
|
||||
:rtype: int
|
||||
"""
|
||||
return self.wrapped_data.get_total_inverses(inst.wrapped_data)
|
||||
|
||||
@@ -639,8 +626,6 @@ class file:
|
||||
the reference to the deleted will be removed from the aggregate.
|
||||
|
||||
:param inst: The entity instance to delete
|
||||
:type inst: ifcopenshell.entity_instance
|
||||
:rtype: None
|
||||
"""
|
||||
if self.transaction:
|
||||
self.transaction.store_delete(inst)
|
||||
@@ -676,9 +661,7 @@ class file:
|
||||
if None. Supported formats : .ifc, .ifcXML, .ifcZIP (equivalent to
|
||||
format=".ifc" with zipped=True) For zipped .ifcXML use
|
||||
format=".ifcXML" with zipped=True
|
||||
:type format: str
|
||||
:param zipped: zip the file after it is written
|
||||
:type zipped: bool
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user