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

Method _save_bim_snippet

src/bcf/bcf/v2/topic.py:216–222  ·  view source on GitHub ↗
(self, destination_zip: ZipFileInterface)

Source from the content-addressed store, hash-verified

214 destination_zip.writestr(f"{self._topic_dir.name}/{target}", to_write)
215
216 def _save_bim_snippet(self, destination_zip: ZipFileInterface) -> None:
217 snippet = self.topic.bim_snippet
218 if not snippet or snippet.is_external:
219 return
220 ref_filename = Path(snippet.reference).name
221 if self.bim_snippet:
222 destination_zip.writestr(f"{self.topic.guid}/{ref_filename}", self.bim_snippet)
223
224 def _save_reference_files(self, destination_zip: ZipFileInterface) -> None:
225 if not self.header:

Callers 1

saveMethod · 0.95

Calls 1

writestrMethod · 0.45

Tested by

no test coverage detected