mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
You can now remove structural connection conditions + minor mods
This commit is contained in:
@@ -2,9 +2,8 @@ class Data:
|
||||
is_loaded = False
|
||||
products = {}
|
||||
structural_analysis_models = {}
|
||||
boundary_conditions = {}
|
||||
members = {}
|
||||
connections = {}
|
||||
boundary_conditions = {}
|
||||
connects_structural_members = {}
|
||||
|
||||
@classmethod
|
||||
@@ -12,9 +11,8 @@ class Data:
|
||||
cls.is_loaded = False
|
||||
cls.products = {}
|
||||
cls.structural_analysis_models = {}
|
||||
cls.boundary_conditions = {}
|
||||
cls.members = {}
|
||||
cls.connections = {}
|
||||
cls.boundary_conditions = {}
|
||||
cls.connects_structural_members = {}
|
||||
|
||||
@classmethod
|
||||
|
||||
+2
-3
@@ -8,7 +8,6 @@ class Usecase:
|
||||
def execute(self):
|
||||
if not self.settings["connection"].AppliedCondition:
|
||||
return
|
||||
if len(self.file.get_inverse(self.settings["connection"].AppliedCondition)) > 1:
|
||||
self.settings["connection"].AppliedCondition = None
|
||||
else:
|
||||
if len(self.file.get_inverse(self.settings["connection"].AppliedCondition)) == 1:
|
||||
self.file.remove(self.settings["connection"].AppliedCondition)
|
||||
self.settings["connection"].AppliedCondition = None
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
self.file = file
|
||||
self.settings = {"relation": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
|
||||
def execute(self):
|
||||
if self.settings["relation"].AppliedCondition:
|
||||
ifcopenshell.api.run(
|
||||
"structural.remove_structural_boundary_condition",
|
||||
self.file,
|
||||
**{"connection": self.settings["relation"].RelatedStructuralConnection}
|
||||
)
|
||||
self.file.remove(self.settings["relation"])
|
||||
|
||||
Reference in New Issue
Block a user