Github's stl viewer

I was wondering if we could in any way take advantage of github's built-in (new) STL viewer in some way.

link to just the viewer

https://render.githubusercontent.com/view/solid
  ?commit=a0300cdb440445fa49e7412e06de187f718c67a2
  &enc_url=68747470733a2f2f7261772e67697468756275736572636f6e74
   656e742e636f6d2f4f7574736f7572636564477572752f72756e65732f61
   303330306364623434303434356661343965373431326530366465313837
   6637313863363761322f3037436f6e73747261696e742d4e656365737369
   74792d5061696e2e73746c
  &nwo=OutsourcedGuru%2Frunes
  &path=07Constraint-Necessity-Pain.stl
  &repository_id=181796624
  &repository_type=Repository#a33df192-8fb0-449f-b357-6a9956a08a42

Yes please! I currently open stil files for viewing with Meshlab but for me, a browser based solution would be preferable.

Was one of my first plugins I created....

Of course, not ideal because you have to upload stl files to the octoprint server, but I think the github would have a similar issue. It has to have access to the file you want to view.

2 Likes

Thanks. I just installed your plugin then realised that to use it, I'll have to upload the STL file to the pi.
Currently I run Cura on the desktop (more powerful) and just have Cura upload the gcode to the Pi.

Perhaps time to look at Samba to share the files.

Yeah, I personally use Slic3r Prusa Edition and never really used the plugin. It was a random request. I use netfabb basic to just look at files.

I used to use netfabb when there was a Linux version.

The last Linux version is still around :wink:

1 Like

Guys, I was thinking maybe in terms of something that works like or alongside the GitFiles plugin that I've already made (which matches up with a github repository). In theory, the person could also push up the related STL file as well.

Then—in some way—by querying the github API one could in theory frame that content in an OctoPrint tab perhaps.

Definitely sounds like an enhancement to your GitFiles plugin. I'm not familiar with Github's api so couldn't tell you exactly the best approach though. Adding a tab with an iframe and changing the src attribute is super easy though and I'm sure you already know how to do that.

You know what I think would be a lot more useful is a plugin for firefox to open STLs from a link. Then you can just hit the download button, and it would open in a new tab, like PDFs do. Or course, you've got to also do chrome, and edge, but if it's all javascript, it's probably pretty quick to duplicate.

1 Like