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

Method export

src/ifcdiff/ifcdiff.py:262–273  ·  view source on GitHub ↗
(self, path: str)

Source from the content-addressed store, hash-verified

260 return json.JSONEncoder.default(None, obj)
261
262 def export(self, path: str) -> None:
263 with open(path, "w", encoding="utf-8") as diff_file:
264 json.dump(
265 {
266 "added": list(self.added_elements),
267 "deleted": list(self.deleted_elements),
268 "changed": self.change_register,
269 },
270 diff_file,
271 indent=4,
272 default=self.json_dump_default,
273 )
274
275 def get_precision(self) -> float:
276 contexts = [c for c in self.new.by_type("IfcGeometricRepresentationContext") if c.ContextType == "Model"]

Callers 2

executeMethod · 0.95
ifcdiff.pyFile · 0.45

Calls 2

openFunction · 0.50
dumpMethod · 0.45

Tested by

no test coverage detected