Skip to main content

read_step_assembly_outline

Function read_step_assembly_outline 

Source
pub fn read_step_assembly_outline(
    text: &str,
) -> Result<Option<StepAssemblyOutline>, String>
Expand description

Read a STEP file’s product structure WITHOUT building any geometry: the parse, the structure edges and the walk of read_step_assembly, stopping before its body builds (the seconds of a real import). It answers whether a file is an assembly, and roughly how big, while the user can still decide what to do with it.

The counts are what the file DECLARES: a body that later fails to build, or an open sheet the import skips, is still counted here. Ok(None) on the same structural grounds read_step_assembly gives it (no edges, every edge refused, no reached product lists a body); Err for text that is not Part 21.