#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

#1303 in Encoding

Download history 2125/week @ 2024-09-02 3140/week @ 2024-09-09 2495/week @ 2024-09-16 3235/week @ 2024-09-23 3469/week @ 2024-09-30 4826/week @ 2024-10-07 4735/week @ 2024-10-14 3113/week @ 2024-10-21 3423/week @ 2024-10-28 4222/week @ 2024-11-04 5438/week @ 2024-11-11 3723/week @ 2024-11-18 3864/week @ 2024-11-25 4804/week @ 2024-12-02 5418/week @ 2024-12-09 5488/week @ 2024-12-16

19,702 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