mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
First attempt at ripping out agnostic code into ifcopenshell.api namespace. See #1399.
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
class Usecase:
|
||||
def __init__(self, file, settings={}):
|
||||
self.file = file
|
||||
self.settings = {"connection": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
def execute(self):
|
||||
if self.settings["connection"].is_a("IfcStructuralPointConnection"):
|
||||
boundary_class = "IfcBoundaryNodeCondition"
|
||||
elif self.settings["connection"].is_a("IfcStructuralCurveConnection"):
|
||||
boundary_class = "IfcBoundaryEdgeCondition"
|
||||
elif self.settings["connection"].is_a("IfcStructuralSurfaceConnection"):
|
||||
boundary_class = "IfcBoundaryFaceCondition"
|
||||
self.settings["connection"].AppliedCondition = self.file.create_entity(boundary_class)
|
||||
Reference in New Issue
Block a user