write_stl: Write a mesh to an STL file

View source: R/mesh_utils.R

write_stlR Documentation

Write a mesh to an STL file

Description

Writes a scimesh mesh descriptor to an ASCII or binary STL file.

Usage

write_stl(mesh, path, format = c("binary", "ascii"))

Arguments

mesh

A mesh descriptor list.

path

Path to the output STL file.

format

"binary" (default) or "ascii".

Value

invisible NULL, called for side effects of writing the file.

Examples

mesh <- generate_cuboid(c(0, 0, 0), c(1, 1, 1))
tmp_file <- tempfile(fileext = ".stl")
write_stl(mesh, tmp_file, format = "binary")


scimesh documentation built on Aug. 9, 2026, 9:07 a.m.