[−][src]Function vtkio::export_ascii
pub fn export_ascii(data: Vtk, file_path: impl AsRef<Path>) -> Result<(), Error>
Export given vtk data to the specified file in ASCII format.
Examples
use vtkio::model::*; use vtkio::export_ascii; use std::path::PathBuf; let vtk = Vtk { version: Version::new((4,1)), title: String::from("Tetrahedron"), byte_order: ByteOrder::BigEndian, data: DataSet::inline(UnstructuredGridPiece { points: vec![0.0f32, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0].into(), cells: Cells { cell_verts: VertexNumbers::Legacy { num_cells: 1, vertices: vec![4, 0, 1, 2, 3] }, types: vec![CellType::Tetra], }, data: Attributes::new(), }) }; export_ascii(vtk, "test.vtk");