$ cd ~/projects .off file parser ──────────────────────────────────────────────────── Parses .off (Object File Format) files following the Princeton Shape Benchmark spec. tags: Rust ──────────────────────────────────────────────────── ## Read polygon meshes off-rs reads OFF mesh text into Rust structures containing vertex positions, face indices, and optional colors. Its examples include a colored cube and a small mesh parsed directly from a string. The parser follows the OFF format reference linked by the project. off-rs on GitHub https://github.com/michidk/off-rs off-rs API documentation https://docs.rs/off-rs ──────────────────────────────────────────────────── ## Use it in a Rust application Call `off_rs::parse` with the text and parser options, or load a mesh from a path. The public source also includes a writer for producing OFF strings and files, with configurable color output. The writer rejects faces with fewer than three vertices and indices that reference missing vertices. off-rs package https://crates.io/crates/off-rs OFF format reference https://people.sc.fsu.edu/~jburkardt/data/off/off.html ──────────────────────────────────────────────────── $ ls ~/pages > about curl -L lohr.dev > projects curl -L lohr.dev/projects > blog curl -L lohr.dev/blog > stats curl -L lohr.dev/stats > contact curl -L lohr.dev/contact ──────────────────────────────────────────────────── https://lohr.dev