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

Method save

src/bcf/bcf/v2/visinfo.py:116–134  ·  view source on GitHub ↗

Save the VisualizationInfo and related objects to a BCF zip file. Args: bcf_zip: The BCF zip file to save to. topic_dir: The directory in the BCF zip file to save to. vpt: The ViewPoint to save.

(
        self,
        bcf_zip: ZipFileInterface,
        topic_dir: str,
        vpt: mdl.ViewPoint,
    )

Source from the content-addressed store, hash-verified

114 return bitmaps_dict
115
116 def save(
117 self,
118 bcf_zip: ZipFileInterface,
119 topic_dir: str,
120 vpt: mdl.ViewPoint,
121 ) -> None:
122 """
123 Save the VisualizationInfo and related objects to a BCF zip file.
124
125 Args:
126 bcf_zip: The BCF zip file to save to.
127 topic_dir: The directory in the BCF zip file to save to.
128 vpt: The ViewPoint to save.
129 """
130 if not (vp_name := vpt.viewpoint):
131 return
132 self._save_visinfo(bcf_zip, topic_dir, vp_name)
133 self._save_snapshot(bcf_zip, topic_dir, vpt.snapshot)
134 self._save_bitmaps(bcf_zip, topic_dir)
135
136 def _save_snapshot(self, bcf_zip: ZipFileInterface, topic_dir: str, filename: Optional[str]) -> None:
137 if bool(self.snapshot) ^ bool(filename):

Callers

nothing calls this directly

Calls 3

_save_visinfoMethod · 0.95
_save_snapshotMethod · 0.95
_save_bitmapsMethod · 0.95

Tested by

no test coverage detected