-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add option: Export to PLY for HR prints #276
Conversation
+avoid using std::vector when not necessary (replace with std::array) Constants VectorPrealoc and VectorPrealoc3 serve as initial preallocated size of the vectors, may be fine tuned for balanced usage of RAM
This is a proof of concept how to "save" the virtual prints for later examination/sharing. I was looking for the simplest file format which would retain the necessary properties. PLY looked like a good option supporting triangles, vertex normals and triangle/vertex colors.
Codecov Report
@@ Coverage Diff @@
## master #276 +/- ##
==========================================
- Coverage 88.55% 87.76% -0.79%
==========================================
Files 137 138 +1
Lines 6290 6344 +54
==========================================
- Hits 5570 5568 -2
- Misses 720 776 +56
Continue to review full report at Codecov.
|
I'm surprised this hasn't cropped up as a feature request sooner 😛 I'll take a peek later this afternoon. I have some thoughts for improvements. There's no great way to do a "prompt for user input on demand" with freeglut, but if we tag this as a scriptable then one could easily set the output filename if --terminal is enabled. |
... it has appeared shortly after the HR visualization, but we didn't want to overwhelm you with feature requests :) . |
That's true, though I could see a use case for it both in automated testing and if one wants to save midway to snapshot a particular layer that is later going to be covered. |
I completely agree, using the export for automated testing is another interesting idea - it would be more stable than relying on GL renderings. |
Surprisingly the renderings themselves are quite stable; just not portable. The only issue I've encountered is that I think the Github servers get overloaded and things go south. I'm seeing a trend where I have no issues with tests on PRs that I push in the morning but as the day goes on things get progressively slower until they start timing out. |
Just pushed some changes:
|
Oh, you just did the fixes ... I was trying to push mine :) . No problem... |
Yeah, those weren't "Fix this" comments, more just "FYIs" or making sure I hadn't missed a subtlety about the exporting. |
Damn random test timeouts... Anyway, I'll merge this once they go through and the test coverage bot is satisfied 😉 |
Merged. Thanks for the contribution! |
Description
This is a proof of concept how to "save" the virtual prints for later examination/sharing.
I was looking for the simplest file format which would retain the necessary properties.
PLY looked like a good option supporting triangles, vertex normals and triangle/vertex colors.
The Export is available through context menu 3DVisuals->ExportPLY
Behaviour/ Breaking changes
This option shouldn't break any existing functionality, it adds a new option under context menu.
Have you tested the changes?
Yes, did one print, exported the intermediate results multiple times into a PLY file and loaded it with MeshLab.
MeshLab looks like a good option for loading PLY, it understands even the vertex normals (must be switched on after loading the model).
Other
@vintagepc please have a look at it and please feel free to improve the code to fit into the UI better if necessary.
Linked issues:
n/a