mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
13 lines
360 B
Python
13 lines
360 B
Python
|
|
import ifcopenshell
|
||
|
|
|
||
|
|
|
||
|
|
class Usecase:
|
||
|
|
def __init__(self, file, settings=None):
|
||
|
|
self.file = file
|
||
|
|
self.settings = {"Name": "Unnamed"}
|
||
|
|
for key, value in settings.items():
|
||
|
|
self.settings[key] = value
|
||
|
|
|
||
|
|
def execute(self):
|
||
|
|
return self.file.create_entity("IfcMaterial", **{"Name": self.settings["Name"] or "Unnamed"})
|