Pass Path3D to MeshBuilder.ExtrudeShape and similar classes

So currently I have noticed in the babylonjs code that it is not possible to pass a Path3D class to the extrude shape builder and it is instead created in the _ExtrudeShapeGeneric function of the ShapeBuilder class, this is a problem because if I wanted to extrude a mesh to look like a parrallelpiped I am unable to as I can not set the normals and binormals, among other useful things such as keeping normals and binormals constant throughout a path even through x,y,z location changes. As I have highlighted in the problem I posted to the bugs section earlier (although I have since realized it is not a bug and simply the way it functions, hence this post.)


Also I am relatively new to babylon, so if this is already possible in some way please let me know although from what I have gathered it does not seem so at least not with some unnecessarily hacky work-around.

As @jerome said in the other topic

In your case I would probably build a dedicated ribbon with the required geometry instead of using the extrusion method.

A ribbon is the way to go https://www.babylonjs-playground.com/#165IV6#882

remove line 31 if you do not want it flat shaded.

2 Likes

the same not flat shaded with twice the vertices in the initial shape, so the normals are better : https://www.babylonjs-playground.com/#165IV6#883

2 Likes