BABYLON.MeshBuilder.ExtrudeShape has weird lines

I’m currently utilizing the BABYLON.MeshBuilder.ExtrudeShape function in my project, where I’m extruding a 3D mesh from a 2D path. I’m obtaining the vertices from a Path2D object. However, I’ve encountered an issue where the extruded mesh displays an unexpected angled line. Additionally, the mesh doesn’t seem to form a complete loop, even though I anticipate it should based on my current implementation.
I suspect the issue might be stemming from an error in my code, but I’m not entirely sure. In this particular instance, I’ve created a custom “arc” function that emulates the behavior of the Canvas 2D arc function, as it appears there isn’t a built-in equivalent in Babylon.js. I appreciate any insights or suggestions.

Normals are incorrect.
when recomputed with flat shade, it looks like this:

3 Likes

Cedric, you’re amazing, yes that resolved the issue!

1 Like