brepjs API Reference
    Preparing search index...

    Function exportAssemblySTEP

    • Create an XCAF document from shape configs and export as a STEP blob.

      Builds an in-memory XCAF assembly with named, colored shape nodes, writes it through STEPCAFControl_Writer, and returns the file contents as a Blob. The XCAF document is deleted after export to avoid memory leaks.

      Parameters

      Returns Result<Blob>

      Result containing a Blob with MIME type application/STEP.

      const result = exportAssemblySTEP(
      [{ shape: myBox, color: '#00ff00', name: 'box' }],
      { unit: 'MM' }
      );
      if (result.ok) saveAs(result.value, 'model.step');

      exporters!exportSTEP | exportSTEP for the OOP API equivalent.