meshing.save_stl
meshing.save_stl(mesh, path, *, binary=True)
Write the mesh triangles as an STL file.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| mesh | Mesh | A dual-contour :class:~cadjoint.meshing.dual_contouring.Mesh; every triangle of mesh.faces is written. |
required |
| path | str | Path | Output file path. | required |
| binary | bool | Write the 80-byte-header binary format (default); False writes the ASCII solid format instead. |
True |
Triangle normals are computed from the counterclockwise winding, so they point outward for a well-oriented mesh. Triangles that collapse when coincident vertices are merged — which every STL reader does — are left out (:func:remove_slivers). The output is deterministic.