Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OpenSCAD is definitely very popular in the maker/microcontroller/electronics world, which is both a good and bad thing, because it is accessible but also limited/frustrating. It enables some good stuff on Thingiverse but it becomes extremely mathematics-focussed quite quickly.

I do wish more of the code-CAD people would look at Replicad, Build123D and CadQuery.

I personally like FreeCAD a lot, but I won't push people onto it; if they like TinkerCad that's fine.



I got into making all kinds of stuff because of OpenSCAD. It's just enough for 3D printing functional mechanical parts. It's still my first go-to for designs. The downside is OpenSCAD doesn't support import or export of STEP files... So I've also added FreeCAD to my toolbox. But I really wish OpenSCAD would/could do whatever refactor it needed to support STEP.


Yes -- the STEP thing was a big part of why I wanted to switch.

I actually switched via CadQuery: a few minutes with that made it clear that the bits I didn't understand (edges, faces, planes, all that stuff that freaked me out) were simple and logical and had a sort of common sense integrity, and that I might as well try to learn them in the context of FreeCAD.

Had Build123D existed at that point, or Replicad, maybe I'd have pushed on for longer. Build123D is my "fallback toolbox" at this point.

I don't think OpenSCAD can produce STEP, ever. Importing it is another matter; that's a one-way meshing operation. But creating it means having a kernel that understands more than CSG operations -- a bRep kernel like OpenCASCADE, that FreeCAD/Replicad/CadQuery/Build123D etc. use.

You can of course run your OpenSCAD in FreeCAD, but certain operations (hulls, Minkowski I think?) end up as meshes, because there is no easy equivalent. Still, that's better than every operation ending up a mesh.


I just looked at those other code CAD programs, and I don't see the appeal over OpenSCAD.

I have no interest in browser based CAD programs because as models become complex, that platform is too limited in performance.

Python and stateful CAD drawings sound like a nightmare to me.

OpenSCAD has limitations for sure, but I think a better tool will look different.

I do wish OpenSCAD used a more general purpose programming manager.


Replicad is quicker to render complex things than OpenSCAD -- significantly quicker. It uses an emscripten port of OCC.

It's also embeddable as a library, which means being able to make web-based object customisers: client-side, script-driven tools that don't require CAD knowledge for the user. Like the Thingiverse customiser but on steroids. It's a fascinating project.

And I think it's not the statefulness that is the significant thing about CadQuery and Build123D. It's the access to a bRep kernel, so you can do operations with faces and vertices, you can reflect (analyse, measure) the model, etc.

Being able to do operations on a generated face or edge means not needing to know (or recalculate) the location of that face in 3D space; it saves you so much in the way of maths.

If you have very simple (or very mathematical!) models, OpenSCAD can help. But once things get complex you just have file after file of variable definitions.

Functional flows on vertexes, edges and faces created by previous operations is much closer to a code equivalent of GUI CAD.


Replicad is quicker to render complex things than OpenSCAD -- significantly quicker. It uses an emscripten port of OCC.

OpenSCAD integrated manifold into its codebase though you would need to use a development build to actually use it since the last release is in 2021. I heard manifold is significantly faster than CGAL.


That's good to know.


> Python and stateful CAD drawings sound like a nightmare to me.

Please correct me if I’m wrong, but it doesn’t appear stateful to me. The context managers mostly make the organization of objects be reflected in the organization of the code.

They’re stateful in the sense that some bits are part of a larger assembly, but I think that’s inherent in the domain. The features of the object have to relate to each other so it knows how to stitch the object together (eg which side of a face is external and which is internal).


If OpenSCAD had STEP file support, I could do all my design work in it. But it can't, so I can't.


OpenSCAD basically has no tools to aid complex modeling. You have to know trigonometry and often use pen and paper to calculate points.

Build123d has stateless algebra mode. And you could replace math with simple construction elements and simply ask intersection points.


OpenSCAD is a counterfeit CAD! It doesn't Aid your Design so much as render one the user has to already understand. I do like it for simple parametric changes to existing models though.

I wish we had something like it that could be used to create freeCAD macros, as in "Here's a sketch, which FreeCAD translates to OpenSCAD arrays, then runs a script that can do stuff with this model as input"


Is that really "counterfeit"? As you mentioned, CAD is Computer-Aided Design, and OpenSCAD is certainly aiding in the design process by interpreting higher level commands about where to place geometry.

I have a lot of criticisms for OpenSCAD but I wouldn't call it a counterfeit, it's just a code-based approach to constructing something vs. a GUI-based approach.


It's more of a joke/exaggeration, but it does explain why I find it to be so hard to use.

It's much more of a one way conversation, if you can't imagine all the rotations to make a part do something, trial and error is very slow.

Whereas in GUI CAD you mostly only have to be able to think in 2D.

And without a constraint solver, you have to have a much deeper understanding of all the spatial relationships involved.


Right -- OpenSCAD is an object compiler. You give it code, it gives you an object.

Your object is not something that can then be used to iterate on, except by placing it in space and adding or subtracting other stuff to/from it.

Have you looked at Build123D or CadQuery?

Both are Python packages (different API styles, compatible underpinnings) that do OpenSCAD-type things, but using the OpenCASCADE bRep kernel, so it is less "counterfeit" -- if you want to do something based on a face or edge or vertex that was the product of a previous operation, you can. Both have some constraints support.

In many ways they are both just a prettier alternative to the FreeCAD Python APIs -- indeed there was a CadQuery workbench for CadQuery 1.x.


The problem with anything other that OpenSCAD is it's somewhat nonstandard and often has sandboxing issues.

It's like the BASH of 3D, if I'm doing anything with code CAD, it's probably trivial enough that just using what everyone else uses makes sense, even if almost any other alternative is much nicer.


I agree that it's more difficult to manage Build123D or CadQuery due to their status as Python packages with heavier dependencies. (Less of a problem with Replicad, which is a client-side JS package)

This is a little bit of why I jumped to FreeCAD from OpenSCAD -- the existence of prebuilt distributions of FreeCAD, and the realisation that I'd always be able to script FreeCAD if I needed it.

Though I think Build123D has the beginnings of momentum (I also think it's not hard to see why):

https://github.com/phillipthelen/awesome-build123d

But OpenSCAD is a terrible, obstinate "standard" choice; I wish it were not seen that way, don't you? Because it's holding everyone back.

(This does make me realise that maybe working on an Electron-based Replicad desktop app would be a good use of my time.)


Yeah, it's not a great standard choice, pretty much any alternative is going to be nicer.

But the difference is relatively small, because I'd rather be using GUIs for anything nontrivial.


I like the idea of OpenSCAD but the language is too functional/immutable for my taste. It's interesting but having to rethink even algorithms with simple loops gets very tiring over time.

A debugger would be very helpful to be able to step through the code.


There is now a Python-enabled version:

https://pythonscad.org/

Using the # operator to make things transparent red helps a lot when stepping/iterating through code.


I tried that but couldn’t make it work on my M1 MacBook. Not sure why.


Please check in with the developer --- probably best to create an issue at Github:

https://github.com/gsohler/openscad/issues


The rendering is also very slow, even on powerful machines.


Have you tried a recent (nightly) build and enabled Manifold?


JSCAD is a thing:

https://openjscad.xyz/

But I really only fight with it because I know JS moderately well.


Have you looked at Replicad?

https://replicad.xyz

Similar principles, but a bRep kernel so a much richer API.


A few weeks ago I was planning to design a model I could send to a local 3d printer to replace a broken piece in the house for which I knew it would be impossible to find something that would fit exactly.

I looked around through a couple of open source/free offerings and all found them frustrating. Either the focus on easy of use was too limiting, the focus was too much on blob, clay-like modeling rather than strong parametric models (many online tools), or they were too pushy to make you pay, or the UI was not intuitive (FreeCAD).

OpenSCAD was the one which allowed me to get the model done, and I loved the code-first, parametric-first approach and way of thinking. But that said I also found POV-Ray enjoyable to play around with around the 2000s. Build123D looks interesting as well, thanks for recommending that.


The major advantage of Build123D for your use case -- sending it to someone else to fabricate it -- is STEP output support.

This really expands your options for what you can make and who you can ask to make it. There are now some online fabrication places that will do CNC from mesh formats, but really the only way to have proper control is sending them a STEP file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: