Notifiche
Cancella tutti

How to view gcode thumbnails on PC?  

Pagina 1 / 2
  RSS
bobc
 bobc
(@bobc)
Reputable Member
How to view gcode thumbnails on PC?

I love the preview thumbnail you get on the Mini. I am wondering if there is any software to view the thumbnails on a PC?

I don't know if this is a standard feature of slic3r or something Prusa have added, but searching google and this forum didn't seem to give any relevant results. At least if I knew the format I could write my own viewer.

Any info appreciated.

Postato : 07/03/2020 11:00 am
Lichtjaeger
(@lichtjaeger)
Noble Member
RE: How to view gcode thumbnails on PC?

The pictures are base64 encoded.

Open the gcode file with a text editor.

Copy the lines between "thumbnail begin ..." and "thumbnail end" and remove the "; " at the start of each line.

Then you can use a tool like this to render the picture.

Postato : 07/03/2020 11:15 am
bobc
 bobc
(@bobc)
Reputable Member
Topic starter answered:
RE: How to view gcode thumbnails on PC?

I think I will write a C# application to view them then.

Postato : 07/03/2020 11:43 am
With_Maltodextrin e SS220 hanno apprezzato
With_Maltodextrin
(@with_maltodextrin)
Trusted Member
RE: How to view gcode thumbnails on PC?

@bobcousins

Pulling the image shouldn't be too bad - the image previews that PrusaSlicer embeds in the gcode files are base64 encoded .png files, like so:

;
; thumbnail begin 220x124 18444
; iVBORw0KGgoAAAANSUhEUgAAANwAAAB8CAYAAAACRt5vAAA10ElEQVR4Ae2dZ3RcxdnH9UISEhLOgQ
; MkBGyMG264SraK1aurJEvucpMty5bcjRumGGyKDcY0Y2NjMKYGHDDVYIMLJZDwQhpvck76t+QjOTn5
...snip...

I think the hardest part of writing the application will be to properly integrate with Explorer to present yourself as the thumbnail handler for .gcode files, guessing it'll be some COM garbage but have not personally tried.

Postato : 07/03/2020 10:32 pm
jkavalik
(@jkavalik)
Utenti
RE: How to view gcode thumbnails on PC?

I am going to try today to make a shell extension to show the thumbnails.

Postato : 08/03/2020 9:20 am
MichaelR64 hanno apprezzato
bobc
 bobc
(@bobc)
Reputable Member
Topic starter answered:
RE: How to view gcode thumbnails on PC?

I wrote a standalone application, it was quite straightforward. It displays the thumbnail and some other bits of info like the print time. It can also generate the png as separate files, so Windows preview can display them.

It would be much neater with a shell extension, that's one of those things I would like to write but never figured out how. I can think of a few other file types I would like to get a preview for.

Postato : 08/03/2020 11:34 am
jkavalik
(@jkavalik)
Utenti
RE: How to view gcode thumbnails on PC?

I made it work for me (Widnows 8.0 here) and put the code and binary release at https://github.com/jkavalik/GcodeThumbnailExtension

When registered it is used for *.gco and *.gcode files, checks the first 1000 lines to find a thumbnail and if it is present, then it gets the last of them (there can be multiple, my tests shoved two being generated, the first being 16x16px, probably for file-list preview) and returns it as the thumbnail image.

 

Currently there are no other info extracted but the SharpShell library I used to implement it allows another extensions modifying the tooltips, properties etc. so expected time, filament length and for example profile used might be added later.

Postato : 08/03/2020 12:48 pm
With_Maltodextrin hanno apprezzato
towlerg
(@towlerg)
Noble Member
RE: How to view gcode thumbnails on PC?

@bobcousins

Will you be posting the code?

Postato : 08/03/2020 1:08 pm
Chocki
(@chocki)
Prominent Member
RE: How to view gcode thumbnails on PC?

Sorry, don't know what you wrote the app with, but AUTOIT allows the functionality you describe:

https://www.autoitscript.com/forum/topic/129955-_shellfile-create-an-entry-in-the-shell-contextmenu-when-selecting-an-assigned-filetype-includes-the-program-icon-as-well/

Maybe get some ideas or even see if your code can be ported to AUTOIT.

Normal people believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet.

Postato : 08/03/2020 1:10 pm
towlerg
(@towlerg)
Noble Member
RE: How to view gcode thumbnails on PC?

Googling around I found this http://gcode.ws/ I don't normally like online apps but it seems to work.

Postato : 08/03/2020 1:30 pm
bobc
 bobc
(@bobc)
Reputable Member
Topic starter answered:
RE: How to view gcode thumbnails on PC?
Posted by: @towlerg

@bobcousins

Will you be posting the code?

Sure, I will put it on github.

Postato : 08/03/2020 1:53 pm
towlerg hanno apprezzato
Fitz
 Fitz
(@fitz)
Active Member
RE: How to view gcode thumbnails on PC?

I googled "gcode viewer" and found a simple on-line app that works very well.

Postato : 31/03/2020 5:30 pm
Prusatv
(@prusatv)
Eminent Member
RE: How to view gcode thumbnails on PC?

@jkavalik

I ran the install from your github link above, and after some of your assistance, I now have images for my gcode files ... which helps me find files much easier ...I really appreciate your efforts !!!

Thank You !!!
Stay Safe and Happy Printing !

Postato : 26/05/2020 1:12 am
oltre81 hanno apprezzato
oltre81
(@oltre81)
New Member
RISPONDI: How to view gcode thumbnails on PC?

sorry, i'm a poor italian, what i need for instal your preciuos dll on my windows7 system?

i try to search server registration manager but i didnt find :,(

Postato : 20/10/2020 12:35 am
jkavalik
(@jkavalik)
Utenti
RE: How to view gcode thumbnails on PC?

@oltre81

Simplest should be downloading the 'v1.0.zip' from https://github.com/jkavalik/GcodeThumbnailExtension/releases/tag/v1.0

That contains all the necessary files.

Postato : 20/10/2020 6:03 am
towlerg
(@towlerg)
Noble Member
RE: How to view gcode thumbnails on PC?

Octoprint has a plugin to do this.

Postato : 20/10/2020 2:55 pm
--
 --
(@)
Illustrious Member
RE: How to view gcode thumbnails on PC?

Prusa Slicer 2.3.0 has a gcode viewer that rides along with the slicer. No more searching for some 3rd party app or website viewer.

Questo post è stato modificato 4 years fa da --
Postato : 20/10/2020 4:11 pm
oltre81
(@oltre81)
New Member
RISPONDI: How to view gcode thumbnails on PC?

many thanks @javalik for your fast answer, great!

in late night yestrday i'm find that and try to install, but didn't work....i must work on it i think

@tim, i don't sure that preview run in windows explorer...

sorry to all for my italian english

Postato : 20/10/2020 9:16 pm
oltre81
(@oltre81)
New Member
RISPONDI: How to view gcode thumbnails on PC?

@tim i mean don't generate thumbnails in explorer...

Postato : 20/10/2020 9:23 pm
--
 --
(@)
Illustrious Member
RE: How to view gcode thumbnails on PC?

If you install 3D Builder from teh Windows App store, it builds 3D previews in explorer. But the app must own the extension.

If you want to preview gcode files - examine how they build when printing - Prusa Slicer 2.3.0 has that capability (2.2.0 does not).

Here's both in play:

Postato : 21/10/2020 2:14 am
Pagina 1 / 2
Condividi: