This commit is contained in:
Andrej730
2024-06-27 14:07:48 +05:00
parent 56d3b2ca36
commit 4ec8345716
5 changed files with 98 additions and 71 deletions
@@ -22,10 +22,13 @@ import ifcopenshell.api
from typing import Literal
ACTOR_TYPE = Literal["IfcActor", "IfcOccupant"]
def add_actor(
file: ifcopenshell.file,
actor: ifcopenshell.entity_instance,
ifc_class: Literal["IfcActor", "IfcOccupant"] = "IfcActor",
ifc_class: ACTOR_TYPE = "IfcActor",
) -> ifcopenshell.entity_instance:
"""Adds a new actor
@@ -16,10 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
from typing import Literal
ADDRESS_TYPE = Literal["IfcPostalAddress", "IfcTelecomAddress"]
def add_address(
file: ifcopenshell.file, assigned_object: ifcopenshell.entity_instance, ifc_class: str = "IfcPostalAddress"
file: ifcopenshell.file, assigned_object: ifcopenshell.entity_instance, ifc_class: ADDRESS_TYPE = "IfcPostalAddress"
) -> ifcopenshell.entity_instance:
"""Add a new telecom or postal address to an organisation or person