I recently had to code an optimized STLExporter for meshes > 1 M triangles. The existing one thrown “out of memory” error. This one handles several million triangles easily.
To make it very fast and simple, it has some limitations:
- Only BufferGeometry is accepted.
- Only one mesh is processed, not the entire object tree.
- The object matrix is not applied, it exports purely the geometry data.
Wondering if there is interest in a PR. I’ve named it STLExporterOptimized but accept suggestions for naming.