Code Monkey home page Code Monkey logo

stl-thumb's Introduction

stl-thumb

Build Status Build Status Documentation Crates.io

Stl-thumb is a fast lightweight thumbnail generator for STL files. It can show previews for STL files in your file manager on Linux and Windows. It is written in Rust and uses OpenGL.

Screenshot

Installation

Windows

Stl-thumb requires 64 bit Windows 7 or later. Download the installer .exe for the latest release and run it.

The installer will tell the Windows shell to refresh the thumbnail cache, however this does not always seem to work. If your icons do not change then try using the Disk Cleanup utility to clear the thumbnail cache.

Linux

Stl-thumb works with Gnome and most other similar desktop environements. If you are using the KDE desktop environment then you will also need to install the seperate stl-thumb-kde package.

Make sure that your file manager is set to generate previews for files larger than 1 MB. Most file managers have this setting under the Preview tab in their Preferences.

Arch

A package is available in the AUR. Install it manually or using your favorite AUR helper.

$ yay -S stl-thumb

Debian / Ubuntu

Download the .deb package for your platform (usually amd64) and install it. Packages are also available for armhf (Raspberry Pi) and arm64 (Pine64 and other SBCs).

$ sudo apt install ./stl-thumb_0.4.0_amd64.deb

openSUSE

For openSUSE Tumblweed there is a user repo available:

$ sudo zypper ar -f obs://home:jubalh:stl stl
$ sudo zypper ref
$ sudo zypper install stl-thumb

Building

Building the tool itself:

If you get errors about fontconfig being missing, install the development package

You can build the debug version with:

$ cargo build

When your done, build the realease version with:

$ cargo build --release

Building the .deb-package:

$ cargo install cargo-deb #this is an additional dependency
$ cargo deb

Building the .rpm-package:

$ cargo install generate-rpm #this is an additional dependency
$ cargo generate-rpm

Command Line Usage

$ stl-thumb <STL_FILE> [IMG_FILE]

Options

Option Description
<STL_FILE> The STL file you want a picture of. Use - to read from stdin instead of a file.
<IMG_FILE> The thumbnail image file that will be created. Use - to write to stdout instead of a file.
-s, --size <size> Specify width of the image. It will always be a square.
-f, --format <format> The format of the image file. If not specified it will be determined from the file extension, or default to PNG if there is no extension. Supported formats: PNG, JPEG, GIF, ICO, BMP
-m, --material <ambient> <diffuse> <specular> Colors for rendering the mesh using the Phong reflection model. Requires 3 colors as rgb hex values: ambient, diffuse, and specular. Defaults to blue.
-b, --backround <color> The background color with transparency (rgba). Default is ffffff00.
-a, --antialiasing [none, fxaa] Anti-aliasing method. Default is FXAA, which is fast but may introduce artifacts.
--recalc-normals Force recalculation of face normals. Use when dealing with malformed STL files.
-x Display the image in a window instead of saving a file.
-h, --help Prints help information.
-V, --version Prints version information.
-v[v][v] Increase message verbosity. Levels: Errors, Warnings, Info, Debugging

stl-thumb's People

Contributors

csicar avatar jubalh avatar mtorromeo avatar newhinton avatar saccharingoat avatar shufanshijie avatar unlimitedbacon avatar vaarlion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stl-thumb's Issues

stl-thumb uses 100% CPU, hangs forever on Windows 7

As reported on google+, stl-thumb hangs forever on my laptop.

Drivers are up-to-date and normal OpenGL support works.

C:\Program Files\stl-thumb>stl-thumb.exe -vv c:\Models\Box_150.stl c:\Models\Box
_150.png
INFO - STL File: c:\Models\Box_150.stl
INFO - Thumbnail File: c:\Models\Box_150.png

INFO - Bounds:
INFO - X: 0, 150
Y: 0, 150
Z: 0, 150

INFO - Center:  Point3 [75.0, 75.0, 75.0]
INFO - Triangles processed:     12

glium has triggered an OpenGL error during initialization. Please report this er
ror: https://github.com/tomaka/glium/issues
INFO - GL Version:   Version(Gl, 3, 1)
INFO - GL Version:   3.1.0 - Build 9.17.10.3223
INFO - GLSL Version: Version(Gl, 1, 4)
INFO - Vendor:       Intel
INFO - Renderer      Intel(R) HD Graphics 3000
INFO - Free GPU Mem: None

INFO - Scale:   0.013333334

After this output, the process does not exit and uses 100% CPU.

Unistall ?

Hello , i have unistalled the software but thumbnail still here ?

does not display thumbnails

I have tried to install version 3.0, 3.1 and 4.0 but none of them show me the stl thumbnails.

I have linux mint.

memory allocation of 48 bytes failed

what does that mean, "memory allocation of 48 bytes failed" preview does not work for me

INFO - STL File: effector.stl
INFO - Thumbnail File: effector.png

INFO - Bounds:
INFO - X: -35.80536, 31.09588
Y: -70.3, -29.256
Z: 3.332, 26.883

INFO - Center: Point3 [-2.3547392, -49.778, 15.1075]
INFO - Triangles processed: 3672

INFO - GL Version: Version(Gl, 2, 1)
INFO - GL Version: 2.1 Mesa 21.1.2
INFO - GLSL Version: Version(Gl, 1, 2)
INFO - Vendor: Mesa/X.org
INFO - Renderer llvmpipe (LLVM 12.0.0, 256 bits)
INFO - Free GPU Mem: None
INFO - Depth Bits: None

memory allocation of 48 bytes failed
Abgebrochen (Speicherabzug geschrieben)
My System

System: Kernel: 5.10.42-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: Cinnamon 4.8.6 tk: GTK 3.24.29 vt: 7
dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
CPU: Info: 12-Core model: AMD Ryzen Threadripper 1920X bits: 64 type: MT MCP arch: Zen rev: 1 cache: L2: 6 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 167712
Speed: 3306 MHz min/max: 2200/3500 MHz boost: enabled Core speeds (MHz): 1: 3306 2: 3307 3: 2136 4: 2085 5: 3117
6: 3129 7: 1908 8: 1964 9: 1959 10: 1963 11: 1962 12: 2189 13: 1850 14: 2192 15: 2192 16: 2192 17: 2197 18: 1888
19: 1888 20: 1889 21: 1885 22: 1886 23: 1888 24: 2188
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] vendor: XFX Pine
driver: amdgpu v: kernel bus-ID: 43:00.0 chip-ID: 1002:67df class-ID: 0300
Display: x11 server: X.Org 1.20.11 driver: loaded: amdgpu,ati unloaded: modesetting alternate: fbdev,vesa
resolution: 1: 1920x108060Hz 2: 1920x108060Hz s-dpi: 96
OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.40.0 5.10.42-1-MANJARO LLVM 12.0.0) v: 4.6 Mesa 21.1.2
direct render: Yes

Installer source?

Is the source for the installer available somewhere? I am interested in creating an installer for another image thumbnail previewer. Thank you.

Segmentation fault on release build

Hej and thanks for stl-thumb!

I'm having this puzzling issue but I'm not sure if it's a stl-thumb issue or a rustc issue.

When I build stl-thumb in debug mode it works fine, e.g.:

$ cargo run test_data/3DBenchy.stl 3DBenchy.png

But when I build in release mode, I get a segfault 🤔

$ cargo run --release test_data/3DBenchy.stl 3DBenchy.png  
[1]    1122892 segmentation fault (core dumped)  cargo run --release test_data/3DBenchy.stl 3DBenchy.png

This is on Fedora 34, with Rust stable (rustc 1.52.1).

Application with a virus!

There is a downloader trojan in the app. I checked it on a test Windows, not only does the application not work so it installed Marlin3DprinterTools, you never know what malware can be installed without your knowledge. The author, clarify the situation and not deleting posts, or should I ask this question in a video on Youtube?

Custom work for 3D thumbnail plugin

Hi, I am interested in having a thumbnail plugin for our own 3D file format implemented. The file format is very simple to load, and we have C++ code that can load it into memory. I was wondering if you would be available to work on this, later this year?

Unable to render stl to image

Attempting to generate images from STL files without luck

c:\STLThumb>stl-thumb.exe --version
stl-thumb 0.3.1
c:\STLThumb>stl-thumb -vv c:\STLThumb\XiaomiAqaraBatteryKey.stl c:\STLThumb\1.png
INFO - STL File: c:\STLThumb\XiaomiAqaraBatteryKey.stl
INFO - Thumbnail File: c:\STLThumb\1.png

INFO - Bounds:
INFO - X: -16.499542, 16.499542
Y: -5, 5
Z: -26, -12.369832

INFO - Center: Point3 [0.0, 0.0, -19.184916]
INFO - Triangles processed: 19828

c:\STLThumb>dir
Volume in drive C has no label.
Volume Serial Number is 887C-87F0

Directory of c:\STLThumb

14/01/2021 21:15

.
14/01/2021 21:15 ..
17/03/2019 22:57 2,250,240 stl-thumb.exe
17/03/2019 22:57 26,112 STLThumbWinShellExtension.dll
26/09/2020 19:17 991,484 XiaomiAqaraBatteryKey.stl
06/10/2020 13:24 3,375,184 ZSN.stl
4 File(s) 6,643,020 bytes
2 Dir(s) 219,728,785,408 bytes free

c:\STLThumb>

Please add dependencies

The plugin works fine, just installed on Ubuntu 20.10
libosmesa6-dev libosmesa6 are required, but not installed by the .deb
Thank you.

DEB Build for x86_45

I tried to build from source on my Synology NAS but I'm running into linker errors and it looks like it's just not going to fly (at least with my skill level with build systems, gcc, and rust).

Would it be possible for you to roll an x86_64 GNU/Linux version and add it to the packages?

Failing that do you know of a place where I can diagnose: "error: linker cc not found"
gcc is installed and available, but when I symlink cc to gcc the cargo build step fails differently. I suspect there's just some essential build tools that aren't available on the NAS

Greatly appreciate your help. This tool was great and I bought a NAS specifically to make use of it, and then realized too late it was the x86 version and not the ARM version (facepalm)

Mac Version

Why don't you offer this? Would be pretty useful to many. Thanks!

AWS Elastic Graphic Error

Hi, have problem with OpenGL Elastic Graphic (OpenGL ext. on host VPS)


c:\temp>stl-thumb.exe -f png -vv TreeFrogFridgeMagnet.stl out.png
INFO - STL File: TreeFrogFridgeMagnet.stl
INFO - Thumbnail File: out.png

INFO - Bounds:
INFO - X: -32.436058, 32.436058
Y: -27.012234, 22.989744
Z: 0.01302191, 21.957787

INFO - Center: Point3 [0.0, -2.0112448, 10.985404]
INFO - Triangles processed: 10702

thread 'main' panicked at 'internal error: entered unreachable code', C:\Users\appveyor.cargo\git\checkouts\glium-ba4654eea77b1028\49c12e7\src\context\capabilities.rs:281:22
note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.


WGLInfo64 output


WGL extensions:
WGL_ARB_create_context, WGL_ARB_create_context_profile,
WGL_ARB_create_context_robustness, WGL_ARB_extensions_string,
WGL_ARB_make_current_read, WGL_ARB_multisample, WGL_ARB_pbuffer,
WGL_ARB_pixel_format, WGL_AWS_elastic_gpu, WGL_EXT_extensions_string,
WGL_EXT_swap_control,
OpenGL vendor string: Amazon Web Services, Inc.
OpenGL renderer string: Amazon Elastic Graphics (eg1.medium)
OpenGL version string: 4.3.0 Compatibility Profile Context AWS 1.0.81.4465
OpenGL shading language version string: 4.30 AWS
OpenGL extensions:
GL_AMD_seamless_cubemap_per_texture, GL_ARB_ES2_compatibility,
GL_ARB_ES3_compatibility, GL_ARB_arrays_of_arrays, GL_ARB_base_instance,
GL_ARB_blend_func_extended, GL_ARB_clear_buffer_object,
GL_ARB_clip_control, GL_ARB_color_buffer_float, GL_ARB_compatibility,
GL_ARB_compressed_texture_pixel_storage, GL_ARB_compute_shader,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_cull_distance,
GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp,
GL_ARB_depth_texture, GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend,
GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect,
GL_ARB_draw_instanced, GL_ARB_enhanced_layouts,
GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport,
GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,
GL_ARB_fragment_shader, GL_ARB_framebuffer_no_attachments,
GL_ARB_framebuffer_object, GL_ARB_framebuffer_sRGB,
GL_ARB_geometry_shader4, GL_ARB_get_program_binary, GL_ARB_gpu_shader5,
GL_ARB_gpu_shader_fp64, GL_ARB_half_float_pixel, GL_ARB_half_float_vertex,
GL_ARB_instanced_arrays, GL_ARB_internalformat_query,
GL_ARB_internalformat_query2, GL_ARB_invalidate_subdata,
GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range,
GL_ARB_multi_draw_indirect, GL_ARB_multisample, GL_ARB_multitexture,
GL_ARB_occlusion_query, GL_ARB_occlusion_query2,
GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object,
GL_ARB_point_parameters, GL_ARB_point_sprite,
GL_ARB_program_interface_query, GL_ARB_provoking_vertex,
GL_ARB_query_buffer_object, GL_ARB_robust_buffer_access_behavior,
GL_ARB_sample_shading, GL_ARB_sampler_objects, GL_ARB_seamless_cube_map,
GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counters,
GL_ARB_shader_image_load_store, GL_ARB_shader_image_size,
GL_ARB_shader_objects, GL_ARB_shader_precision,
GL_ARB_shader_storage_buffer_object, GL_ARB_shader_subroutine,
GL_ARB_shader_texture_lod, GL_ARB_shading_language_100,
GL_ARB_shading_language_420pack, GL_ARB_shading_language_packing,
GL_ARB_shadow, GL_ARB_stencil_texturing, GL_ARB_sync,
GL_ARB_tessellation_shader, GL_ARB_texture_barrier,
GL_ARB_texture_border_clamp, GL_ARB_texture_buffer_object,
GL_ARB_texture_buffer_object_rgb32, GL_ARB_texture_buffer_range,
GL_ARB_texture_compression_bptc, GL_ARB_texture_compression_rgtc,
GL_ARB_texture_cube_map, GL_ARB_texture_cube_map_array,
GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
GL_ARB_texture_float, GL_ARB_texture_gather,
GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_mirrored_repeat,
GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two,
GL_ARB_texture_query_levels, GL_ARB_texture_query_lod,
GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui,
GL_ARB_texture_stencil8, GL_ARB_texture_storage,
GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle,
GL_ARB_texture_view, GL_ARB_timer_query, GL_ARB_transform_feedback2,
GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced,
GL_ARB_transform_feedback_overflow_query, GL_ARB_transpose_matrix,
GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra,
GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_64bit,
GL_ARB_vertex_attrib_binding, GL_ARB_vertex_buffer_object,
GL_ARB_vertex_program, GL_ARB_vertex_shader,
GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev,
GL_ARB_viewport_array, GL_ARB_window_pos, GL_ATI_draw_buffers,
GL_ATI_texture_float, GL_ATI_texture_mirror_once, GL_EXT_abgr,
GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_equation_separate,
GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
GL_EXT_compiled_vertex_array, GL_EXT_depth_bounds_test,
GL_EXT_draw_buffers2, GL_EXT_draw_instanced, GL_EXT_draw_range_elements,
GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample,
GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB,
GL_EXT_geometry_shader4, GL_EXT_gpu_program_parameters,
GL_EXT_gpu_shader4, GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil,
GL_EXT_packed_float, GL_EXT_packed_pixels, GL_EXT_pixel_buffer_object,
GL_EXT_point_parameters, GL_EXT_provoking_vertex, GL_EXT_rescale_normal,
GL_EXT_secondary_color, GL_EXT_separate_specular_color,
GL_EXT_shader_image_load_store, GL_EXT_shader_integer_mix,
GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, GL_EXT_texture3D,
GL_EXT_texture_array, GL_EXT_texture_buffer_object,
GL_EXT_texture_compression_latc, GL_EXT_texture_compression_rgtc,
GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map,
GL_EXT_texture_env_add, GL_EXT_texture_env_combine,
GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic,
GL_EXT_texture_integer, GL_EXT_texture_lod_bias,
GL_EXT_texture_mirror_clamp, GL_EXT_texture_object, GL_EXT_texture_sRGB,
GL_EXT_texture_sRGB_decode, GL_EXT_texture_shared_exponent,
GL_EXT_texture_snorm, GL_EXT_texture_swizzle, GL_EXT_timer_query,
GL_EXT_transform_feedback, GL_EXT_vertex_array, GL_EXT_vertex_array_bgra,
GL_IBM_texture_mirrored_repeat, GL_KHR_context_flush_control,
GL_KHR_debug, GL_NV_blend_square, GL_NV_conditional_render,
GL_NV_copy_depth_to_color, GL_NV_copy_image, GL_NV_depth_buffer_float,
GL_NV_float_buffer, GL_NV_half_float, GL_NV_primitive_restart,
GL_NV_texgen_reflection, GL_NV_texture_barrier, GL_SGIS_generate_mipmap,
GL_SGIS_texture_lod,

72 WGL Visuals
visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id gen nat sp sz l ci b ro r g b a bf th cl r g b a ns b eat


0x01 0 1 0 0 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x02 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x03 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x04 0 1 0 0 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x05 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x06 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x07 0 1 0 0 0 r . . 8 8 8 8 0 24 0 16 16 16 16 0 0 None
0x08 0 1 0 0 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 None
0x09 0 1 0 0 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 None
0x0a 0 1 0 0 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 None
0x0b 0 1 0 0 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 None
0x0c 0 1 0 0 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 None
0x0d 0 1 0 0 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x0e 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x0f 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x10 0 1 0 0 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x11 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x12 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x13 0 1 0 0 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x14 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x15 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x16 0 1 0 0 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x17 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x18 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x19 0 1 0 0 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x1a 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x1b 0 1 0 0 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x1c 0 1 0 0 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x1d 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x1e 0 1 0 0 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x1f 0 0 0 0 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x20 0 0 0 0 0 r y . 11 11 10 0 0 24 0 0 0 0 0 0 0 None
0x21 0 0 0 0 0 r y . 11 11 10 0 0 24 0 0 0 0 0 0 0 None
0x22 0 0 0 0 0 r y . 16 16 16 16 0 24 0 0 0 0 0 0 0 None
0x23 0 0 0 0 0 r y . 16 16 16 16 0 24 0 0 0 0 0 0 0 None
0x24 0 0 0 0 0 r y . 32 32 32 32 0 24 0 0 0 0 0 0 0 None
0x25 0 0 0 0 0 r y . 32 32 32 32 0 24 0 0 0 0 0 0 0 None
0x26 1 1 0 0 0 r . . 8 8 8 0 0 32 8 16 16 16 0 0 0 None
0x27 1 1 0 0 0 r . . 8 8 8 0 0 16 8 16 16 16 0 0 0 None
0x28 1 1 0 0 0 r y . 8 8 8 0 0 32 8 16 16 16 0 0 0 None
0x29 1 1 0 0 0 r y . 8 8 8 0 0 16 8 16 16 16 0 0 0 None
0x2a 1 1 0 0 0 r . . 8 8 8 8 0 32 8 16 16 16 16 0 0 None
0x2b 1 1 0 0 0 r . . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
0x2c 1 1 0 0 0 r y . 8 8 8 8 0 32 8 16 16 16 16 0 0 None
0x2d 1 1 0 0 0 r y . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
0x2e 1 1 0 0 0 c . . 8 8 8 0 0 32 8 0 0 0 0 0 0 None
0x2f 1 1 0 0 0 c . . 8 8 8 0 0 16 8 0 0 0 0 0 0 None
0x30 1 1 0 0 0 c y . 8 8 8 0 0 32 8 0 0 0 0 0 0 None
0x31 1 1 0 0 0 c y . 8 8 8 0 0 16 8 0 0 0 0 0 0 None
0x32 1 0 0 0 0 r . . 8 8 8 0 0 32 8 16 16 16 0 0 0 None
0x33 1 0 0 0 0 r . . 8 8 8 0 0 16 8 16 16 16 0 0 0 None
0x34 1 0 0 0 0 r . . 8 8 8 8 0 32 8 16 16 16 16 0 0 None
0x35 1 0 0 0 0 r . . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
0x36 1 0 0 0 0 c . . 8 8 8 0 0 32 8 0 0 0 0 0 0 None
0x37 1 0 0 0 0 c . . 8 8 8 0 0 16 8 0 0 0 0 0 0 None
0x38 1 0 0 0 0 r . . 5 5 5 0 0 32 8 11 11 10 0 0 0 None
0x39 1 0 0 0 0 r . . 5 5 5 0 0 16 8 11 11 10 0 0 0 None
0x3a 1 0 0 0 0 r . . 5 5 5 8 0 32 8 8 8 8 8 0 0 None
0x3b 1 0 0 0 0 r . . 5 5 5 8 0 16 8 8 8 8 8 0 0 None
0x3c 1 0 0 0 0 c . . 5 5 5 0 0 32 8 0 0 0 0 0 0 None
0x3d 1 0 0 0 0 c . . 5 5 5 0 0 16 8 0 0 0 0 0 0 None
0x3e 1 0 0 0 0 r . . 3 3 2 0 0 32 8 11 11 10 0 0 0 None
0x3f 1 0 0 0 0 r . . 3 3 2 0 0 16 8 11 11 10 0 0 0 None
0x40 1 0 0 0 0 r . . 3 3 2 8 0 32 8 8 8 8 8 0 0 None
0x41 1 0 0 0 0 r . . 3 3 2 8 0 16 8 8 8 8 8 0 0 None
0x42 1 0 0 0 0 c . . 3 3 2 0 0 32 8 0 0 0 0 0 0 None
0x43 1 0 0 0 0 c . . 3 3 2 0 0 16 8 0 0 0 0 0 0 None
0x44 1 0 0 0 0 r . . 1 1 1 0 0 32 8 5 6 5 0 0 0 None
0x45 1 0 0 0 0 r . . 1 1 1 0 0 16 8 5 6 5 0 0 0 None
0x46 1 0 0 0 0 r . . 1 1 1 8 0 32 8 4 4 4 4 0 0 None
0x47 1 0 0 0 0 r . . 1 1 1 8 0 16 8 4 4 4 4 0 0 None
0x48 1 0 0 0 0 c . . 1 1 1 0 0 32 8 0 0 0 0 0 0 None


DEB Build for x86_64

I tried to build from source on my Synology NAS but I'm running into linker errors and it looks like it's just not going to fly (at least with my skill level with build systems, gcc, and rust).

Would it be possible for you to roll an x86_64 GNU/Linux version and add it to the packages?

Failing that do you know of a place where I can diagnose: "error: linker cc not found"
gcc is installed and available, but when I symlink cc to gcc the cargo build step fails differently. I suspect there's just some essential build tools that aren't available on the NAS

Greatly appreciate your help. This tool was great and I bought a NAS specifically to make use of it, and then realized too late it was the x86 version and not the ARM version (facepalm)

main thread panic when running stl-thumb

I was very excited to find this project as I'm in need of an STL thumbnailer. I'm running gentoo on x86_64 hardware so I had to compile and install manually. However, the compile binary refuses to work. Based on searches it sounds like it's an issue with winit and my version of Rust (1.51.0). I tried using various versions of winit but I hit the same issue with all of them. Here's the stacktrace:

thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /rustc/1.51.0/library/core/src/mem/mod.rs:671:9
stack backtrace:
   0:     0x55f3e5cfc670 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha82970ce331ee3df
   1:     0x55f3e5d1bb5c - core::fmt::write::h92100e0a6eb0e206
   2:     0x55f3e5cf9432 - std::io::Write::write_fmt::he651b488a8ffa4cc
   3:     0x55f3e5cfe7b5 - std::panicking::default_hook::{{closure}}::h010c097578ccb97b
   4:     0x55f3e5cfe313 - std::panicking::default_hook::h8c4b8abaadca6a5a
   5:     0x55f3e5cfef51 - std::panicking::rust_panic_with_hook::h57aad5155f981348
   6:     0x55f3e5cfea67 - std::panicking::begin_panic_handler::{{closure}}::h3fc4d29fbfbcb4c0
   7:     0x55f3e5cfcb2c - std::sys_common::backtrace::__rust_end_short_backtrace::hcbb448073e5fc14e
   8:     0x55f3e5cfe9f9 - rust_begin_unwind
   9:     0x55f3e5d19b51 - core::panicking::panic_fmt::hf6474c47f9aace56
  10:     0x55f3e5d19a9d - core::panicking::panic::hdef100c2be4b5e1c
  11:     0x55f3e5c78e39 - winit::platform::platform::x11::window::UnownedWindow::new::h137a8eae2d5d479e
  12:     0x55f3e5c478c5 - winit::platform::platform::x11::Window::new::h9a0d63040f6881ad
  13:     0x55f3e5c320ae - glutin::platform::platform::x11::Context::new::h368d4f308f7fbbd9
  14:     0x55f3e5c37a52 - glutin::GlWindow::new::h6b007a127aa87965
  15:     0x55f3e5bb008a - glium::backend::glutin::Display::new::he2ad2c3f66be025a
  16:     0x55f3e5b03e5e - stl_thumb::create_normal_display::h80fc51a1ad985bb9
  17:     0x55f3e5b065cc - stl_thumb::render_to_image::hede39f3a5e60b7bc
  18:     0x55f3e5b08c0c - stl_thumb::render_to_file::h0cb41b6a22f536f6
  19:     0x55f3e5aff80b - stl_thumb::main::h3b921ee4a9c7a298
  20:     0x55f3e5b00233 - std::sys_common::backtrace::__rust_begin_short_backtrace::hca825ff6266d766f
  21:     0x55f3e5b002d9 - std::rt::lang_start::{{closure}}::hf7be66efd71edf7e
  22:     0x55f3e5cff377 - std::rt::lang_start_internal::h5a78c72a894ab7a4
  23:     0x55f3e5aff992 - main
  24:     0x7f1c4b78c88e - __libc_start_main
  25:     0x55f3e5aff08a - _start
  26:                0x0 - <unknown>

I would think if it's a compatibility issue with Rust then everyone running a recent version of Rust would be having this issue.

Add Command Line Support

I am currently working on a 3d file management software and am looking for an performant way to create thumbnails for 3d files, as doing this with C# is not feasible.
Are you able to estimate the effort it would take to expand the project to support thumbnail generation by command line? I don't need anything fancy, just a object path and a thumbnail path as parameter and it should generate the thumbnail at the given location.

Of course I am willing to learn Rust (never done it before) to implement the feature myself and credit your project in case this is feasible.

Empty/white thumbnails unless -x is used

Hi!

I've installed this through the AUR and it only kind of works, the generated thumbnails are always white unless the "-x" option is passed to stl-thumb (this happens in both the command line and through my file manager, pcmanfm).
Not a huge deal but a bit annoying :)

Add a note about running on a headless server

Currently, if you run stl-thumb on a fully headless server, so no X11/Wayland installed, only accessible through ssh, I get the following error:

⟩ stl-thumb 32mm.stl 32mm.png
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: XOpenDisplayFailed', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.1/src/platform_impl/linux/mod.rs:619:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The app can be run by using xvfb-run:

xvfb-run stl-thumb 32mm.stl 32mm.png

Which generates a thumbnail correctly. This is on Arch linux.
Figured it might be of interest to anyone passing by trying to run this on a server for example.

Also, amazing tool, there are surprisingly few ways to quickly generate a png from an stl.

AWS compatibility problem

Hi, i try use this project for generate thumbnails on win10 VPS
Have next problem

image
image

Seem so they have OpenGL 1.1.0 version
Shaders in src have 120 version

It possible make support for 110 version of OpenGL?

How to use command line?

Hi
Can you give an example to how change stl color preview to gray in windows 10?
thanks
yoav

Support Opengl 2.1 / GLSL 1.20

After installing this on a 64-bit Ubuntu 16.04 with the MATE 1.12.1 desktop environment and the Nemo 3.6.5 file browser set as default, the thumbnails show up as text document icons instead of graphical representations of the STL files. In Nemo's settings, I Preview File Size is set to 'under 5mb', but I also tried raising that to 'under 10mb'.

Not working on Win 10, "not yet implemented"

I can't get stl-thumb to generate any thumbnail on the Win 10 (1909 18363 and 20H2 19042), I tried it on two notebooks.
The error message I get is the same on both, namely

C:\Program Files\stl-thumb>stl-thumb --version
stl-thumb 0.3.1

C:\Program Files\stl-thumb>stl-thumb -vv C:\temp\3DBenchy.stl C:\temp\3DBenchy.png
INFO - STL File: C:\temp\3DBenchy.stl
INFO - Thumbnail File: C:\temp\3DBenchy.png

INFO - Bounds:
INFO - X: -29.176, 30.825
Y: -15.502, 15.502
Z: 0, 48

INFO - Center:  Point3 [0.8245001, 0.0, 24.0]
INFO - Triangles processed:     225706

thread 'main' panicked at 'not yet implemented', C:\Users\appveyor\.cargo\registry\src\github.com-1ecc6299db9ec823\glutin-0.18.0\src\api\egl\mod.rs:546:35
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: BaseThreadInitThunk
  16: RtlUserThreadStart

I'm not exactly sure what causes the problem, but here seems to be the corresponding line that throws the exception
https://github.com/rust-windowing/glutin/blob/v0.18.0/src/api/egl/mod.rs#L546

It seems to be something related to OpenGL... one of the notebooks has an Intel HD 520 and AMD Radeon R7 M360, the other one a GTX 1060 grapics chip.

Trying this out with xfce - no joy yet

Hi,
This looks great and I am trying it out on Ubuntu 16.04.4 with xfce. I installed your deb and the command line program works fine. The file manager says the stl files are type model/stl but I am not getting any thumbnails. I restarted Thunar. Any idea what I can check next?

Thanks.

Centos support

hi,
would it be possible to provide centos support ?
i got a script that shows STL files in the browser , but i need this plugin to show thumbnails of the STL files

Thank you
Greets from PowerChaos

Not working for me

I've installed and reinstalled several times and also repeatedly reset the thumbnail cache, all to no avail. I'm still just seeing the icon for prusaslicer that I have set as the default app. I also don't notice any thumbs.db showing up in my folders. I had my son install it on his computer as a test and it worked fine, so it must be something with my Windows setup or some other add-on I have installed. Would actually be nice to see this work.

thumbnailer not working on ascii encoded files in linux

I recently installed 'stl-thumb' as a thumbnailer plugin to the file managers, but I notice that it isn't converting all files with the .stl extension. Upon closer inspection using the shell 'file --mime, the files that are "working" are binary encoded STL files but the ones that are not are ascii encoded STL files. Testing the script from the command line, however, shows that it works on both types of files.

Building a wrapper around the stl-thumb binary script archive so I can drop a log, I can see that it is not even attempting to do anything with the ascii encoded files. So I'm assuming it's something at the OS/file-manager level seeing those files as different.

The modified thumbnailer definition file is currently (stlthumbnailer is my wrapper script that simple logs the command being called then grabs any errors - no log entries show up for the ascii encoded stl files):

[Thumbnailer Entry]
TryExec=stlthumbnailer
Exec=stlthumbnailer -f png -s %s %i %o 
MimeType=model/stl;model/x.stl-ascii;model/x.stl-binary;application/sla;

When I pull up properties for both types of files in the file-manager, the mime types listed for both show up as:

Unknown (model/x.stl-binary)

Checking from the command line with file however shows:

$ file --mime *.stl
binary_test.stl:   application/octet-stream; charset=binary
ascii_test.stl: text/plain; charset=us-ascii

$ file -b --mime *.stl
application/octet-stream; charset=binary
text/plain; charset=us-ascii

Again, the thumbnailer script runs on teh binary encoded file, but doesn't appear to be run at all on the ascii encoded one. So I'm assuming it has either something to do with the mime types or the difference in content. Running the script manually on the ascii encoded file does work fine.

I'm not sure what to tweak to get it working properly.

Setup Failed: Another Version Of this Product Is Already Installed.

Like the title says, an error message says the software is already installed.

Here is what I did, because i had a slicer generating stl thumbnails too I uninstalled STL-Thumb and the slicer.

Now when i want to install STL-Thumb i get this error message.
I'am not able to find anything in the registry either.

install-error

Problem Previews on Xyplorer

Hi, I can't see the previews in Xyplorer, an alternative file manager at Windows 10 Explorer. I added the clsid of STL-thumb to Xyplorer, as I did for other types of extension, but without success. The previews are only loaded if you create first with Explorer.exe.
Windows 10 x64
Xyplorer 21.90 X32 (not available at 64bit).

Problem: NoAvailablePixelFormat

C:\temp>stl-thumb.exe -vvvvv -f BMP cube.stl cube.bmp
INFO - STL File: cube.stl
INFO - Thumbnail File: cube.bmp

WARN - STL file missing surface normals
INFO - Bounds:
INFO - X: -10, 10
Y: -10, 10
Z: 0, 10

INFO - Center:  Point3 [0.0, 0.0, 5.0]
INFO - Triangles processed:     12

WARN - Unable to create headless GL context. Trying hidden window instead. Reason: NoAvailablePixelFormat
ERROR - Application error: Couldn't find any pixel format that matches the criteria.

wglinfo64

WGL extensions:
    WGL_ARB_create_context, WGL_ARB_create_context_profile, 
    WGL_ARB_create_context_robustness, WGL_ARB_extensions_string, 
    WGL_ARB_make_current_read, WGL_ARB_multisample, WGL_ARB_pbuffer, 
    WGL_ARB_pixel_format, WGL_AWS_elastic_gpu, WGL_EXT_extensions_string, 
    WGL_EXT_swap_control, 
OpenGL extensions:
    GL_AMD_seamless_cubemap_per_texture, GL_ARB_ES2_compatibility, 
    GL_ARB_ES3_compatibility, GL_ARB_arrays_of_arrays, GL_ARB_base_instance, 
    GL_ARB_blend_func_extended, GL_ARB_clear_buffer_object, 
    GL_ARB_clip_control, GL_ARB_color_buffer_float, GL_ARB_compatibility, 
    GL_ARB_compressed_texture_pixel_storage, GL_ARB_compute_shader, 
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_cull_distance, 
    GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, 
    GL_ARB_depth_texture, GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect, 
    GL_ARB_draw_instanced, GL_ARB_enhanced_layouts, 
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location, 
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport, 
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, 
    GL_ARB_fragment_shader, GL_ARB_framebuffer_no_attachments, 
    GL_ARB_framebuffer_object, GL_ARB_framebuffer_sRGB, 
    GL_ARB_geometry_shader4, GL_ARB_get_program_binary, GL_ARB_gpu_shader5, 
    GL_ARB_gpu_shader_fp64, GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, 
    GL_ARB_instanced_arrays, GL_ARB_internalformat_query, 
    GL_ARB_internalformat_query2, GL_ARB_invalidate_subdata, 
    GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, 
    GL_ARB_multi_draw_indirect, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
    GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object, 
    GL_ARB_point_parameters, GL_ARB_point_sprite, 
    GL_ARB_program_interface_query, GL_ARB_provoking_vertex, 
    GL_ARB_query_buffer_object, GL_ARB_robust_buffer_access_behavior, 
    GL_ARB_sample_shading, GL_ARB_sampler_objects, GL_ARB_seamless_cube_map, 
    GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counters, 
    GL_ARB_shader_image_load_store, GL_ARB_shader_image_size, 
    GL_ARB_shader_objects, GL_ARB_shader_precision, 
    GL_ARB_shader_storage_buffer_object, GL_ARB_shader_subroutine, 
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_100, 
    GL_ARB_shading_language_420pack, GL_ARB_shading_language_packing, 
    GL_ARB_shadow, GL_ARB_stencil_texturing, GL_ARB_sync, 
    GL_ARB_tessellation_shader, GL_ARB_texture_barrier, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_buffer_object, 
    GL_ARB_texture_buffer_object_rgb32, GL_ARB_texture_buffer_range, 
    GL_ARB_texture_compression_bptc, GL_ARB_texture_compression_rgtc, 
    GL_ARB_texture_cube_map, GL_ARB_texture_cube_map_array, 
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
    GL_ARB_texture_float, GL_ARB_texture_gather, 
    GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_mirrored_repeat, 
    GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_query_levels, GL_ARB_texture_query_lod, 
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui, 
    GL_ARB_texture_stencil8, GL_ARB_texture_storage, 
    GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle, 
    GL_ARB_texture_view, GL_ARB_timer_query, GL_ARB_transform_feedback2, 
    GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced, 
    GL_ARB_transform_feedback_overflow_query, GL_ARB_transpose_matrix, 
    GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra, 
    GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_64bit, 
    GL_ARB_vertex_attrib_binding, GL_ARB_vertex_buffer_object, 
    GL_ARB_vertex_program, GL_ARB_vertex_shader, 
    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev, 
    GL_ARB_viewport_array, GL_ARB_window_pos, GL_ATI_draw_buffers, 
    GL_ATI_texture_float, GL_ATI_texture_mirror_once, GL_EXT_abgr, 
    GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_equation_separate, 
    GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
    GL_EXT_compiled_vertex_array, GL_EXT_depth_bounds_test, 
    GL_EXT_draw_buffers2, GL_EXT_draw_instanced, GL_EXT_draw_range_elements, 
    GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, 
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, 
    GL_EXT_geometry_shader4, GL_EXT_gpu_program_parameters, 
    GL_EXT_gpu_shader4, GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil, 
    GL_EXT_packed_float, GL_EXT_packed_pixels, GL_EXT_pixel_buffer_object, 
    GL_EXT_point_parameters, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
    GL_EXT_secondary_color, GL_EXT_separate_specular_color, 
    GL_EXT_shader_image_load_store, GL_EXT_shader_integer_mix, 
    GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, GL_EXT_texture3D, 
    GL_EXT_texture_array, GL_EXT_texture_buffer_object, 
    GL_EXT_texture_compression_latc, GL_EXT_texture_compression_rgtc, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
    GL_EXT_texture_integer, GL_EXT_texture_lod_bias, 
    GL_EXT_texture_mirror_clamp, GL_EXT_texture_object, GL_EXT_texture_sRGB, 
    GL_EXT_texture_sRGB_decode, GL_EXT_texture_shared_exponent, 
    GL_EXT_texture_snorm, GL_EXT_texture_swizzle, GL_EXT_timer_query, 
    GL_EXT_transform_feedback, GL_EXT_vertex_array, GL_EXT_vertex_array_bgra, 
    GL_IBM_texture_mirrored_repeat, GL_KHR_context_flush_control, 
    GL_KHR_debug, GL_NV_blend_square, GL_NV_conditional_render, 
    GL_NV_copy_depth_to_color, GL_NV_copy_image, GL_NV_depth_buffer_float, 
    GL_NV_float_buffer, GL_NV_half_float, GL_NV_primitive_restart, 
    GL_NV_texgen_reflection, GL_NV_texture_barrier, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_lod, 

72 WGL Visuals
   visual   x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id gen nat sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
-----------------------------------------------------------------------
0x01  0  1  0  0  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x02  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x03  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x04  0  1  0  0  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x05  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x06  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x07  0  1  0  0  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  0 0 None
0x08  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 None
0x09  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 None
0x0a  0  1  0  0  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  0 0 None
0x0b  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 None
0x0c  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 None
0x0d  0  1  0  0  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x0e  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x0f  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x10  0  1  0  0  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x11  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x12  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x13  0  1  0  0  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x14  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x15  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x16  0  1  0  0  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x17  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x18  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x19  0  1  0  0  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x1a  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x1b  0  1  0  0  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x1c  0  1  0  0  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x1d  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x1e  0  1  0  0  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x1f  0  0  0  0  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x20  0  0  0  0  0 r  y  . 11 11 10  0  0 24  0  0  0  0  0  0 0 None
0x21  0  0  0  0  0 r  y  . 11 11 10  0  0 24  0  0  0  0  0  0 0 None
0x22  0  0  0  0  0 r  y  . 16 16 16 16  0 24  0  0  0  0  0  0 0 None
0x23  0  0  0  0  0 r  y  . 16 16 16 16  0 24  0  0  0  0  0  0 0 None
0x24  0  0  0  0  0 r  y  . 32 32 32 32  0 24  0  0  0  0  0  0 0 None
0x25  0  0  0  0  0 r  y  . 32 32 32 32  0 24  0  0  0  0  0  0 0 None
0x26  1  1  0  0  0 r  .  .  8  8  8  0  0 32  8 16 16 16  0  0 0 None
0x27  1  1  0  0  0 r  .  .  8  8  8  0  0 16  8 16 16 16  0  0 0 None
0x28  1  1  0  0  0 r  y  .  8  8  8  0  0 32  8 16 16 16  0  0 0 None
0x29  1  1  0  0  0 r  y  .  8  8  8  0  0 16  8 16 16 16  0  0 0 None
0x2a  1  1  0  0  0 r  .  .  8  8  8  8  0 32  8 16 16 16 16  0 0 None
0x2b  1  1  0  0  0 r  .  .  8  8  8  8  0 16  8 16 16 16 16  0 0 None
0x2c  1  1  0  0  0 r  y  .  8  8  8  8  0 32  8 16 16 16 16  0 0 None
0x2d  1  1  0  0  0 r  y  .  8  8  8  8  0 16  8 16 16 16 16  0 0 None
0x2e  1  1  0  0  0  c .  .  8  8  8  0  0 32  8  0  0  0  0  0 0 None
0x2f  1  1  0  0  0  c .  .  8  8  8  0  0 16  8  0  0  0  0  0 0 None
0x30  1  1  0  0  0  c y  .  8  8  8  0  0 32  8  0  0  0  0  0 0 None
0x31  1  1  0  0  0  c y  .  8  8  8  0  0 16  8  0  0  0  0  0 0 None
0x32  1  0  0  0  0 r  .  .  8  8  8  0  0 32  8 16 16 16  0  0 0 None
0x33  1  0  0  0  0 r  .  .  8  8  8  0  0 16  8 16 16 16  0  0 0 None
0x34  1  0  0  0  0 r  .  .  8  8  8  8  0 32  8 16 16 16 16  0 0 None
0x35  1  0  0  0  0 r  .  .  8  8  8  8  0 16  8 16 16 16 16  0 0 None
0x36  1  0  0  0  0  c .  .  8  8  8  0  0 32  8  0  0  0  0  0 0 None
0x37  1  0  0  0  0  c .  .  8  8  8  0  0 16  8  0  0  0  0  0 0 None
0x38  1  0  0  0  0 r  .  .  5  5  5  0  0 32  8 11 11 10  0  0 0 None
0x39  1  0  0  0  0 r  .  .  5  5  5  0  0 16  8 11 11 10  0  0 0 None
0x3a  1  0  0  0  0 r  .  .  5  5  5  8  0 32  8  8  8  8  8  0 0 None
0x3b  1  0  0  0  0 r  .  .  5  5  5  8  0 16  8  8  8  8  8  0 0 None
0x3c  1  0  0  0  0  c .  .  5  5  5  0  0 32  8  0  0  0  0  0 0 None
0x3d  1  0  0  0  0  c .  .  5  5  5  0  0 16  8  0  0  0  0  0 0 None
0x3e  1  0  0  0  0 r  .  .  3  3  2  0  0 32  8 11 11 10  0  0 0 None
0x3f  1  0  0  0  0 r  .  .  3  3  2  0  0 16  8 11 11 10  0  0 0 None
0x40  1  0  0  0  0 r  .  .  3  3  2  8  0 32  8  8  8  8  8  0 0 None
0x41  1  0  0  0  0 r  .  .  3  3  2  8  0 16  8  8  8  8  8  0 0 None
0x42  1  0  0  0  0  c .  .  3  3  2  0  0 32  8  0  0  0  0  0 0 None
0x43  1  0  0  0  0  c .  .  3  3  2  0  0 16  8  0  0  0  0  0 0 None
0x44  1  0  0  0  0 r  .  .  1  1  1  0  0 32  8  5  6  5  0  0 0 None
0x45  1  0  0  0  0 r  .  .  1  1  1  0  0 16  8  5  6  5  0  0 0 None
0x46  1  0  0  0  0 r  .  .  1  1  1  8  0 32  8  4  4  4  4  0 0 None
0x47  1  0  0  0  0 r  .  .  1  1  1  8  0 16  8  4  4  4  4  0 0 None
0x48  1  0  0  0  0  c .  .  1  1  1  0  0 32  8  0  0  0  0  0 0 None

Add sushi support

This plugin works great for me in Nautilus in Gnome in Arch for thumbnails, but I mostly look at my files in list view and hit space to open the Sushi preview. Unless I misconfigured something (entirely possible), stl-thumb images are currently not showing in that preview window.

Color

Hey! How do I change the color of the model?

fails to install under Win 10 with AVG

AVG worries about the installer, then says things are OK, then worries about a new EXE that the installer spawns, then says things are OK, and then the installation fails. I could find no way to add a comment to the thread about this under 3D printing. Google Plus remains unfathomable to me.

OBJ Support

Why not? I am really in a horrible situation where I need to support that as well and there's no option. You would do lots of good by offering a path to that.

Angle and rotation image is taken from.

Hello,
Love the program. Switched from using a botched together openSCAD script to this and it is much faster for producing images from STLs.

I was wondering if it might be possible to specify the angle the image is taken from. I am looking to do some thing in a more traditional isometric.

"Failed to initialize any backend" in Nautilus on Fedora 32

I've been spending some time trying to get this to work with Nautilus on Fedora 32, and I've been having some difficulty. I copied the stl-thumb-mime.xml and stl-thumb.thumbnailer files into the proper directories, and it seems that the thumbnails are failing. I check ~/.cache/thumbnails and it confirms that stl-thumb is indeed failing.
I tried to run the program directly using the same arguments found in stl-thumb.thumbnailer, and it was a success.
Moving on from there I turned on debug logging in nautilus and enabled the full rust backtrace and I get the following:

thread 'main' panicked at 'Failed to initialize any backend!
    Wayland status: NoCompositorListening
    X11 status: XOpenDisplayFailed
', /home/smunkel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.17.1/src/platform/linux/mod.rs:439:9
stack backtrace:
   0:     0x563641aefb7b - backtrace::backtrace::libunwind::trace::h89fcc71e59e3bc5b
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/libunwind.rs:88
   1:     0x563641aefb7b - backtrace::backtrace::trace_unsynchronized::h0bad9be1379e729a
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/mod.rs:66
   2:     0x563641aefb7b - std::sys_common::backtrace::_print::hd3382a1f33c473da
                               at src/libstd/sys_common/backtrace.rs:47
   3:     0x563641aefb7b - std::sys_common::backtrace::print::h0ec6f03cfb8e76a6
                               at src/libstd/sys_common/backtrace.rs:36
   4:     0x563641aefb7b - std::panicking::default_hook::{{closure}}::h96cbf7b454e3f557
                               at src/libstd/panicking.rs:200
   5:     0x563641aef856 - std::panicking::default_hook::h95a8f00337383d83
                               at src/libstd/panicking.rs:214
   6:     0x563641af02ed - std::panicking::rust_panic_with_hook::h92f98b46e22f14ed
                               at src/libstd/panicking.rs:477
   7:     0x56364182a9e5 - std::panicking::begin_panic::hd2cf872e4231bce0
                               at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/libstd/panicking.rs:411
   8:     0x563641845db2 - winit::platform::platform::EventsLoop::new::h757b1b855a4b3276
                               at /home/smunkel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.17.1/src/platform/linux/mod.rs:439
   9:     0x5636418a25c0 - winit::EventsLoop::new::he7d686194f608ef4
                               at /home/smunkel/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.17.1/src/lib.rs:207
  10:     0x563641283e4e - stl_thumb::create_normal_display::h54984bd35032c2b1
                               at src/lib.rs:47
  11:     0x5636412857f8 - stl_thumb::run::h198625ed6d48084b
                               at src/lib.rs:281
  12:     0x563641281f5b - stl_thumb::main::h8168c320fa2546a6
                               at src/main.rs:36
  13:     0x563641281440 - std::rt::lang_start::{{closure}}::h948c1248301db095
                               at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/libstd/rt.rs:64
  14:     0x563641aefcf3 - std::rt::lang_start_internal::{{closure}}::h4e93c1949c7a1955
                               at src/libstd/rt.rs:49
  15:     0x563641aefcf3 - std::panicking::try::do_call::h9440ccd4dc467eaa
                               at src/libstd/panicking.rs:296
  16:     0x563641af230a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:80
  17:     0x563641af07fd - std::panicking::try::hc046e7ee42ee744f
                               at src/libstd/panicking.rs:275
  18:     0x563641af07fd - std::panic::catch_unwind::h27dfc457c200aee0
                               at src/libstd/panic.rs:394
  19:     0x563641af07fd - std::rt::lang_start_internal::hea1b49a567afe309
                               at src/libstd/rt.rs:48
  20:     0x563641281419 - std::rt::lang_start::hf88e3fb35de2b0de
                               at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/libstd/rt.rs:64
  21:     0x5636412822ca - main
  22:     0x7f2544419042 - __libc_start_main
  23:     0x56364128122e - _start
  24:                0x0 - <unknown>

Doesn't work on Ubuntu 18.04

Because library libOSMesa.so that this thing uses is not there, libosmesa6-dev should be added as a dependency.

0.3.1 crashes instead of making a thumbnail

Just tried new version, it says:

ERROR - 0:1(10): error: GLSL 1.20 is not supported. Supported versions are: 

thread 'main' panicked at 'Compiling shaders', src/lib.rs:110:13

I'm not sure who's fault this is, but just in case:
I'm using Nvidia GTX 960 with 390.116 driver on Xorg 1.19.6
I do have some Intel integrated GPU, but it is diabled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.