detect_stl_format

Function detect_stl_format 

Source
pub fn detect_stl_format<R: Read + Seek>(reader: &mut R) -> Result<StlFormat>
Expand description

Detects whether an STL file is binary or ASCII.

Uses the reliable size-formula check to disambiguate binary files whose headers begin with the ASCII text “solid” (a common case with many CAD tools).

§Arguments

  • reader - Any type implementing Read + Seek

§Returns

After return, the reader position is reset to 0.