#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

#1326 in Encoding

Download history 4169/week @ 2024-10-16 3291/week @ 2024-10-23 4017/week @ 2024-10-30 4185/week @ 2024-11-06 5353/week @ 2024-11-13 3374/week @ 2024-11-20 3976/week @ 2024-11-27 6168/week @ 2024-12-04 4863/week @ 2024-12-11 3803/week @ 2024-12-18 1403/week @ 2024-12-25 4159/week @ 2025-01-01 6357/week @ 2025-01-08 5429/week @ 2025-01-15 5335/week @ 2025-01-22 5116/week @ 2025-01-29

23,351 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

~195KB