mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-30 11:55:57 +00:00
Document fj-export
This commit is contained in:
parent
d96b3ef29d
commit
61a11550b2
@ -1,8 +1,16 @@
|
||||
//! Exporting Fornjot models to external files
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use fj_interop::mesh::Mesh;
|
||||
use fj_math::Point;
|
||||
|
||||
/// Export the provided mesh to the file at the given path
|
||||
///
|
||||
/// Currently only 3MF is supported as an export format. The file extension of
|
||||
/// the provided path is ignored.
|
||||
pub fn export(mesh: &Mesh<Point<3>>, path: &Path) -> Result<(), Error> {
|
||||
let vertices = mesh.vertices().map(|vertex| vertex.into()).collect();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user