neco-stl
STL file parser and writer with vertex deduplication for triangle surface meshes.
Features
- Parse binary STL
- Parse ASCII STL
- Deduplicate vertices into indexed triangles
- Filter degenerate triangles
- Write binary and ASCII STL files
- Extract face normals and sharp feature edges
Usage
[]
= { = "../neco-stl" }
use parse_stl;
let bytes = read?;
let surface = parse_stl?;
println!;
# Ok::
API
| Item | Description |
|---|---|
TriSurface |
Indexed triangle surface mesh |
parse_stl(data) |
Parse STL bytes into TriSurface |
write_stl_binary(nodes, triangles, path) |
Write binary STL |
write_stl_ascii(nodes, triangles, path) |
Write ASCII STL |
TriSurface::face_normals() |
Compute per-face normals |
TriSurface::feature_edges(angle_threshold_deg) |
Extract boundary and sharp edges |
License
MIT