brepjs API Reference
    Preparing search index...

    Function importSTL

    • Import an STL file from a Blob.

      Reads the mesh, unifies same-domain faces with ShapeUpgrade_UnifySameDomain, and wraps the result as a solid.

      Parameters

      • blob: Blob

        A Blob or File containing STL data (binary or ASCII).

      Returns Promise<Result<AnyShape>>

      A Result wrapping the imported solid, or an error if parsing fails.

      The temporary file on the WASM FS is cleaned up automatically.

      const shape = unwrap(await importSTL(stlBlob));