Export an assembly to a zipped vtkjs. NB: .zip extensions is added to path.
(assy: AssemblyProtocol, path: str)
| 406 | |
| 407 | |
| 408 | def exportVTKJS(assy: AssemblyProtocol, path: str): |
| 409 | """ |
| 410 | Export an assembly to a zipped vtkjs. NB: .zip extensions is added to path. |
| 411 | """ |
| 412 | |
| 413 | renderWindow = _vtkRenderWindow(assy) |
| 414 | |
| 415 | with TemporaryDirectory() as tmpdir: |
| 416 | |
| 417 | exporter = vtkJSONSceneExporter() |
| 418 | exporter.SetFileName(tmpdir) |
| 419 | exporter.SetRenderWindow(renderWindow) |
| 420 | exporter.Write() |
| 421 | make_archive(path, "zip", tmpdir) |
| 422 | |
| 423 | |
| 424 | def exportVRML( |