OpenSCAD in Blender

Please Login to Comment

Hi folks,

Long time user of OpenSCAD here, which - as someone with a coder background - is my favorite tool for creating quick CAD-like objects.

However, I am also a very long time Blender user, which IMO is unparalleled in the FOSS world for many things, but specifically for 3D navigation and interacting with 3D geometry in general.

So, I’ve had an itch I wanted to scratch for a very long time: the power and quickness of OpenSCAD for modeling, married with the power and depth of Blender for 3D navigation (and many other things).

I’ve started experimenting with the idea, and while there is still a lot to do and a lot to figure out and optimize in terms of workflow, I have built something that has reached usability level.

If you guys want to take a look, here’s what that looks like:

https://www.youtube.com/watch?v=aZq8ZlmqHJo (watch in 2160p if you can)

There are a lot more that needs to be done to make it as (or even more) usable as the native OpenSCAD GUI, but I plan to get there in the coming month.

Would love feedback / ideas.

Very nice. I could have used this a few times and I have a project underway which I was planning to do all the work in Blender but was wishing I could do things the openscad way (I want to duplicate a building for which the physical elements would be trivial under openscad)

I'll just point out that in your video, just having two spheres is not the same as having a union of spheres. Not sure how that plays into Blender but I started eliminating edge-case errors in slicing when I started explicitly unioning things I wanted unioned instead of just leaving it up to the slicer to handle.

I need this so bad. I've been doing increasingly complex animation rendering in OpenSCAD, and I've been looking for a decent way to plug into a better rendering engine. I tried bringing STLs from OpenSCAD into Blender, but it was a really painful process (I still say Blender is impossible to learn), and this would give me a huge head start.

It looks like a fascinating crossover, but, like Bikecyclist I suppose, I am aware of Blender and that it is very powerful but from what I've read it's hard to use. I take it from your commentary that Blender deals in just meshes and presumably this a plugin into Blender's ecosystem. Is that available, how is it installed and could a Blender newbie drive it and easily get some results? Can it be combined with normal Blender operations? Is the OpenSCAD script saved along with the Blender model?

from what I've read it's hard to use.

It was really hard to use until a couple of years ago. Recent versions are much more user-friendly. The learning curve is still a little steep at the beginning, but on the other hand, there are tons of video tutorials on YouTube.

Blender does support NURBS, but it's really limited. Meshes are indeed the main tool.

This work is WIP, and will eventually be a plugin. I've shown this to get some feedback on the ongoing work, but at this point, to try it, you'd have to recompile Blender, which is not easy.

Regarding your two last questions: yes, the model can be further worked on with normal Blender tools, and yes, the script is saved along with the Blender file.

Perhaps you could describe in a few words at high abstraction level what you're trying to achieve, and how? Not being familiar with Blender, I'm a bit lost.


First, it's very easy to get an idea of what Blender can do without knowing how to use it: there are tons of video tutorial on Youtube.

Here's one specifically on modeling: https://www.youtube.com/watch?v=Nxj7AcWl_iE

Second, I love OpenSCAD, as in: the language and the idea (code to geometry), but I find the UI very limiting.

Blender is a very polished 3D environment that is being used by special effects professionals on a daily basis on real movie productions.

As a result, the 3D environment, specifically navigation and tools to examine a 3D objects are very powerful.

By integrating OpenSCAD (the language and the engine) into the Blender UI, you get the best of both worlds.

One thing in particular is really nice in Blender: you can measure things on a mesh (dimensions, center of mass of vertices, volume, area, etc ...) and with this integration, you can use these tools to glean information about your OpenSCAD model and use the result directly to change the OpenSCAD code.

Example: today, you can't use OpenSCAD to place a sphere at the center of mass of a complex assembly. With this work, it can happen in seconds.