Elektriktrick STL, DXF, and GCode QuickLook for Apple OS X (including Mavericks)

by matthiasm, published

Elektriktrick STL, DXF, and GCode QuickLook for Apple OS X (including Mavericks) by matthiasm Jun 27, 2014

Thing Info

9321Views 2786Downloads
Report Thing


Current Version is 1.0.3! Please update for OS X 10.10 and 10.11!

QuickLook is a wonderful thing on Mac: just hit the space bar with any file selected, and a big preview of that file will be shown instantly. Unfortunately this will not work for STL files. Older QuickLook implementations will no longer work for Mavericks as OpenGL rendering is no longer possible due to sandboxing.
Elektriktrick STL QL uses standard graphics to get around that limitation, It works for QuickLook previews as well as for Icon previews.
Please see Instructions on how to install.

  • Version 1.0.1 changes the camera position to a more common location
  • Version 1.0.2 adds GCode rendering for files anding in .gcode and .bfb
  • Version 1.0.3 fixes issues with Mavericks and makes installing easier by providing a simple app that is dragged into the /Applications folder




Download and open the disk image. Drag the Elektriktrick App into the Applications folder. The App itself does absolutely nothing, however it contains the QuickLook plugin and registers it for you.

The rest of this documentation is for back reference only

Unzip the .zip file and move the resulting ElektriktrickQuickLook.qlgenerator into /Library/QuickLook if you want this module for all users, or into ~/Library/QuickLook if this is only for you.
Yes, the file is compressed only 16kB small. This is correct.
If QuickLook does not work right away, go to the shell and run qlmanage -r and qlmanage -r cache or log out and log back in again.
If it still does not work, and you see a white cup on a dark brown surface as a preview, a software named 'Pleasant3D' is installed somewhere on your computer (Autodesk360 installs it, for example). If you want Elektriktrick to work, you need to delete Pleasant3D completely (even empty the trash). I will try to fix that in the next version.
If you see no preview, but the logo of some other app, you most likely have some program that incorporates Pleasant3D, usually "Cura". For now, the only way I found to make Elektriktrick work, is to remove Cure from the Harddisk, including the Trash.
If that still does not solve the issue, please open the Terminal in /Applications/Utilities/Terminal and enter this command qlmanage -d 2 -p oneOfMyFiles.stl > ~/Desktop/qldebug.txt . This should generate a file named qldebug.txt on your desktop. Please send that file to [email protected].

Thing Info

9321Views 2786Downloads
Report Thing

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

All Apps

No results.

Thank you works great on Mavricks after reboot.

This is wonderful, thank you!

Version 1.03 installed perfectly onto OS 10.11.3 El Capitan.

To install: Drop one plug-in into your library/quicklook folder and provide userid/password. Then drop the app into the Applications folder, launch it, close it, and enjoy the new previews!

I never knew about the space bar shortcut either. Thanks for the plug-in! It's cool!

Report: running Yosemite.
At first the plugin did not work, but it made pleasant3D work - so it was showing previews in pleasant3d colors. Interesting.
Then it suddenly stopped working.

I uninstalled pleasant 3d. Re-installed and run elektrik

-> nothing.

Had to manually copy the quicklook file into the quicklook folder just like @deschell. trouble is mac claims one needs to authentificate to make changes to the quicklook folder, but unless the file is copied manually, the authentification screen never loads.

works great.

Any chance of a version with stl support removed? With native 10.11.1 (maybe because of Xcode install?), the stl files have quick look support, with the ability to rotate in quick view also. I'd still love to be able to see gcode files though.

Find the file named 'ElektrikTrickQuickLook-Info.plist' insides the App or QuickLook archive and edit out the lines that add STL support to the QL.

Hmmm... I tried it again, still didn't work for me. Editing /Library/QuickLook/ElektrikTrickQuickLook.qlgenerator/Contents/Info.plist from 1.0.3. Went back to QL 1.0.2, found the file you mentioned and the edit worked. Good enough. Thanks.

Oct 31, 2015 - Modified Oct 31, 2015

For me stl files works great, but .gcode files shows a blank white paper

gcode files from Slic3r works, but not code files from kisslicer... Any ideas?

Oct 31, 2015 - Modified Oct 31, 2015
matthiasm - in reply to Basjohan

If you like, send me your gcode file and I will check it out next week. mm at matthiasm dot com

Will do, I'll send one working file and one thats not working :)

Not working in Yosemite 10.10.5 (14F27) for me. I did the resets, unlinked Adobe Flash, restarted the computer (macbook Air), still nothing. I sent an email with debug info.

Did you try v1.0.3? It should work by just dragging the App into the Applications folder. If not, please send my the debug output as described in the instructions.

yes, that's the only one I used.

I already sent the debug text over an hour ago.

Thanks for the support - reporting findings here:
I had to manually copy the file from the .app/Contents/Library/Quicklook/ into /Library/Quicklook

Thanks for the feedback. I wonder if this is related to permissions, and how this could be fixed.

Worked for me for a long time, but now its broken. Have reinstalled it but still no preview... It seems that it starts to render and crashes somehow. OS X 10.10.5

Me too OS X 10.10.5 :( STL files are blank BUT the GCODE files still render. Odd...
Your program is SO valuable to our company. Please add a PayPal link to your www.elektriktrick.com site.
Best regards - Brad

Looking deeper into this it appears that XCode or Command Line Tools might be involved as they were updated last.

That's fast! No luck. Sent email with debug file and screenshots. Also... upgraded to Parallels 10 in the last few days.
Thanks - Brad

Please try version 1.0.3 . It should fix the Mavericks issues. Thanks.

Matt - FIXED!!! and installation is even simpler AWESOME... - Brad

I don't have 10.10.5 yet. I will update the program as soon as I have the new OS (assuming I find the issue).

Any news on fixing the conflict with Pleasant3D?

This should be fixed in 1.0.3

Nope, sorry. I did not have the time yet.

Quick look works great ... and after waiting a while I see I can now view STLs in the Cover Flow also, awesome!

This comment has been deleted.

Works great!
Even with Pleasant 3d on my mac.

Any way to fix this without removing Cura and/or Pleasant3D?

This should be fixed in 1.0.3

Sigh. Yes, I know, I promised. It will happen. Sorry.

thanks, works after the tip from @whosawhatsis:

To clarify for anyone trying to reproduce this, I did Show Package Contents on the quicklook bundle, opened info.plist in a text editor, then changed this: LSItemContentTypes


to this:

LSItemContentTypes com.elektriktrick.stl com.pleasantsoftware.uti.stl and then in terminal: qlmanage -r qlmanage -r cache [removing all the qp from the cura package didn't work somehow]

Works great! had to remove Cura, but was not using that app anymore anyways. Thanks!

Just installed this on Yosemite. Works great! Thanks for the great Quicklook plugin!

Running OSX 10.9.5 works wel for gcode but .STL fails.
I run CURA and don't want to de-install this as its the best out there. Any other workarounds

This should be fixed in 1.0.3

Maybe it is possible to remove the QL PlugIn inside Cura since it does not work anyway. I was not successful doing it though.

Installing Yosimite fixed the issue. Works great on .stl now

Matthias -

LOVE your QL Generator!!! Yeh man! Fantastic :)

Brad - www.UltiBots.com

Oct 19, 2014 - Modified Oct 19, 2014

nice, but stl would be the thing im interested in. why can't there run OpenGL in the sanbox of the plugin? sorry im no programmer...
possible to allow using OpenGL with admin rights for the plugin?

STL is shown. You do not need OpenGL to render 3D. Sure, it makes things easier and faster, but ist works quite well without. Why OpenGL is no longer allowed in the Sandbox? Apple will know. I don't ;-)

STL will not be shown for me only gcode..? thx

This should be fixed in 1.0.3

Oct 19, 2014 - Modified Oct 19, 2014
3gfisch - in reply to matthiasm

ah thx then i try a reboot for now i only can see gcode in quicklook
edit: i only see the Meshlab icon.. :-/

If you can not see the STL preview, another QuickLook plugin is chosen by the OS. Please create a log file as described in the documentation and send it to me. I will probably be able to tell you which app is attempting the preview (usually Cuda).

Thank you! I've noticed that some files don't render quite right. Fortunately the point of a quick look plugin is to be able to preview the contents and this plugin works great for that purpose!

Yes, you can have rendering errors. Since I can not use OpenGL in a QL app, I need to use regular graphics calls. This requires that I sort the triangles in Z order, which is not always easy or fast or possible. As a result, there are occasional render order problems, but OTOH the plugin is quite fast and renders even very detailed objects in a great time.

Aug 8, 2014 - Modified Aug 8, 2014

i dont really like the kind of purple-blue in the background of the stls
but a awesome functionality.

The background color is just some spontaneous color value that reminded me of the sky of the day. I will try to find a way the QuickLook plugins can use preferences and make some aspects of the program changable.

First it did not work for me too. The reason was cura... after uninstalling it worked fine. Since I used cura only for test purposes it's ok for me. But maybe you'll find a better way
[DEBUG] Loading <qlgenerator users="" max="" desktop="" cura="" cura.app="" contents="" library="" quicklook="" stlquicklook.qlgenerator="">

This should be fixed in 1.0.3

Ok, now that I have it working, can we address the issue that the plugin views models from the back (positive Y, looking toward negative Y) rather than viewing from the front (negative Y, looking toward positive Y) as one would expect?

I did it this way because this is how it is viewed in my XYZprinting software. Many of my models point the correct way now, but most of them are probably wrong.
I am in the process of integrating the QuickLook plugin into a viewer app, which could then provide a user interface to set the preferred camera position.
Suggestions welcome.

I haven't tried that app, but all of the ones I've used (I've tried almost every non-proprietary app at one point or another) consistently display them the other way, so I think that should be the default.

Allright. I verified with various apps and changed the rotation. I will put this in version 1.1 .

I'm not seeing any change of rotation in 1.0.1.

Make sure that you download the new version 1.0.1. Remove the original plugin (/Library/QuickLook/Elektriktrick... or /Library/QuickLook/Electrictrick...). Then reset the Quicklook manager: "qlmanage -r" and "qlmanage -r cache", the install the new module and try again. I just verified this on my machine, and the models are definitely rotated 180 degrees around the vertical axis now.

Yeah, did that, models are still facing away from me. FWIW, I downloaded the 1.0.1 disk image, but get info on the file inside still says version: 1

No luck here either. BTW, Cura includes the broken quicklook plugin from pleasant3d. I removed all copies of that one, now I'm seeing this in the qlmanage -d out put:
[DEBUG] Previewing file:///Users/who/Downloads/web/cornercube.stl. Content type UTI: com.pleasantsoftware.uti.stl. Generator used: None
Quicklook window just gives me the plain white document icon. It appears that although I've removed all traces I can find of pleasant3d and its quicklook plugin and set my default app to something else, the bundle identifier is still pointing to it for some reason.

HA! If you can't beat 'em, join 'em. Adding com.pleasantsoftware.uti.stl to the LSItemContentTypes array in the quicklook plugin's info.plist made it work!

To clarify for anyone trying to reproduce this, I did Show Package Contents on the quicklook bundle, opened info.plist in a text editor, then changed this:
to this:
There's probably another identifier that Autodesk 360 is using that can be added to the list to make it work without removing that. The output from the qlmanage -d... terminal command below should tell you what this identifier is.

Thanks for finding this. This is a good patch, but I am not sure if it would be a good idea to integrate this into Elektriktrick. Kinda feels like hijacking someone else's app ;-)

Well, yeah, but without your own app to set the bundle identifier associated with the .stl extension, there doesn't seem to be any other way to get around it. If you're making your own viewer app to go with it the plugin, that might solve the problem.

Just for completion: my problem was seemingliy caused by autodesk 360. That must have installed pleasant3d what blocked the new plugin. After I removed 360 it works great!

Great. Thanks for the feedback!

To find the problem, could you please open the Terminal in /Applications/Utilities/Terminal and enter this command qlmanage -d 2 -p oneOfMyFiles.stl &gt; ~/Desktop/qldebug.txt . This should generate a file named qldebug.txt on your desktop. Please send me that file so that I can find out what is going wrong. Thanks!

Send you a PM

The plugin works by linking itself into the QuickLook list of plugins. There is no need for an application. Make sure that no other application is offering a QuickLook for STL. For example, Pleasant3D by PleasantSoftware also provides QL for STL (which unfortunately fails on Mavericks). You must remove Pleasant3D or assign STL files to a different App for my Plugin to work.

Sorry, but it doesn't work neither for me. Running OS X Mavericks if it does matter.

it's not working for me. all I get is the white papersheet icon. Do I have to link the STL files to a specific application?