convert

Function convert 

Source
pub fn convert(input: PathBuf, output: PathBuf) -> Result<()>
Expand description

Convert between 3D formats (3MF, STL, OBJ).

Auto-detects formats based on file extensions and performs the appropriate conversion.

Supported conversions:

  • STL (binary) → 3MF
  • OBJ → 3MF
  • 3MF → STL (binary)
  • 3MF → OBJ

§Arguments

  • input - Input file path
  • output - Output file path

§Errors

Returns an error if the format is unsupported or conversion fails.

§Example

use lib3mf_cli::commands::convert;
use std::path::PathBuf;

convert(PathBuf::from("mesh.stl"), PathBuf::from("model.3mf"))?;