Hey~All. I hope to create a function to generate this geometric shape parametrically. The input parameters would be the radius, radian or included angle, and height that I’ve marked. It seems that the existing geometric shape creation functions can’t achieve this. I’m at a loss.
CreateCylinder almost meets my needs. But, I only need one center.
Lathe nearly does it, but I don’t know how to cap the shape:
Like @Evgeni_Popov , I couldn’t figure out how to cap Lathe or use CreateCylinder to create this kind of shape.
Is this the intersection of two orthogonal wedges of a sphere? If so, I’ve got some code based on CSG2 that will create it. I’ll post after I clean it up. A single wedge is shown in this video.
Here’s a single wedge (animated to test the speed of CSG2).
You don’t really need to copy my full spherical wedge code. Just use my getExtruded() (with “r” large enough to cover your cylinder) and rotate it to match your cylinder orientation, convert both extruded and your cylinder mesh to CSG2, then CSG2 intersect() and set vertices of your shape to the result. That last step is lines 119-122 of the playground I posted.