mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
typing
This commit is contained in:
@@ -23,6 +23,7 @@ import ifcopenshell.api.geometry
|
||||
import ifcopenshell.util.system
|
||||
import ifcopenshell.util.element
|
||||
import ifcopenshell.util.placement
|
||||
from typing import Any
|
||||
|
||||
|
||||
def copy_class(file: ifcopenshell.file, product: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
|
||||
@@ -74,6 +75,9 @@ def copy_class(file: ifcopenshell.file, product: ifcopenshell.entity_instance) -
|
||||
|
||||
|
||||
class Usecase:
|
||||
file: ifcopenshell.file
|
||||
settings: dict[str, Any]
|
||||
|
||||
def execute(self):
|
||||
result = ifcopenshell.util.element.copy(self.file, self.settings["product"])
|
||||
self.copy_direct_attributes(result)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import ifcopenshell
|
||||
import ifcopenshell.api.owner
|
||||
import ifcopenshell.guid
|
||||
from typing import Optional
|
||||
from typing import Optional, Any
|
||||
|
||||
|
||||
def create_entity(
|
||||
@@ -80,6 +80,9 @@ def create_entity(
|
||||
|
||||
|
||||
class Usecase:
|
||||
file: ifcopenshell.file
|
||||
settings: dict[str, Any]
|
||||
|
||||
def execute(self):
|
||||
element = self.file.create_entity(
|
||||
self.settings["ifc_class"],
|
||||
|
||||
@@ -27,7 +27,7 @@ import ifcopenshell.util.representation
|
||||
import ifcopenshell.util.type
|
||||
import ifcopenshell.util.schema
|
||||
import ifcopenshell.util.element
|
||||
from typing import Optional, Union, Literal
|
||||
from typing import Optional, Union, Literal, Any
|
||||
|
||||
|
||||
def reassign_class(
|
||||
@@ -87,6 +87,7 @@ def reassign_class(
|
||||
|
||||
class Usecase:
|
||||
file: ifcopenshell.file
|
||||
settings: dict[str, Any]
|
||||
|
||||
def execute(self):
|
||||
ifc_class: str = self.settings["ifc_class"]
|
||||
|
||||
Reference in New Issue
Block a user