CloudSCAD

This is a little premature, but I wanted to share some progress I've made today on an idea I've been thinking about for a while now.  When I'm not hacking on 3D printers, my day job is web development so it's about time I start using my real skills for this stuff.  I call it CloudSCAD - it's OpenSCAD for the web.  It lets you write, share, mashup, and customize parametric 3D models using the OpenSCAD scripting language all within the browser and doesn't require anything to be installed locally.

As you can see in this screenshot, one of the cool things it does is parse the OpenSCAD script looking for parameters.  Then presents those variables in a friendly HTML form so that people can modify an object for their needs and click a button to download the customized STL file suitable for printing on a 3D printer.  They don't have to know anything about OpenSCAD, install anything, or touch a line of code.  Also, the author of the script doesn't have to do anything special - just put some well placed comments in their code.

What you can't see is the edit page.  I'm using Bespin to provide a syntax color coded editor for writing scripts.  I hope it will eventually include code completion and a few other things.  In some ways this is (or could be) even better than the editor in OpenSCAD itself.

There is a REST api.  For instance, you'd be able to download this script by going to http://cloudscad.com/scripts/1.scad and the stl output by going to http://cloudscad.com/scripts/1.stl and say you wanted the hole to be 8mm in diameter you could say http://cloudscad.com/scripts/1.stl?hole_diameter=8 Eventually you may even be able to say http://cloudscad.com/scripts/1.gcode, but I'm getting ahead of myself...

Like I said, this is pretty premature.  I've registered CloudSCAD.com but there's nothing there for you to see yet.  Everything you see in that screenshot and what I've described is finished, though.  Not too bad for one days work.  ;)

Filed under  //   makerbot   openscad   rails   reprap   ruby   rubyonrails  

Comments (22)

Aug 22, 2010
whosawhatsis said...
This. Is. AWESOME!

I was thinking a while ago that I wished I could use openSCAD on my iphone, and this will let me do that. The only problem I see is that, I assume, rendering is done server-side, so you can't rotate and zoom models around easily, which is important for all but the most basic models. Or did you have some HTML 5 sorcery in mind?

That concern aside, with the syntax highlighting and line numbering, this appears to already be BETTER than openSCAD. If you need someone to bang on it and see if it breaks, I have been described in the past as the ideal beta tester.

Aug 22, 2010
 said...
Wow, you realize what you are doing right?

With this application, any human in the world who has a low grade smart phone will be able to design items.

Free CAD for the developing world. Tony, you are truly a great man.

Aug 22, 2010
 said...
I've idly thought about the need for something like a cloud-CAD app for some time. To do proper CAD work you need a workstation costing several thousand dollars. I've got this kind of capability due to the nature of my consulting work, but most people don't. Clearly this kind of purchase will be beyond the means of many, especially in the developing world.

The only problem I see with the concept is the screen resolution and bandwidth required to give the user a workable interface. I'm using several cloud apps in my day job at the moment and I haven't been overwhelmed with their screen response time. :-(

Aug 22, 2010
Stony said...
Incredible!.. Let us know if you need
Aug 22, 2010
Brian Korsedal said...
That is amazing. Seriously.

You should see if you can get it integrated with Thingiverse.

It would be great if when you look at things on Thingiverse you could also edit the code/parameters right in the browser. Maybe if there were better versioning control on Thingiverse you could click and save a derivative work from your webapp.

-Brian

Aug 22, 2010
Brian Korsedal said...
If you need some extra work, I suggest contacting Makerbot and seeing if you can get paid to work on Thingiverse.

http://blog.makerbot.com/2010/08/04/makerbot-is-hiring-web-warrior-wanted/

-Brian

Aug 22, 2010
whosawhatsis said...
I second the thingiverse integration. At the very least, you could add a "Thing it!" button to post to thingiverse from CloudSCAD, with scad file and STL automatically transferred and a link to the CloudSCAD page inserted into the description, but I'd definitely try to work with them to do more. It would be great if, rather than rendering scad files like they do with every other file type when you upload them, thingiverse could use this parameter autodetection and produce custom STLs on the fly.
Aug 22, 2010
Stony said...
Are you aware that there is an API such that you could directly upload the models to be printed at www.shapeways.com?
Aug 22, 2010
Giles Bathgate said...
One of the things that I feel thingiverse really lacks is good version control. It would be really great if cloudscad could use a git scm system as the backend, allowing you to merge and track changes.
Aug 22, 2010
Brian Korsedal said...
Yea, thingiverse really needs version control.
Aug 22, 2010
Erik de Bruijn said...
What!?!?!?! I knew exactly what this was about because I was planning to build something similar and also call it CloudFab. Ever since I discovered you could run OpenSCAD from the command line this seemed like a logical conclusion. So I definitely think this is majorly important work and I'm glad that you picked this up!!

Plus, this really fits well with Eric von Hippel's theory on toolkits and the mass customization literature (Google for Frank Piller), which you should definitely read.
http://web.mit.edu/evhippel/www/democ1.htm
Chapter 11 is on Toolkits, which OpenSCAD with a customizable GUI is definitely going towards!

Aug 22, 2010
Brian Korsedal said...
You might have a killer app on your hands. If you integrate versioning control and integrate with facebook (insto blog about anything you make on your wall). Host it on cloudscad.com and put up some adds.
Aug 22, 2010
This is great. It is right along the lines of things I have been thinking about http://reprapbreeding.blogspot.com/2010/08/my-new-pocket-computer-another-bir... and http://open3dp.me.washington.edu/2010/07/what-wee-really-need-next/. I hope this leads to CAD on my phone...
Aug 22, 2010
Tony Buser said...
So far as bandwidth for a workable interface goes - It's not that much of a problem since the modeling isn't exactly done in real time. The idea is that it will work similar to how the OpenSCAD editor itself works. You write code, click compile, and it generates the model. Right now I'm investigating using OpenSCAD to generate multiple thumbnail images at different angles which will be pretty fast. I'm also looking at using HTML5/WebGL to let you spin the compiled object around in real time, however that's not exactly widely supported yet. The other idea was to use a Java STL viewer, but that has lots of downsides too. For now it works by just downloading the STL for you to view in a local viewer. (I use Pleasant3D on my mac)

For code editing, unfortunately, Bespin doesn't (yet) support mobile browsers. The iPhone/iPad ALMOST works. Apparently, mobile safari doesn't yet support the HTML5 canvas text rendering it uses. However it DOES work fine when I drop back to using a plain textarea, which is about equivalent to the current OpenSCAD editor. :) I couldn't find any web code editors that work right on mobile browsers.

I'll definitely add versioning. That's something I always wanted with Thingiverse. One thought I had was since CloudSCAD will have an API, it should be pretty easy to like write a post commit hook if you're using svn or git locally to upload/publish your code to CloudSCAD.

I didn't know Shapeways had an upload model API, I'll definitely look into that. I had already planned on integrating with CloudFab's API to submit objects to be printed. However, one of the great things about APIs is I wouldn't really have to do it. Someone else is free to hook into it to do all kinds of awesome things like this. Thingiverse really needs an API too.

Aug 22, 2010
Marty said...
Great work, Tony!

I've been working on a similar project this weekend, but I'm using stl2pov and povray to render the STLs output by OpenSCAD. Your images look like they're coming from OpenSCAD directly? Do you have a cool hacked-up version of OpenSCAD? :)

One thought I had for interactivity is to use a small Flash app to load up the STL directly and let people pan/zoom around it.

Aug 22, 2010
said...
nice....
Aug 22, 2010
Tony Buser said...
@marty I had found stl2pov too (I wonder if this is what Thingiverse uses?) Until I or someone can hack into OpenSCAD the ability to produce images from the command-line, this might be what I'll use. My idea was to use it to generate multiple views and then use javascript instead of flash to do a fake rotation interaction.
Aug 23, 2010
Erik de Bruijn said...
Please feel free to use my stl2pov + Javascript viewing tool!! It's in The RepRap SVN. It is already designed to be embeddable where you want it.
Example: http://reprap.vps.budgetdedicated.com/stl2web/viewer.php
To get a local copy of these tools:
svn co https://reprap.svn.sourceforge.net/svnroot/reprap/trunk/users/erik/stl2web
If you make changes send me the diff or let me know where you'll be developing the code further so I can point people to that instead.
Aug 23, 2010
Matz said...
@Tony dude... this is freaking awesome. In ONE day? OMG, I wish I were 1/100th the developer you are. Even if it were usable for free on the web, I'd pay to have a dedicated app on my iPad for sure. I don't know what the market is for something like this, but you should publish it and see where it takes you. You could make a shipload of extra cash to build more Makerbot / Reprap toys!
Aug 28, 2010
arcol said...
I was planning since months exactly the same idea. Cant believe somebody else picked up...

Despite webGL is not widely supported, I would go this way, because it gains more and more support. In a year or two all major browsers will support it out of the box.

For me, I was blocked by the fear of not having enough 3D/openGL knowledge, and I lack the proper resource on it.

I wish good luck, and if you are going the webGL way and you use proper licensing (for web app I think Affero GPL is the best solution).

Best regards,
Laszlo
http://blog.arcol.hu

Aug 28, 2010
arcol said...
...I try to contribute too. the last line is missed from the previous comment.
Aug 28, 2010
Tony Buser said...
I made some great progress with an all javascript STL loader for the three.js renderer. It works great with canvas and also has a webgl version. You can play with it here: http://cloudscad.com/stl_viewer

Leave a comment...