Expand description
STL export: a RasterizedModel’s faces as a triangle mesh file.
STL is a bag of triangles, each with a normal and its three corners
listed counter-clockwise seen from outside. The triangles here are the
ones the viewer draws (see crate::rasterize_model_tagged), so an
exported mesh is exactly what is on screen. Their winding comes from the
(u, v) triangulation, which says nothing about outside; the surface
normals do — every face’s surface normal points out of its solid (see
geop_core_topology::validation::face_orientation) — so each triangle
is wound to agree with them.
Faces are sampled one by one, so two faces sharing an edge each sample it on their own: the mesh is as watertight as those samplings agree.
Structs§
- StlTriangle
- One STL facet: its outward normal, and its corners counter-clockwise seen from outside.
Enums§
- StlFormat
- Which of STL’s two encodings to write.
Functions§
- stl_
triangles - The triangles of
facesofraster, in the order given, wound outward. - write_
stl - Write
trianglesas an STL file namedname(the solid name an ASCII file carries, and the header of a binary one).