Products > 3D printing

Anyone using OpenSCAD?

(1/1)

berke:
Just got a Prusa MINI+ last week and I started using it with OpenSCAD.  Otherwise I'm a 3D printing noob.  My use case is typical, printing enclosures for projects.

Here are my observations about OpenSCAD:

- The built-in editor (a Qt widget I guess) is trash, but you don't have to use it.  I use Emacs, and as soon as I save the file OpenSCAD gets inotify'd and refreshes the display.  Emacs even has a "SCAD" mode, and C-c C-o invokes OpenSCAD.
- The previewer GUI is OK, but rendering doesn't work very well with transparent surfaces, and because there is no cutting plane it's hard to see what's going on, you have to put switches in your code to remove parts.
- There is no interactive ruler / measure function in the GUI either.
- You can change parameters live in the GUI which is nice except that it doesn't refresh the view in a timely manner.
- The language is meh.  It pretends to be functional but it's irregular, doesn't even have decent closures.  Weird module/function distinction, no higher-order modules, no nested or anonymous modules, weird "children()" mechanism for defining operators...  It's not too bad but could be much better.  Because OpenSCAD has irritating language rules, some people have written generators around it.  There is at least one Rust crate.
- I have also used POVRay a bit, which is a CSG (constructive solid geometry) ray-tracer, the language there is more complete, more robust and coherent.
- There is no constraint resolution facility of any sort.
- OpenSCAD is based on CSG yet is still working on meshes, you need to specify meshing parameters for example for spheres and cylinders.
- Generating text is easy and you can use arbitrary fonts.
- Documentation is good
- No facility to verify if different parts are interfering or touching

Overall for me it's still much nicer than using FreeCAD.

I don't know if there is any fork or variant, or another CAD package that allows a similar workflow (text entry) but is of a higher quality.  If wouldn't have to be free but needs to work well under Linux and a cost not exceeding three digits.

For me, the things that need to be urgently done are:
- Fix the language so that it's actually functional, or maybe replace it with something that exists, like Ocaml or Scheme.  There are some libraries but not too much legacy so not much would be lost if the language is completely changed.
- Redo the previewer using a fragment shader that takes the CSG tree and properly implements transparency, etc. and can do cutting planes

To scratch my own itch I'll probably just define a couple of OCaml combinators that generate OpenSCAD primitives and define things that way.

brucehoult:
You might want to look at something I did in OpenSCAD. I defined a way to do cutaway using an arbitrary shape, not only a plane. I also made support for one layout for printing, and one for viewing the parts assembled.

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

Bruno Levy at INRIA Nancy has recently been working on a new CSG library that has a front end to input OpenSCAD files. I suspect he would be open to improving the language to be more functional, or an alternative equivalent language.

https://twitter.com/BrunoLevy01/status/1753815907221066239

berke:

--- Quote from: brucehoult on February 05, 2024, 09:59:44 am ---You might want to look at something I did in OpenSCAD. I defined a way to do cutaway using an arbitrary shape, not only a plane. I also made support for one layout for printing, and one for viewing the parts assembled.

--- End quote ---
Your cutaway idea is nice, I'll reuse that.  If you made the cutting plane location a parameter you would be able to adjust it from the previewer, no? For the layouts, I defined boolean parameters at the top for that reason, although I don't know when exactly OpenSCAD decides to re-render.


--- Quote ---Bruno Levy at INRIA Nancy has recently been working on a new CSG library that has a front end to input OpenSCAD files. I suspect he would be open to improving the language to be more functional, or an alternative equivalent language.

--- End quote ---
Wow, Levy's Geogram stuff looks absolutely amazing.  I'll have to dig into it, at the very least his visualization works properly.

abeyer:

--- Quote from: berke on February 05, 2024, 09:10:41 am ---I don't know if there is any fork or variant, or another CAD package that allows a similar workflow (text entry) but is of a higher quality.  If wouldn't have to be free but needs to work well under Linux and a cost not exceeding three digits.

--- End quote ---

https://github.com/Irev-Dev/curated-code-cad

SiliconWizard:
Yes, I'm having a look at geogram as well. Interesting stuff to go beyond OpenSCAD.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod