MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / export_json

Method export_json

src/ifcclash/ifcclash/ifcclash.py:249–258  ·  view source on GitHub ↗

Saved clash results as ``list[ClashSet]``.

(self)

Source from the content-addressed store, hash-verified

247 return None
248
249 def export_json(self) -> None:
250 """Saved clash results as ``list[ClashSet]``."""
251 clash_sets = self.clash_sets.copy()
252 for clash_set in clash_sets:
253 for source in clash_set["a"]:
254 del source["ifc"]
255 for source in clash_set.get("b", []):
256 del source["ifc"]
257 with open(self.settings.output, "w", encoding="utf-8") as clashes_file:
258 json.dump(clash_sets, clashes_file, indent=4)
259
260 def smart_group_clashes(self, clash_sets: list[ClashSet], max_clustering_distance: float):
261 from collections import defaultdict

Callers 1

exportMethod · 0.95

Calls 3

openFunction · 0.50
getMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected