OpenSCAD however fails spectacularly for any kind of complex filetting situation when compared to tools like Fusion or even FreeCAD (FreeCAD's UI is an abomination though).
The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.
Even Blender, which was truly never designed for this type of operations can sometimes do better than OpenSCAD for fillets.
Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.
I've never had a problem with this, but I build up from the ground with the edges the way I want them to be. The reason many people struggle with this is that they start from 'hard' primitives such as cubes and triangles and then they want to process the edges once the rough shape is there. That's all but impossible. But you don't have to do it that way at all.
> The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.
That's because they're used as 'after the fact' tools. It's a bit like trying to change the shape of a folded piece of metal after the fact. It's much easier to shape it right the first time than to 'fix' it later on.
When I start working on a shape like that I use a truncated cube rotated 45/45/0, place copies of that cube on the vertices of the shape I want and then cover the whole thing with a hull. Instant chamfer. If I want to use fillets I'll use a sphere. That's much easier than to first create an arrangement of cubes and other primitives and then to decide where I want the fillets to go. Picking those initial shapes for the corners is the tricky part, after that it is very quick to make (and change) objects. I've done some pretty complex shapes like this, fully parametric that would have cost me days with a traditional workflow.
> Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.
Yes, agreed, this kind of second order primitive is not possible. I understand the reason for it (and the reason why you can't change variables on the fly) and it is a serious drawback. This makes it very hard to relate two non-trivial shapes to each other. Interactive CAD programs are better for things like that, but there - usually - the kind of change that takes a second in OpenSCAD means a whole pile of manual work. So my recipe is to stick to OpenSCAD for those things that I think I can make with it and to use an interactive tool for everything else.
One thing that OpenSCAD excels at is remixing stuff based on existing STLs, I've yet to find another tool that allows me to do that so easily and with such versatility. Before my 'serious' cad tools have imported a mesh the OpenSCAD workflow is already printing the remixed result. As with everything: the right tool for the job is the key.
Your way of building objects require a ton of very hard thinking.
Most folks I know doing CSG modeling don't think (or often: can't) this way.
The typical way folks model with CSG is the age-old "roughing-out then refine" technique, building a rough idea of the object with cubes spheres and cylinder in a CSG tree, and then adding details iteratively. A bit like folks who draw cartoons operate: start with drawing potatoes and then add the details.
In this approach fillets come in at the last step, when the object is "complete" and hard edges simply need to be softened.
Most people are incapable (I certainly know I am) of designing fillets in from the onset, especially if the object is going to be complex.
I don't dislike OpenSCAD, quite the contrary, it's just that all of the things I built with it always ended up with a fillet related headache.
This would, of course, be a great hassle to use, but I think I'd really enjoy being able to eg preview the texture different tool heads / cut patterns would leave. I imagine thinking in terms of "how the machine will cut this" would also improve my ability to reason about the machine.
The answer to your question in the context of CAD modeling:
Fusion is closed-source.
Their model files are closed-source (specs aren't public)
AutoDesk is one of the worst company in the world when it comes to inter-operability, and this by design. It's just in the DNA of that company.
Their customers is their enemy, they know it full well, but they don't care because the walls of the prison are made of steel and one meter thick.
Your object construction pipeline is guaranteed to become obsolete at some point in the future.
Good luck grabbing an object you built 10 years ago and doing some light editing on it.
Good luck grabbing a parametric design and exporting it to something else, either another CAD package or something to do visualization and do further work on the model in there.
Fusion is a real nice tool. First taste is free. Then you're on the AutoDesk hook for ever.
You may not care about these things, especially in a commercial setup.
But lots of people do.
build123d[1] is based on the same kernel as FreeCAD and has full support for complex filleting situations. Furthermore it also has first class support for 1D and 2D primitives which enable a more flexible design approach.
> The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.
Agreed.
> Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.
This is another area where build123d excels. You can create a line and query its length. You can create a face and query its area, position, size, bounding box, etc. You can select parts of a solid and perform operations on them (like a chamfer/fillet, or use them as a reference for positioning). You can query the geometric type of any topological entity; e.g. is this curve linear, a circular arc, elliptical, or a spline?
build123d is IMHO easily one of the most powerful CAD packages that are not well known by a wide audience (owing in part to its ~3 year history). OpenSCAD is a fantastic tool; it was my introduction to CodeCAD and I used it for years. Therefore, my objection isn't to OpenSCAD itself, but to the limitations inherent in any single tool -- and in this case, those limitations are quite significant.
[1]: https://github.com/gumyr/build123d and docs https://build123d.readthedocs.io/en/latest/
https://github.com/openscad/openscad/pull/4478#issuecomment-...
My main complaint was you can't say with OpenSCAD:
translate(makePen().cap) ; translate(makePen().body)
# ...to decompose/modify returned parts of complex objects
...and woefully, you cannot say: pen := new Pen(q,r,s,t); box := new Box( pen.L, pen.W, pen.H )
# ...to be able to make boxes for arbitrary pens
...so it's MATHEMATICALLY parametric, not PROGRAMMABLY parametric, which led me down other CAD-language (eg: CadQuery), or you could use `*.scad` as a _rendering_ language rather than a _development_ language.This is usually the result of design workflows and how you avoid it is going to vary based on the CAD package. It definitely requires being pretty deliberate in design, which can make it harder to draft out an initial design. And the path of least resistance is often one that's more likely to break.
One example would be in Fusion, using projected faces in sketches is far more fragile than projecting a body -- but Fusion will happily project faces by default.
Which constraint types you use where are another common cause of breakage.
The thing that makes it frustrating is that none of this is really well documented anywhere and largely ends up being best practice wisdom passed from one person to another, since a lot of this stuff is really non-obvious. And it's confounded yet again by people cargo culting best practices from one CAD package to another that then gets repeated third and fourth hand.
All that said, as you work with it more and delve into more complex designs, you'll end up settling into workflows that result in more resilient models if you're deliberate about it. The "scrap it and start over" cycle is part of the learning experience, IME, as frustrating as it is at the time.
In FreeCAD it works but you have to think a bit how you approach it. For example, if you reference an edge that you later on go back and delete, of course it will break things. Also if everything is not correctly constrained and you go back and edit it, it will likely break things. And then there are some bugs as well, but it's free and open source so I am not complaining. :)
Similarly as with mesh modeling, where correct modeling style is needed for smoothing not to break things, with CAD you also have to get used to certain approach to modeling, you can't be as chaotic.
But the more you do it, the better you will become and in my opinion learning proper CAD modeling approach is easier than proper mesh modeling in Blender.