I’m curious how you all would go about creating a custom geometry for a semi-cylinder where the two corners have a radius that can be controlled. Here is a picture of the basic shape I am trying to replicate, and the end goal is for this shape to be subtracted from a full cylinder with a Boolean operation.

Similarly I’m wondering if it would be possible to create a similar controllable radius effect on the “corners” for a crescent shape like this one.

This example shows you how you can shape a cylinder geometry according to your wishes. You only need the appropriate formulas for calculating the coordinates, i.e. a little elementary knowledge of geometry.

I have been playing around with trying to create the 2D shape but I can’t quite seem to get it quite right. I am using 3 different absarc to create the major radius of the semi circle, and the two rounded corners. Using some basic geometry I am trying to position everything accordingly to the set radius of the corners and control the start and end positions of the major semi-circle, but as you can see the result doesn’t work quite right.

I tried to look at your code. I’m not sure I have the time to digest all the Math in it.

Here is what I had in mind, when I proposed to extrude a 2D shape. This is a line of semi-cylinders with increasing roundness of corners. The class SemiCyinderGeometry is defined in lines 35-56:

I am also not a math guy, how would you go about creating a crescent shape with round-able points? I am assuming it would be constructed with 4 absarcs, one for each major curve and one for each rounded point, but I am unsure of the math needed to calculate the properties for those rounded point absarcs.

I suspect the following logic is what I need to derive the cresent shape given user specified inputs of each major radius and the radius of the desired rounded corner, but I am struggling to translate this to three.