ifcclash typing

This commit is contained in:
Andrej730
2024-09-30 14:53:09 +05:00
parent 9131804e4e
commit 3ad58aba7a
4 changed files with 93 additions and 31 deletions
@@ -284,6 +284,7 @@ class ExecuteIfcClash(bpy.types.Operator):
if extension == ".json":
tool.Clash.load_clash_sets(self.filepath)
tool.Clash.import_active_clashes()
self.report({"INFO"}, "Finished IFC clash.")
return {"FINISHED"}
+3 -1
View File
@@ -86,7 +86,9 @@ class BIMClashProperties(PropertyGroup):
blender_clash_set_a: CollectionProperty(name="Blender Clash Set A", type=StrProperty)
blender_clash_set_b: CollectionProperty(name="Blender Clash Set B", type=StrProperty)
clash_sets: CollectionProperty(name="Clash Sets", type=ClashSet)
should_create_clash_snapshots: BoolProperty(name="Create Snapshots", default=False)
should_create_clash_snapshots: BoolProperty(
name="Create Snapshots", description="Create bcf snapshots", default=False
)
clash_results_path: StringProperty(name="Clash Results Path")
smart_grouped_clashes_path: StringProperty(name="Smart Grouped Clashes Path")
active_clash_set_index: IntProperty(name="Active Clash Set Index")
+2 -1
View File
@@ -24,12 +24,13 @@ import bonsai.core.tool
import bonsai.tool as tool
from contextlib import contextmanager
from mathutils import Vector
from ifcclash import ifcclash
class Clash(bonsai.core.tool.Clash):
@classmethod
def export_clash_sets(cls):
def export_clash_sets(cls) -> list[ifcclash.ClashSet]:
clash_sets = []
for clash_set in bpy.context.scene.BIMClashProperties.clash_sets:
a = []