Loading
Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

STL to OpenSCAD converter

by Riham, published

STL to OpenSCAD converter by Riham Mar 16, 2013

Description

This is a small web page that will convert your STL files to OpenSCAD files, it supports both ASCII STL and Binary STL files.
The best thing about this is that instead of just embedding your stl files in the OpenSCAD you can actually make them part of it, which means they can be used with Customizer.

*********THIS IS A BETA VERSION - I wrote it after a long day at work when I needed such a tool and didn't find one:)
Please report all bugs to me, or just feel free to fix the bugs yourself, the JSFiddle is available publicly, you can fork it and make any changes *******
*********This was tested only on Chrome - several people have left comments saying it doesn't work on other browsers, unfortunately I haven't had a chance to make it work on other browsers, but you can use the standalone version provided by fma at thingiverse.com/thing:64709 *******

Recent Comments

view all

I don't know if I'm doing something wrong. it did download a file as "FromSTL" but causes openscad to crash when I try to open it, so I tried open with notepad and that crashed as well, I used Chrome on windows 7

Sorry about that, I haven't tested it on IE, but there is also a standalone version (see remixes) that might be easier to use.

Does it fail to open the converted file? What happens if you just open openscad and then copy and paste the file content?

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

Instructions

I really wanted to be able to create designs on 3D software and still be able to customize it, most of the software I found generates STL files and I can't find a way to convert it to openSCAD - so I created this small web page. I attached a sample project I created on tinkercad.com and the generated OpenScad file for it.

If you find this useful, please make your thing a derivative of this one :)
Update: 3/19 I tested this only on Chrome Version 25.0.1364.172
Update: 3/19 I made a number of bug fixes, if you hit errors before please try again.
Update: 3/23 fma has also created a python standalone version of the converter - check it out here thingiverse.com/thing:64709
Update: 3/28 I made some minor bug fixes, please let me know if you are unblocked.

1- Go to jsfiddle.net/Riham/yzvGD/embedded/result/
2- Browse for your STL file
3- Wait for processing to finish
4- Click on the Download link.
5- If you want to look at the code, the JSFiddle is available at jsfiddle.net/Riham/yzvGD/

Comments

You must be logged in to post a comment.

Wurtle38 on Apr 11, 2014 said:

I don't know if I'm doing something wrong. it did download a file as "FromSTL" but causes openscad to crash when I try to open it, so I tried open with notepad and that crashed as well, I used Chrome on windows 7

boelle on Oct 16, 2013 said:

hmm.. that error does not happen with other openscad files.... what could be wrong?

Riham on Oct 21, 2013 said:

Does it fail to open the converted file? What happens if you just open openscad and then copy and paste the file content?

boelle on Oct 16, 2013 said:

it was an error from m$ visual c++ runtime lib :-(

boelle on Oct 16, 2013 said:

worked fine in chrome... thou openscad now throws a funny runtime error.... will try and reinstall openscad

boelle on Oct 16, 2013 said:

Tried this on IE10 and like others nothing happens.... hmm... chrome could be a temp fix, but it should relly run with any browser...
only reason i dont have chrome is that i have given up on the browser war.. everybody says to use this and this... i would end up with 10 browsers :-D

Riham on Oct 21, 2013 said:

Sorry about that, I haven't tested it on IE, but there is also a standalone version (see remixes) that might be easier to use.

SirGeekALot on Apr 9, 2013 said:

I haven't tried this yet, but if it works (more reliably than STL import into Sketchup, which frequently fails) then you have just made sharing models easier! Thanks!! :-)

Nathan_ on Apr 1, 2013 said:

Thank you so much! Now I can finally add rafts to tricky models.

TheNewHobbyist on Mar 28, 2013 said:

I was thinking about how cool something like this would be for Customizer today. Looks like you've already made it! Nice work, I'm looking forward to using it in the future.

Riham on Mar 29, 2013 said:

Glad you liked it:)

perlguy on Mar 22, 2013 said:

can't download once i upload a file. the link looks like blob:http://fiddle.jshell.net/linky... Clicking on it does nothing in my browser. Trying to remove the "blob:" before the http gives me a 404.

Riham on Mar 22, 2013 said:

Which browser are you using? I tested this only using Chrome

fma on Mar 22, 2013 said:

Here is a standalone version written in python:

http://www.thingiverse.com/thi...

Riham on Mar 22, 2013 said:

Awesome! Thanks!
Do you mind if I add a link to it?

anewsome on Mar 22, 2013 said:

The link does not seem to work any longer

Riham on Mar 22, 2013 said:

Could you please try again now?

Spiritdude on Mar 19, 2013 said:

Thanks for the STL reader, I already adapted it.

The problem is in ASCII STL reader, following line #89

for (o = 0; 0 < obects.length; 0++) { // 0 instead of o

should be

for (o = 0; o < objects.length; o++) {

Riham on Mar 19, 2013 said:

Wow, I must have been really low on caffeine, I fixed the bug, thanks

fma on Mar 18, 2013 said:

Looks great, but I can't make it work neither :o( Nothing happen when I select a file...

Riham on Mar 18, 2013 said:

Sorry about that, I tested it with a few random files - If you send me the file I will debug it for you, my email is riham at outlook.com

jamesarm97 on Mar 17, 2013 said:

Download after convert wasn't working for me. There is a link but nothing downloads.

Riham on Mar 17, 2013 said:

That probably means the conversion failed, would you like to send me the file to debug or point me to it?

DFarms on Mar 17, 2013 said:

this is awesome, now i can make my gs3 case truly customizeable.

Riham on Mar 17, 2013 said:

Thanks, let me know how it went when you try it :)

Top