JavaSCAD - Our little model generator framework

by printingin3d, published

JavaSCAD - Our little model generator framework by printingin3d May 2, 2013
0 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps


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

3306Views 743Downloads


After we had been using OpenSCAD for months and learnt its limitations we decided we should write something which helps creating complex models. Our obvious choice was Java, because both of us are expert Java developers and the cross-platform support for Java is ideal to generate code for the equally cross-platform OpenSCAD.
This led to the creation of JavaSCAD, a simple framework in Java. The basic concept is to represent the OpenSCAD primitive objects with a Java object and build more complex ones from them. There is still ongoing development around JavaSCAD - for one thing it should be improved and addded more functionality and the other part is to include the OpenSCAD's 2D capabilities (the 3D features are already implemented).
Also uploaded a simple example about the current status - it's just a simple, parameterized Lego brick creator. Two brick is attached as well for those who want to see the result first.
Another example is the gothic shelf, we published a few weeks ago.
Update: we just released the new version: r405 with two new features: intersection and rounding.
Update2: we just released yet another update: r426 with a new feature: polyhedron thanks for Rob van der Veer for the contribution; and a new rendering option: generation of POVRay output, which is still in a very alpha state.
Update3: yet another update with a few tweaks in the alignment abilities and fixing the rotation which was working only in special cases till now
Update4: finally we released the source code on GitHub under GNU GLP v2 licence. If you have any question don't hesitate to contact us!
Update5: new release with direct STL and (colored) PLY export functionality - the idea came and part of the code based on mihu's JavaCSG port. Tagging and much more: http://www.printingin3d.eu/javascad

All Apps

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

App Info Launch App

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

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

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Any chance to access the code?

Currently we are still trying to decide the most appropriate licence which we could use to publish the source code. It turned out the originally planned GPL would be too restrictive and would prevent most of the customers to use our lib.

So, please give us some time and then we will publish the source code too.

Maybe interesting for you: I started my own JavaCSG library: https://github.com/miho/JavaCSGhttps://github.com/miho/JavaCS... since I need it now.

Looks promising, but I have no intention to move to Java8 yet. So, if you don't mind, I'll try to downgrade it to Java7 and if it'll proven to be able to create STL output directly I'll merge it into my project.

Would be great if you do that Java8 -> Java7 port as a fork of JavaCSG on GitHub. There might be other users that still use Java 7 and would profit from that work.

It was quite easy to move the codebase to Java7. Here it is: https://github.com/printingin3d/JavaCSGhttps://github.com/printingin3...
It does export to STL directly, so I am more than interested to integrate this to JavaSCAD. As far as I see it won't be too hard to do, but we will see how it works out.

Cool. Direct STL export was the main reason for developing it :)

Meanwhile I wrote a initial version of JavaFXScad: https://github.com/miho/JavaFXScadhttps://github.com/miho/JavaFX.... Printing parts works flawless: http://www.thingiverse.com/make:71381http://www.thingiverse.com/mak... and http://www.thingiverse.com/make:71382http://www.thingiverse.com/mak...

@all Please contribute to JavaCSG and JavaFXScad!

Raspberry Pi Mount (B&B+)
by miho
Arduino Mount
by miho

A new version has been released which includes CSG generation based on mihu's JavaCSG. Thanks to him for the idea and the basic implementation.
Unfortunately the CSG generation is not necessary manifold (that's why OpenSCAD uses it only displaying the model, not for the STL rendering) and we haven't found any solution so far, so the STL and PLY export is mainly for displaying the model, the render remained in OpenSCAD.

It depends on your goals. GPL promotes free software but limits adoption, BSD promotes adoption but doesn't promote free software (beyond your framework being free), etc.

Very cool. From reading about it, it sounds similar to PySCAD - use a real programming language to build an object and generate OpenSCAD to then render. Did I get that right?

Exactly. We didn't know about PySCAD, but it seems programmers think very similarly :-) We hope JavaSCAD will be at least as successful as PySCAD was.

The intention was to add convenient methods to the objects which saves us the lots of calculation which was needed in OpenSCAD (see the Abstract3dModel.alignhttp://www.printingin3d.eu/jav... method in the documentation, which is the base class for all of the solid objects)

Nice! Now all we have to do is talk Tbuser into supporting alternatives to OpenSCAD on the Thingiverse Customizer! :-)