#stl #mesh #write #read-write #loader #binary #micro-stl

tinystl

A small library to read and write STL mesh files, inspired by MicroSTL

3 releases

0.0.3 Mar 15, 2023
0.0.2 Feb 27, 2023
0.0.1 Feb 27, 2023

#1353 in Encoding

Download history 2603/week @ 2024-07-25 2872/week @ 2024-08-01 4322/week @ 2024-08-08 3354/week @ 2024-08-15 3175/week @ 2024-08-22 2973/week @ 2024-08-29 3071/week @ 2024-09-05 2621/week @ 2024-09-12 2242/week @ 2024-09-19 3553/week @ 2024-09-26 4613/week @ 2024-10-03 4597/week @ 2024-10-10 3717/week @ 2024-10-17 3276/week @ 2024-10-24 4182/week @ 2024-10-31 4482/week @ 2024-11-07

16,816 downloads per month
Used in 6 crates (via re_renderer)

MIT license

75KB
425 lines

TinySTL - A small loader for STL files.

This project is heavily inspired by, and adapted from, cry-inc's microstl library. The goal is to provide a zero-dependency way to easily load and write STL files. It is assumed that all binary files are little endian.

Example

use tinystl::StlData;

let data = StlData::read_from_file("my_file.stl")?;
data.write_binary_file("my_binary_file.stl")?;

Features

Bytemuck

Derives Pod for Triangle.

Serde

Derives Serialize and Deserialize for all types.


lib.rs:

TinySTL - A small loader for STL files.

This project is heavily inspired by, and adapted from, cry-inc's microstl library. The goal is to provide a zero-dependency way to easily load and write STL files. It is assumed that all binary files are little endian.

Example

use tinystl::StlData;
let data = StlData::read_from_file("my_file.stl")?;
data.write_binary_file("my_binary_file.stl")?;

Features

Bytemuck

Derives Pod for Triangle.

Serde

Derives Serialize and Deserialize for all types.

Dependencies

~200KB