mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fix docstrings to reference datatype as it would be used for users
This commit is contained in:
@@ -42,11 +42,11 @@ class Usecase:
|
||||
IfcPerson if it is a sole individual, or an IfcPersonAndOrganization
|
||||
if a specific person is liable within an organisation and must be
|
||||
legally nominated.
|
||||
:type actor: ifcopenshell.entity_instance.entity_instance
|
||||
:type actor: ifcopenshell.entity_instance
|
||||
:param ifc_class: Either "IfcActor" or "IfcOccupant".
|
||||
:type ifc_class: str, optional
|
||||
:return: The newly created IfcActor or IfcOccupant
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@ class Usecase:
|
||||
|
||||
:param assigned_object: The IfcOrganization or IfcPerson the contact
|
||||
address belongs to.
|
||||
:type assigned_object: ifcopenshell.entity_instance.entity_instance
|
||||
:type assigned_object: ifcopenshell.entity_instance
|
||||
:param ifc_class: Either IfcPostalAddress or IfcTelecomAddress. Defaults
|
||||
to IfcPostalAddress.
|
||||
:type ifc_class: str, optional
|
||||
:return: The new IfcPostalAddress or IfcTelecomAddress
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class Usecase:
|
||||
:param application_developer: The IfcOrganization responsible for
|
||||
creating the application. Defaults to generating an IfcOpenShell
|
||||
organisation if none is provided.
|
||||
:type application_developer: ifcopenshell.entity_instance.entity_instance, optional
|
||||
:type application_developer: ifcopenshell.entity_instance, optional
|
||||
:param version: The version of the application. Defaults to the
|
||||
ifcopenshell.version data if not specified.
|
||||
:type version: str, optional
|
||||
|
||||
@@ -34,7 +34,7 @@ class Usecase:
|
||||
:param name: The legal name of the organisation
|
||||
:type name: str, optional
|
||||
:return: The newly created IfcOrganization
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class Usecase:
|
||||
:param given_name: The given name
|
||||
:type given_name: str, optional
|
||||
:return: The newly created IfcPerson
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@ class Usecase:
|
||||
|
||||
:param person: The IfcPerson being the representative of the
|
||||
organisation.
|
||||
:type person: ifcopenshell.entity_instance.entity_instance
|
||||
:type person: ifcopenshell.entity_instance
|
||||
:param organisation: The IfcOrganization itself.
|
||||
:type organisation: ifcopenshell.entity_instance.entity_instance
|
||||
:type organisation: ifcopenshell.entity_instance
|
||||
:return: The newly created IfcPersonAndOrganization
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ class Usecase:
|
||||
|
||||
:param assigned_object: The IfcPerson or IfcOrganization the role should
|
||||
be assigned to.
|
||||
:type assigned_object: ifcopenshell.entity_instance.entity_instance
|
||||
:type assigned_object: ifcopenshell.entity_instance
|
||||
:param role: The type of role, taken from the IFC documentation for
|
||||
IfcActorRole, or a custom name.
|
||||
:type role: str, optional
|
||||
:return: The newly created IfcActorRole
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -41,11 +41,11 @@ class Usecase:
|
||||
ifcopenshell.api.resource.assign_resource.
|
||||
|
||||
:param relating_actor: The IfcActor who is responsible for the object.
|
||||
:type relating_actor: ifcopenshell.entity_instance.entity_instance
|
||||
:type relating_actor: ifcopenshell.entity_instance
|
||||
:param related_object: The object the actor is responsible for.
|
||||
:type related_object: ifcopenshell.entity_instance.entity_instance
|
||||
:type related_object: ifcopenshell.entity_instance
|
||||
:return: The newly created IfcRelAssignsToActor relationship.
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class Usecase:
|
||||
|
||||
:return: The newly created IfcOwnerHistory element or `None` if it's
|
||||
not IFC2X3 and user or application is not found in the current project.
|
||||
:rtype: Union[ifcopenshell.entity_instance.entity_instance, None]
|
||||
:rtype: Union[ifcopenshell.entity_instance, None]
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
IfcActor, consult the IFC documentation.
|
||||
|
||||
:param actor: The IfcActor entity you want to edit
|
||||
:type actor: ifcopenshell.entity_instance.entity_instance
|
||||
:type actor: ifcopenshell.entity_instance
|
||||
:param attributes: a dictionary of attribute names and values.
|
||||
:type attributes: dict, optional
|
||||
:return: None
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
IfcAddress, consult the IFC documentation.
|
||||
|
||||
:param address: The IfcAddress entity you want to edit
|
||||
:type address: ifcopenshell.entity_instance.entity_instance
|
||||
:type address: ifcopenshell.entity_instance
|
||||
:param attributes: a dictionary of attribute names and values.
|
||||
:type attributes: dict, optional
|
||||
:return: None
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
IfcOrganization, consult the IFC documentation.
|
||||
|
||||
:param organisation: The IfcOrganization entity you want to edit
|
||||
:type organisation: ifcopenshell.entity_instance.entity_instance
|
||||
:type organisation: ifcopenshell.entity_instance
|
||||
:param attributes: a dictionary of attribute names and values.
|
||||
:type attributes: dict, optional
|
||||
:return: None
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
IfcPerson, consult the IFC documentation.
|
||||
|
||||
:param person: The IfcPerson entity you want to edit
|
||||
:type person: ifcopenshell.entity_instance.entity_instance
|
||||
:type person: ifcopenshell.entity_instance
|
||||
:param attributes: a dictionary of attribute names and values.
|
||||
:type attributes: dict, optional
|
||||
:return: None
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
IfcActorRole, consult the IFC documentation.
|
||||
|
||||
:param role: The IfcActorRole entity you want to edit
|
||||
:type role: ifcopenshell.entity_instance.entity_instance
|
||||
:type role: ifcopenshell.entity_instance
|
||||
:param attributes: a dictionary of attribute names and values.
|
||||
:type attributes: dict, optional
|
||||
:return: None
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
"""Removes an actor
|
||||
|
||||
:param actor: The IfcActor to remove.
|
||||
:type actor: ifcopenshell.entity_instance.entity_instance
|
||||
:type actor: ifcopenshell.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
relationship removed.
|
||||
|
||||
:param address: The IfcAddress to remove.
|
||||
:type address: ifcopenshell.entity_instance.entity_instance
|
||||
:type address: ifcopenshell.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
Check whether or not the application is used anywhere prior to removal.
|
||||
|
||||
:param address: The IfcApplication to remove.
|
||||
:type address: ifcopenshell.entity_instance.entity_instance
|
||||
:type address: ifcopenshell.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class Usecase:
|
||||
removed.
|
||||
|
||||
:param organisation: The IfcOrganization to remove
|
||||
:type organisation: ifcopenshell.entity_instance.entity_instance
|
||||
:type organisation: ifcopenshell.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class Usecase:
|
||||
removed.
|
||||
|
||||
:param person: The IfcPerson to remove
|
||||
:type person: ifcopenshell.entity_instance.entity_instance
|
||||
:type person: ifcopenshell.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class Usecase:
|
||||
the "person and organisation" group.
|
||||
|
||||
:param person_and_organisation: The IfcPersonAndOrganization to remove.
|
||||
:type person_and_organisation: ifcopenshell.entity_instance.entity_instance
|
||||
:type person_and_organisation: ifcopenshell.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class Usecase:
|
||||
leave some of them without roles.
|
||||
|
||||
:param role: The IfcActorRole to remove.
|
||||
:type role: ifcopenshell.entity_instance.entity_instance
|
||||
:type role: ifcopenshell.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ def get_application(ifc: ifcopenshell.file) -> Union[ifcopenshell.entity_instanc
|
||||
IfcApplication. See ifcopenshell.api.owner.create_owner_history for details.
|
||||
|
||||
:param ifc: The IFC file object that is being edited.
|
||||
:type ifc: ifcopenshell.file.file
|
||||
:type ifc: ifcopenshell.file
|
||||
:return: The IfcApplication with metadata of the authoring software.
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
"""
|
||||
app = ifc.by_type("IfcApplication")
|
||||
if not app and ifc.schema == "IFC2X3":
|
||||
@@ -50,9 +50,9 @@ def get_user(ifc: ifcopenshell.file) -> Union[ifcopenshell.entity_instance, None
|
||||
IfcApplication. See ifcopenshell.api.owner.create_owner_history for details.
|
||||
|
||||
:param ifc: The IFC file object that is being edited.
|
||||
:type ifc: ifcopenshell.file.file
|
||||
:type ifc: ifcopenshell.file
|
||||
:return: The IfcPersonAndOrganization with metadata of the authoring user.
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
"""
|
||||
pao = ifc.by_type("IfcPersonAndOrganization")
|
||||
if not pao and ifc.schema == "IFC2X3":
|
||||
|
||||
@@ -28,12 +28,12 @@ class Usecase:
|
||||
This means that the actor is no longer responsible for the object.
|
||||
|
||||
:param relating_actor: The IfcActor who is responsible for the object.
|
||||
:type relating_actor: ifcopenshell.entity_instance.entity_instance
|
||||
:type relating_actor: ifcopenshell.entity_instance
|
||||
:param related_object: The object the actor is responsible for.
|
||||
:type related_object: ifcopenshell.entity_instance.entity_instance
|
||||
:type related_object: ifcopenshell.entity_instance
|
||||
:return: The updated IfcRelAssignsToActor relationship or none if there
|
||||
is no more valid relationship.
|
||||
:rtype: None, ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: None, ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ class Usecase:
|
||||
|
||||
:param element: The IfcRoot element to update the ownership details on
|
||||
when a change is made.
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The updated IfcOwnerHistory element.
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user