brepjs API Reference
    Preparing search index...

    Function importSTEP

    • Import a STEP file from a Blob.

      Reads every part in the file. A file holding one solid comes back as that solid; an assembly or a file with several parts comes back as a Compound of every part, each at the placement the file gives it.

      Parameters

      • blob: Blob

        A Blob or File containing STEP data (.step / .stp).

      Returns Promise<Result<UnknownDimShape>>

      A Result wrapping the imported shape (a Compound when the file holds several parts), or an error if parsing fails.

      Part names and colors in the file are not read. The temporary file on the WASM FS is cleaned up automatically.

      const file = new File([stepData], 'part.step');
      const shape = unwrap(await importSTEP(file));