VTK data export#
These functions sample the OpenVCAD tree and write VTK XML data files for use in ParaView or other VTK-based tools. They are not bitmap or video exports.
Iso-surfaces are written as .vtp (VTK XML polydata). Full volumes are written
as .vti (VTK XML image data).
- pyvcad_rendering.vtk_export.export_iso_surface_vtk(vcad_object, file_path: str, quality='high', use_blending=True, progress_callback=None)[source]#
Exports the colored iso-surface of a given OpenVCAD object to a .vtp file. It computes the colors for all defined attributes and adds them as arrays in the PointData.
- Parameters:
vcad_object – The OpenVCAD node to export.
file_path (str) – The destination file path (.vtp is recommended).
quality (str, optional) – The sampling quality profile (“low”, “medium”, “high”, “ultra”). Defaults to “high”.
use_blending (bool, optional) – Whether to use alpha blending. Defaults to True.
progress_callback (callable, optional) – Callback for progress updates taking a float (0-100).
- pyvcad_rendering.vtk_export.export_volume_vtk(vcad_object, file_path: str, quality='high', use_blending=True, progress_callback=None)[source]#
Exports the multi-material colored volume of a given OpenVCAD object to a .vti file. It computes the colors for all defined attributes and adds them as arrays in the PointData.
- Parameters:
vcad_object – The OpenVCAD node to export.
file_path (str) – The destination file path (.vti is recommended).
quality (str, optional) – The sampling quality profile (“low”, “medium”, “high”, “ultra”). Defaults to “high”.
use_blending (bool, optional) – Whether to use alpha blending. Defaults to True.
progress_callback (callable, optional) – Callback for progress updates taking a float (0-100).