Comment by jacquesm
7 hours ago
That's because you are thinking in the way you would with conventional cad systems, you are doing your operations sequentially a bit like a sculptor would: take a blank and then remove bits piece by piece. The trick to working effectively with OpenSCAD is to generate what you want, not to iteratively chip away at something.
I have found that a combination of the two approaches works best for me. In some cases it is easiest and most practical to combine (union) shapes to get to what you want, and in others it easiest to subtract (difference or intersect).
But then you won't be able to bevel complex shapes at all, which means that you won't be able to describe the object that you will end up with. "Good" CAD means that the representation in the computer is as close to the object you want to produce as you can make it. This makes it possible for downstream systems to accurately select nozzles and toolheads to get you what you want. If you produce an impossible object then your slicer or path computer will give you an approximation. That can be fine in some cases but usually your objects need to mate and if you mate two approximations you'll find quickly that that does not really work.
There is no trick way to solve the fillet problem or about 100 other common necessary things in openscad.
Don't get me wrong, I love it myself and use it as much as possible simply because it's outstanding to be able to express a complete design in 1k of plain text which is readable, diffable, gittable.
You can get a lot done, and some things you can do even easier and simpler than anything else, and you can work-around some things, and you can get a good-enough almost-what-you-want other times, and it's practically ideal for certain classes of jobs as long as you're willing to live within the limits.
But "live within the limits" is not something a general purpose tool gets to say.
You can get some fillets easy sometimes if the geometry just happens to lend itself to some boolean op like making a rounded corner hollow box by hulling 8 spheres (which you can populate effortlessly with translate,copy,mirror) and then cutting another smaller copy. Voila, all kinds of interior and exterior fillets in like 10-15 short lines of plain text code. And the whole thing fully parameterized with dead simple variables sitting off by themselves with human descriptive names at the top of the file.
But that does not mean anything. That's a choice showcase example, and all the other infinite real life cases are somewhere between agonizing to code, to agonizing to code and agonizing for the computer (minkowski), to flat impossible.
I love openscad but this implication that it's just a matter of using it right is false.
The fillet problem is not a problem. It is a problem if you try to apply fillets after you have created something complex. But if you generate it out of variations on the primitives that already have filets it gets much easier to keep control over the resulting shape. What OpenSCAD makes next to impossible is to first combine a bunch of primitives and then to do one more operation on the resultant shape. That's really fighting the tool. But if instead you define a layer just above your primitives that already have the edges the way you want them to be then you can combine them and the filets will stay where they were on the primitives. The problem that remains is to blend them if you need to, I've found a really simple trick for that: define spheres with the fillet radius and create hulls over sets of these. That allows you to fill in the gaps if there are any.
[delayed]
Incorrect. I repeat what I already said since you didn't say anything new either.