There are different ways one could export files, and currently the API tries its best to guess what is intended by looking at the file type and the model definition.
For XML files, there are different ways to export the same Vtk model. In the current implementation when exporting in XML, a Vtk struct is converted to VTKFile which represents the XML format for these files, and while this contains all the information for the final export, the conversion itself assumes a number of defaults (e.g. whether to use base64 encoding).
The proposal here is to add a config struct that can be passed to the export function as well as Vtk::try_into_xml_format, to enable custom export options. This can be combined with the compression scheme, which is already passed in the Vtk::try_into_xml_format function. One use case is to help with debugging as suggested in #38 by enabling ASCII output.
There are different ways one could export files, and currently the API tries its best to guess what is intended by looking at the file type and the model definition. For XML files, there are different ways to export the same
Vtk
model. In the current implementation when exporting in XML, aVtk
struct is converted toVTKFile
which represents the XML format for these files, and while this contains all the information for the final export, the conversion itself assumes a number of defaults (e.g. whether to use base64 encoding).The proposal here is to add a config struct that can be passed to the export function as well as
Vtk::try_into_xml_format
, to enable custom export options. This can be combined with the compression scheme, which is already passed in theVtk::try_into_xml_format
function. One use case is to help with debugging as suggested in #38 by enabling ASCII output.This struct should look like: