Jump to content
3DCoat Forums
Sign in to follow this  
celer

Feature Request: OpenSCAD scripting compatibility

Recommended Posts

Ok, I know this is a large ask, but I really only have a couple tools in my tool chain, 3D Coat, OpenSCAD and Simplify3D. 

OpenSCAD is one of my favorite tools, it describes itself as "The Programmers Solid 3D CAD Modeller" it lets you describe 3D objects in a language for modifying 3d objects. So for example, one of the things I did with OpenSCAD was an antler generator, which used a recursive design to generate a parametric set of antlers. So you could change a few parameters and generate a new set of antlers.

So for example to do something 
 

OpenSCAD is one of my favorite tools, but sadly it's painfully slow to do basic boolean operations - what I really wish existed was a fully compatible and performant implementation of OpenSCADs scripting language. So for example taking a sculpt from 3Dcoat and doing something like a shell operation in it in OpenSCAD can take upwards of an hour on a modern quad core I7, and it's preview mode so frequently gets it wrong that iterating in OpenSCAD on a complex model can be an exercise in suffering. 

The language itself just isn't that complex, and 3D Coat supports all the primitives and almost all of the operations, except perhaps Minkowski operators, which I think would be easy to implement with voxels. The reason to do this is it would allow 3D Coat to interact with thousands of existing OpenSCAD objects. 

My use cases for OpenSCAD are:

  • Create a new object which then is used as a base in 3DCoat for sculpting
  • Take a sculpted object and then do a parametric operation to it, i.e. cut a grid of holes, or slice an object into pieces
  • Take other peoples openSCAD modules and integrate them into a larger design, so for example if I'm modeling something with a stepper motor I start by importing that library into OpenSCAD then building around it. 
  • Use OpenSCADs animation or looping constructs to visualize 3D motion or to cut the motion of a swing arm or other object accurately into another object

If 3DCoat Printing and 3DCoat in general supported OpenSCAD here is what I'd want (ideally voxel based):

  • Editor for creating objects, with syntax highlighting
  • The ability to add a object defined by openSCAD to the primitives menu in 3DCoat
  • Compatibility with all of OpenSCADs primitives (easy) and operators (I frequently use hull() and minkowski() for complex shell operations)
  • Run an openscad script from the menu on an existing object to do a modification like drill holes in the object, or slice it up in a specific way

Here is the grammar for OpenSCAD:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language

Here is an example of the awesome libraries from openscad:

https://www.thingiverse.com/thing:2187837

https://www.thingiverse.com/thing:1604369

Here is an example of the large number of existing OpenSCAD objects:

https://www.thingiverse.com/search?q=OpenSCAD&dwh=865c5b52546db4c

3DCoat Printing would suddenly have a massive draw for anyone who wants a performant version of OpenSCAD and even more so to blend that into organic sculpting. 

I want this so badly I've considered trying to build it myself, but I think it would be better if it was part of 3DCoat.

 

Share this post


Link to post
Share on other sites
On 2/6/2019 at 11:49 PM, celer said:

If 3DCoat Printing and 3DCoat in general supported OpenSCAD here is what I'd want (ideally voxel based):

  • Editor for creating objects, with syntax highlighting
  • The ability to add a object defined by openSCAD to the primitives menu in 3DCoat
  • Compatibility with all of OpenSCADs primitives (easy) and operators (I frequently use hull() and minkowski() for complex shell operations)
  • Run an openscad script from the menu on an existing object to do a modification like drill holes in the object, or slice it up in a specific way

 

Thanks for the ideas expressed! We are preparing a similar solution, all actions will be written to the script, you can modify it and remake scene using the updated script.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×