Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunk STL Export to avoid allocation errors #7049

Closed
philippotto opened this issue May 4, 2023 · 0 comments · Fixed by #7074
Closed

Chunk STL Export to avoid allocation errors #7049

philippotto opened this issue May 4, 2023 · 0 comments · Fixed by #7074
Assignees
Labels

Comments

@philippotto
Copy link
Member

philippotto commented May 4, 2023

Exporting large meshes to STL can result in "RangeError: Array buffer allocation failed". One theory is that the allocation only fails because one large consecutive array is allocated. Allocating multiple smaller arrays could work (tested by allocating two 1-GB arrays vs one 2-GB array). Since the STL is wrapped into a Blob anyway, one could build multiple STL chunks and put them into a blob, too.

Note that this would need to change the STLExporter implementation which was copied from the three-js repository.

Context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant