Description
Currently, several file formats in OCCT support stream output via std::ostream. This is already supported for the BREP and STEP formats via e.g. STEPCAFControl_Writer.WriteStream. I propose that stream output support is added for all supported export formats like STL, GLTF/GLB, etc.
Use Case
Applicable for web-based applications where exporting from OCCT to a suitable mesh format for display via e.g. Three.JS is a common workflow.
Benefits
This has the potential to reduce memory use in certain web-based applications for OCCT, where emulating writing to a file can potentially increase the memory usage.
Additional Context
gumyr/build123d#1024
Description
Currently, several file formats in OCCT support stream output via
std::ostream. This is already supported for the BREP and STEP formats via e.g.STEPCAFControl_Writer.WriteStream. I propose that stream output support is added for all supported export formats like STL, GLTF/GLB, etc.Use Case
Applicable for web-based applications where exporting from OCCT to a suitable mesh format for display via e.g. Three.JS is a common workflow.
Benefits
This has the potential to reduce memory use in certain web-based applications for OCCT, where emulating writing to a file can potentially increase the memory usage.
Additional Context
gumyr/build123d#1024