Edge Duplicate programmatically?

Hello everyone,

Quite new Babylon.js user here, I came from another well-known framework but I must say Babylon makes everything easier to implement.
There is one thing I cannot wrap my head around though: I am exporting OBJ files from a CAD system, they are dynamically generated and downloaded from my frontend. This specific CAD exports them as flat shaded meshes, and there is no workaround for this during export. That is why, upon loading the mesh in Babylon, I apply a forceSharedVertices and it correctly makes all the faces smooth.
Now, to preserve “edginess” on some of the edges, I would like to apply an Edge Duplicate filter, effetely duplicating the edges when the angle between two faces is over a certain value. This will make them look sharp in the engine.
Is there any add-on or method I can use to do this? Does anyone have a workaround? Unfortunately, passing it through Blender isn’t doable since I need to generate each mesh dynamically…

Thank you in advance,


Hey and welcome, did you have a look to the edgeRenderer? It is not exactly what you want but its code should help you a lot

Sorry for the late response. Thank you, I am having a look at it. If I manage to do something with it, I’ll make a pull request, I believe this is an important feature for 3D mesh editing.