This commit is contained in:
Andrej730
2025-03-14 10:43:47 +05:00
parent 10ecac33b8
commit 0e8810c1f5
118 changed files with 869 additions and 1203 deletions
@@ -31,13 +31,9 @@ def add_person(
:param identification: The computer readable unique identification of
the person. For example, their username in a CDE or alias.
:type identification: str, optional
:param family_name: The family name
:type family_name: str, optional
:param given_name: The given name
:type given_name: str, optional
:return: The newly created IfcPerson
:rtype: ifcopenshell.entity_instance
Example:
@@ -46,15 +42,9 @@ def add_person(
ifcopenshell.api.owner.add_person(model,
identification="bobthebuilder", family_name="Thebuilder", given_name="Bob")
"""
settings = {
"identification": identification,
"family_name": family_name,
"given_name": given_name,
}
data = {"FamilyName": settings["family_name"], "GivenName": settings["given_name"]}
data = {"FamilyName": family_name, "GivenName": given_name}
if file.schema == "IFC2X3":
data["Id"] = settings["identification"]
data["Id"] = identification
else:
data["Identification"] = settings["identification"]
data["Identification"] = identification
return file.create_entity("IfcPerson", **data)