validate

Function validate 

Source
pub fn validate(path: PathBuf, level: String) -> Result<()>
Expand description

Validate a 3MF file against the specification.

Performs semantic validation at the specified strictness level:

  • minimal: Basic file integrity checks
  • standard: Reference integrity and structure validation
  • strict: Full spec compliance including unit consistency
  • paranoid: Deep geometry analysis (manifoldness, self-intersection)

§Arguments

  • path - Path to the 3MF file
  • level - Validation level string (minimal, standard, strict, paranoid)

§Errors

Returns an error if validation fails (errors found) or the file cannot be parsed.

§Exit Code

Exits with code 1 if validation errors are found, 0 if passed.