Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/api/structural/edit_structural_item_axis.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
515 B
Python
Raw Normal View History

2021-05-06 08:43:12 +02:00
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {"structural_item": None, "axis": [0.0, 0.0, 1.0]}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
if len(self.file.get_inverse(self.settings["structural_item"].Axis)) == 1:
self.file.remove(self.settings["structural_item"].Axis)
self.settings["structural_item"].Axis = self.file.createIfcDirection(self.settings["axis"])