mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Split out clashes that were not grouped so they so up individually.
This commit is contained in:
committed by
Dion Moult
parent
d5e6721ac4
commit
14c726008d
@@ -283,7 +283,9 @@ class IfcClasher:
|
||||
continue
|
||||
clashes = clash_set["clashes"]
|
||||
if len(clashes) == 0:
|
||||
print(f"Skipping clash set [{clash_set['name']}] since it contains no clash results.")
|
||||
continue
|
||||
|
||||
count_of_input_clashes += len(clashes)
|
||||
|
||||
positions = []
|
||||
@@ -307,7 +309,13 @@ class IfcClasher:
|
||||
if len(pred) == len(clashes.values()):
|
||||
i = 0
|
||||
for clash in clashes.values():
|
||||
clash["smart_group"] = int(pred[i])
|
||||
int_prediction = int(pred[i])
|
||||
if int_prediction == -1:
|
||||
# ungroup this clash since it's a single clash that we were not able to group.
|
||||
new_clash_group_number = np.amax(pred).item() + 1 + i
|
||||
clash["smart_group"] = new_clash_group_number
|
||||
else:
|
||||
clash["smart_group"] = int_prediction
|
||||
i += 1
|
||||
|
||||
# Create JSON with smart_groups that contain GlobalIDs
|
||||
|
||||
Reference in New Issue
Block a user