| 233 | destination_zip.writestr(real_path.at, self.reference_files[ref.reference]) |
| 234 | |
| 235 | def _save_document_references(self, destination_zip: ZipFileInterface) -> None: |
| 236 | if not self.topic: |
| 237 | return |
| 238 | for doc in self.topic.document_reference: |
| 239 | if doc.is_external or not doc.referenced_document: |
| 240 | continue |
| 241 | real_path = self._topic_dir |
| 242 | for path_part in doc.referenced_document.split("/"): |
| 243 | real_path = real_path.parent if path_part == ".." else real_path.joinpath(path_part) |
| 244 | destination_zip.writestr(real_path.at, self.document_references[doc.referenced_document]) |
| 245 | |
| 246 | def add_viewpoint(self, element: entity_instance) -> VisualizationInfoHandler: |
| 247 | """Add a viewpoint pointed at the placement of an IFC element to the topic. |