Loading

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

OpenJsCad: like OpenSCAD, but using JavaScript

by joostn, published

OpenJsCad: like OpenSCAD, but using JavaScript by joostn Jan 20, 2012
0 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps

Contents

Tags

Use This Project

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

Thing Statistics

9128Views 399Downloads

Summary

Not sure how to announce this other than by uploading a 'thing'. So here is one.

Enthousiastic about OpenSCAD but somewhat frustrated by the limitations of its language, I've worked on an alternative using Javascript. It's free, completely open source, still seriously under construction, based on Evan Wallace's CSG.js library and can be used in a web browser,

See: http://joostn.github.com/OpenJsCad/

The benefits over openSCAD are mainly in the language itself: you can use dynamic arrays for example, and solids can be stored in variables.

UPDATE: I've added a parser for local files as well. Create your own .jscad files, go to

http://joostn.github.com/OpenJsCad/processfile.html to parse them into an STL file.

UPDATE 2: Here's my first real thing designed with OpenJsCad:

http://www.thingiverse.com/thing:16329

UPDATE 3: Now with interactive parameter editing! Check out:

http://joostn.github.com/OpenJsCad/gearsdemo.html

Syntax has been changed slightly! Solids must now be constructed in, and returned from, the main() function. Previously this was done in global scope of the script.

All Apps

3D Print your file with 3D Hubs, the world’s largest online marketplace for 3D printing services.

App Info Launch App

This App connects Thingiverse with Makeprintable, a cloud-based mesh repair service that analyzes, validates and repairs most common mesh errors that can occur when preparing a 3D design file for p...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Ooh, if it works inside Chrome I might be able to use this at work. Since I can't actually install anything to my computer.

Working awesomely in Safari!

When I save a local copy of the webpage some things break, is making this tool an offline thing something you are planning to do?

By the way the new parser (http://joostn.github.com/OpenJsCad/processfile.html)joostn.github.com/OpenJsCad/pr... must be run from a http URL, Chrome has security restrictions in place which disallow access to uploaded files from a page with a 'file:' url.

But it should work if you have a local http server on your machine. Or perhaps it works in safari

The Three.js docs cover loading local files when opening a page with a file:// URI: https://github.com/mrdoob/three.js/wiki/How-to-run-things-locallyhttps://github.com/mrdoob/thre...

It boils down to starting Chrome with the --allow-file-access-from-files option. Still looking for info on why this is considered harmful; the user's telling the browser which file to load, not granting access to the filesystem.

It should work fine, nothing is done on the server.

You can download the zipball here:
https://github.com/joostn/OpenJsCad/zipball/gh-pageshttps://github.com/joostn/Open...

Not all firefoxes are born equal. Mine shows nothing.

Opera shows nothing too.

Your browser needs to support WebGL, otherwise you'll see nothing. I'll update it with a proper error message.

Works fine in firefox.

Not all firefoxes are born equal. Mine shows nothing.

Opera shows nothing too.

On Linux.

joostn - in reply to Aeva

Yes it mostly seems to work but I have seen occasional corrupted solids. Haven't been able to figure out what causes this.

But chrome's javascript is faster anyway!

Holy crap this is awesome!

Great 8-)

Top