Outpox/STL-Viewer

Can't work on a device without screen

Closed this issue · 3 comments

I has run this bot on a VPS who certainly don't has screen and a has a few errors:

image
image

And when i run manually OpenSCAD, it's says:
image

And when i started my search, one guy send me this: https://www.npmjs.com/package/stl-thumbnailer-node
I hope i can help you

Hey man, I was contacted via Discord a few months ago regarding this and we tried to troubleshoot and solve this issue with no success unfortunately.
The package you linked is very interesting and could be a reliable alternative to OpenSCAD. I'll need to have a look at this but I can't promise anything :P

Ok, thanks !

FYI I've started looking into a new image generation method that use a library which is a fork of the suggested https://www.npmjs.com/package/stl-thumbnailer-node
This can be found in this branch: https://github.com/Outpox/STL-Viewer/tree/image-generation-rework
It doesn't create temporary files as everything is done via buffer (so in memory) and it doesn't require an X server (so should work on servers).

This is what the generated image looks like:

TBH I'm not really satisfied with the rendering and I'm new to Three.js (which is used for the rendering) and everything 3D (materials, camera, lighting, etc) so I don't know if I'll be able to improve it much beyond that.