Why Extrude shape with a incorrect CAP_ALL

Just like the image, I want use a half circle shape with some thickness to extrude a mesh, when i set cap to CAP_ALL, it seem some incorrect, is there a way to generate the right mesh?

Custom Extruded Shape Examples | Babylon.js Playground (babylonjs.com)

I assume you are asking how to avoid to the psychedelic caps, right? Because the shape seems to be extruded correctly up to the point it tries to cap the mesh.

If that’s the case, we will have to dive into the cap code and understand why it fails in your case, as your code seems to be fine

Yes, but I don’t know how to handle it. I’m trying to use ribbon to generate it, but I can’t handle the shape rotating in the tangent direction well