I'm trying to code a toy bus that I made (in wood) years ago when my kids were young, just to see if my (cheapo) CNC could make a miniature version.
For the time being, I have mostly entered dimensions, and made the bottom part.
I am now trying to code the rear block, and I want to soften the polygon lines, like I did with the wood and the big disc sander.
I thought of using a Béziers curve, and I found a library with a function that returns a set of points corresponding to the Béziers curve.
Now, I can't seem to be able to create a polygon from this list, so for the time being (bear with me, my code is terrible) I have used a linear_extrude of a projection of a hull_polyline3d.
It's not really what I was aiming for.
Would there be a more "openScad" way of concatenating a polygon with a softened version of a part of itself? I will have to do it in other places too, like the top for example...
Thanks in advance.
Rounding is one of the most asked questions.
Short answer for 3d boolean operations union difference and intersection:
There is none as most think of them.
Now there are a bunch of work arounds.
Best but limited is to do all the heavy lifting in 2d.
There are many but two common methods is the Round_Anything library or using a triplet of 2d offsets.
First offset out 1=r, then offset in r=2 , last offset out r=1.
That get you outer and inner radii of 1.
For thin features <r this method will fail
Round_Anything. https://github.com/Irev-Dev/Round-Anything Round_Anything, witch i recommend, don't have the same drawbacks.
In general very powerful, offers individual radius for each point, but is slightly more involved to use.
And then there are the very slow minkowski operation. could be used in a pinch but realistically only on low polygon geometry.
For your case id suggest making three 2d sketches on for each top side and front view.
Top and front views are symmetrical and is best drawn such on centreline.
Then linear_extrude each sketch and 3d rotate into place.
For side view you want to invoke the linear_extrude with the center=true option.
These three extrusions can then be enclosed in a intersection block.
The result should be as if you had cut them out on a band saw in three planes.
As shown in the image there are no rounding on the edge where the planes intersect.
As a finishing step each sketch can individually be given a negative offset of some radius.
Then a minkowski operation can compose the intersection with a sphere of the same radius.
It's all my pleasure.
One tip is to give the techniques a practice run on some simple stuff before your real project,
The rotation of the three 2d sketches was somewhat confusing the first time i tried.
Best of luck.