[−][src]Crate nom_stl
An parser for binary and ASCII STL files.
Example
use std::io::BufReader; use std::fs::File; let file = File::open("./fixtures/Root_Vase.stl").unwrap(); let mut root_vase = BufReader::new(&file); let mesh: nom_stl::Mesh = nom_stl::parse_stl(&mut root_vase).unwrap(); assert_eq!(mesh.triangles().len(), 596_736);
Structs
IndexMesh | A triangle mesh represented as a vector of |
IndexTriangle | A triangle type which contains a normal vertex and index references
to vertices contained in a separate vertices container.
See |
Mesh | A triangle mesh represented as a vector of |
Triangle | A triangle type with an included normal vertex and vertices. |
Enums
Error | An error is either an IOError (wrapping std::io::Error), or a parse error, indicating that the parser is unable to make progress on an invalid input. This error is derived from the underlying nom_stl error |
Functions
parse_stl | Parse a binary or an ASCII stl.
Binary stls ar not supposed to begin with the bytes |