Overlapping connection point when extruding a ring

In my first project with Babylon I try to create a ring with a notch in the middle. I first create a cross section, which I then extrude with the following formula.

var extrudePath = [];
var radius = 20;
for (var i = 0; i < 362; i++) {
    var radiant = i * Math.PI / 180
    var x = radius * Math.cos(radiant);
    var y = radius * Math.sin(radiant);
    extrudePath.push(new BABYLON.Vector3(x, y, 0));
}
var path = new BABYLON.Curve3(extrudePath).getPoints();

Is there a way to prevent this bulge?

The playground repo is here

I would use a ribbon instead, with the parameter closePath or closeArray

1 Like

How would this look in a code example? It would be important that the ring is turned from the cross-section to the typical ring shape.

Thank you! The solution worked quite well.

Playground result: here

1 Like