pub fn write_stl<'a, W, I>(writer: &mut W, mesh: I) -> Result<()>where
W: Write,
I: ExactSizeIterator<Item = &'a Triangle>,
Expand description
Write to std::io::Write as documented in Wikipedia.
let mesh = [stl_io::Triangle { normal: [1.0, 0.0, 0.0],
vertices: [[0.0, -1.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 0.5]]}];
let mut binary_stl = Vec::<u8>::new();
stl_io::write_stl(&mut binary_stl, mesh.iter()).unwrap();