repair

Function repair 

Source
pub fn repair(
    input: PathBuf,
    output: PathBuf,
    epsilon: f32,
    fixes: Vec<RepairType>,
) -> Result<()>
Expand description

Repair mesh geometry in a 3MF file.

Performs geometric processing to improve printability:

  • Vertex stitching (merge vertices within epsilon tolerance)
  • Degenerate triangle removal
  • Duplicate triangle removal
  • Orientation harmonization (consistent winding)
  • Island removal (disconnected components)
  • Hole filling (boundary loop triangulation)

§Arguments

  • input - Input 3MF file path
  • output - Output 3MF file path
  • epsilon - Vertex merge tolerance for stitching
  • fixes - List of repair types to perform

§Errors

Returns an error if parsing or writing fails.