This commit is contained in:
Andrej730
2024-04-26 15:14:00 +05:00
parent 344cc1fb7d
commit 31d85b715a
10 changed files with 75 additions and 33 deletions
@@ -15,10 +15,11 @@
#
# 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
class Usecase:
def __init__(self, file, identification="APTR", name="Aperture Science"):
def __init__(self, file: ifcopenshell.file, identification: str = "APTR", name: str = "Aperture Science"):
"""Adds a new organisation
Organisations are the main way to identify manufacturers, suppliers, and
@@ -45,7 +46,7 @@ class Usecase:
self.file = file
self.settings = {"identification": identification, "name": name}
def execute(self):
def execute(self) -> ifcopenshell.entity_instance:
data = {"Name": self.settings["name"]}
if self.file.schema == "IFC2X3":
data["Id"] = self.settings["identification"]