STL export consumes all of my memory
Description
[Description of the issue] I exported a 4x4x4 cube as STL. Then I exported a 40x40x40 cube as STL. Both have the same file size. So you are performing global mesh optimization to minimize the number of triangles.
But then, I tried to create and export a 400x400x400 cube as STL. It took a while to render in the graphics pane. Once it did render, my view was inside the cube, and View >> Zoom to bounds did not zoom out to show the entire cube. But I could zoom out manually. I checked View >> Edit bounds, and the "Auto-bounding" option is enabled.
After this, the "I'm busy" animation in the lower right corner failed to go away. The Save button remained disabled in the Export dialog. Studio attempted to use all of my CPU and RAM. It just kept slowly allocating more memory. When it reached 18 GB of virtual memory and 32 min of CPU time (as reported by top), I killed the process. My belief is that it generated a large number of triangles, which overwhelmed the global optimization algorithm.
[Steps to reproduce]
- (box #[-200 -200 -200] #[200 200 200])
- File >> Export...
[What did you expect to happen? What happened? All the time?]
- I expect that by default, "Zoom to bounds" should display the entire model (esp. if Auto-bounding is turned on). (minor issue)
- I expect that it should be somehow possible to export this model as STL. (the main issue)
[Are there any error messages printed to the console?] No.
Versions
- Operating system: Ubuntu 16.04
-
libfivecommit hash: 5aefd7bcfb7fb866eec55c02c5759a3c81e696fc- Is this the latest commit to
master? [yes]
- Is this the latest commit to
- Qt version (if applicable): 5.9.2
Common questions
If this is a behavior issue, does the test suite (libfive/test/libfive-test) pass?
yes